Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
f674c488
Commit
f674c488
authored
Nov 04, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: save image for hires fix BEFORE upscaling latent space
parent
321e13ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
processing.py
modules/processing.py
+4
-4
No files found.
modules/processing.py
View file @
f674c488
...
...
@@ -665,17 +665,17 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
images
.
save_image
(
image
,
self
.
outpath_samples
,
""
,
seeds
[
index
],
prompts
[
index
],
opts
.
samples_format
,
suffix
=
"-before-highres-fix"
)
if
opts
.
use_scale_latent_for_hires_fix
:
for
i
in
range
(
samples
.
shape
[
0
]):
save_intermediate
(
samples
,
i
)
samples
=
torch
.
nn
.
functional
.
interpolate
(
samples
,
size
=
(
self
.
height
//
opt_f
,
self
.
width
//
opt_f
),
mode
=
"bilinear"
)
# Avoid making the inpainting conditioning unless necessary as
# this does need some extra compute to decode / encode the image again.
if
getattr
(
self
,
"inpainting_mask_weight"
,
shared
.
opts
.
inpainting_mask_weight
)
<
1.0
:
image_conditioning
=
self
.
img2img_image_conditioning
(
decode_first_stage
(
self
.
sd_model
,
samples
),
samples
)
else
:
image_conditioning
=
self
.
txt2img_image_conditioning
(
samples
)
for
i
in
range
(
samples
.
shape
[
0
]):
save_intermediate
(
samples
,
i
)
else
:
decoded_samples
=
decode_first_stage
(
self
.
sd_model
,
samples
)
lowres_samples
=
torch
.
clamp
((
decoded_samples
+
1.0
)
/
2.0
,
min
=
0.0
,
max
=
1.0
)
...
...
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