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
6281c1bd
Unverified
Commit
6281c1bd
authored
Jan 04, 2023
by
AUTOMATIC1111
Committed by
GitHub
Jan 04, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6299 from stysmmaker/feat/latent-upscale-modes
Add more latent upscale modes
parents
77c3bc77
b2151b93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
processing.py
modules/processing.py
+1
-1
shared.py
modules/shared.py
+5
-2
No files found.
modules/processing.py
View file @
6281c1bd
...
@@ -713,7 +713,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
...
@@ -713,7 +713,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
for
i
in
range
(
samples
.
shape
[
0
]):
for
i
in
range
(
samples
.
shape
[
0
]):
save_intermediate
(
samples
,
i
)
save_intermediate
(
samples
,
i
)
samples
=
torch
.
nn
.
functional
.
interpolate
(
samples
,
size
=
(
target_height
//
opt_f
,
target_width
//
opt_f
),
mode
=
latent_scale_mode
)
samples
=
torch
.
nn
.
functional
.
interpolate
(
samples
,
size
=
(
target_height
//
opt_f
,
target_width
//
opt_f
),
mode
=
latent_scale_mode
[
"mode"
],
antialias
=
latent_scale_mode
[
"antialias"
]
)
# Avoid making the inpainting conditioning unless necessary as
# Avoid making the inpainting conditioning unless necessary as
# this does need some extra compute to decode / encode the image again.
# this does need some extra compute to decode / encode the image again.
...
...
modules/shared.py
View file @
6281c1bd
...
@@ -564,8 +564,11 @@ if os.path.exists(config_filename):
...
@@ -564,8 +564,11 @@ if os.path.exists(config_filename):
latent_upscale_default_mode
=
"Latent"
latent_upscale_default_mode
=
"Latent"
latent_upscale_modes
=
{
latent_upscale_modes
=
{
"Latent"
:
"bilinear"
,
"Latent"
:
{
"mode"
:
"bilinear"
,
"antialias"
:
False
},
"Latent (nearest)"
:
"nearest"
,
"Latent (antialiased)"
:
{
"mode"
:
"bilinear"
,
"antialias"
:
True
},
"Latent (bicubic)"
:
{
"mode"
:
"bicubic"
,
"antialias"
:
False
},
"Latent (bicubic antialiased)"
:
{
"mode"
:
"bicubic"
,
"antialias"
:
True
},
"Latent (nearest)"
:
{
"mode"
:
"nearest"
,
"antialias"
:
False
},
}
}
sd_upscalers
=
[]
sd_upscalers
=
[]
...
...
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