Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
f421f2af
Commit
f421f2af
authored
Oct 12, 2022
by
aoirusann
Committed by
AUTOMATIC1111
Oct 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[img2imgalt] Fix seed & Allow batch.
parent
57e03cdd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
scripts/img2imgalt.py
scripts/img2imgalt.py
+1
-3
No files found.
scripts/img2imgalt.py
View file @
f421f2af
...
...
@@ -129,8 +129,6 @@ class Script(scripts.Script):
return
[
original_prompt
,
original_negative_prompt
,
cfg
,
st
,
randomness
,
sigma_adjustment
]
def
run
(
self
,
p
,
original_prompt
,
original_negative_prompt
,
cfg
,
st
,
randomness
,
sigma_adjustment
):
p
.
batch_size
=
1
p
.
batch_count
=
1
def
sample_extra
(
conditioning
,
unconditional_conditioning
,
seeds
,
subseeds
,
subseed_strength
):
...
...
@@ -154,7 +152,7 @@ class Script(scripts.Script):
rec_noise
=
find_noise_for_image
(
p
,
cond
,
uncond
,
cfg
,
st
)
self
.
cache
=
Cached
(
rec_noise
,
cfg
,
st
,
lat
,
original_prompt
,
original_negative_prompt
,
sigma_adjustment
)
rand_noise
=
processing
.
create_random_tensors
(
p
.
init_latent
.
shape
[
1
:],
[
p
.
seed
+
x
+
1
for
x
in
range
(
p
.
init_latent
.
shape
[
0
])]
)
rand_noise
=
processing
.
create_random_tensors
(
p
.
init_latent
.
shape
[
1
:],
seeds
=
seeds
,
subseeds
=
subseeds
,
subseed_strength
=
p
.
subseed_strength
,
seed_resize_from_h
=
p
.
seed_resize_from_h
,
seed_resize_from_w
=
p
.
seed_resize_from_w
,
p
=
p
)
combined_noise
=
((
1
-
randomness
)
*
rec_noise
+
randomness
*
rand_noise
)
/
((
randomness
**
2
+
(
1
-
randomness
)
**
2
)
**
0.5
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment