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
c40be225
Commit
c40be225
authored
Nov 17, 2023
by
aria1th
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix critical issue - unet apply
parent
472c22cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
modules/processing.py
modules/processing.py
+4
-4
No files found.
modules/processing.py
View file @
c40be225
...
@@ -874,7 +874,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
...
@@ -874,7 +874,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
else
:
else
:
if
opts
.
sd_vae_decode_method
!=
'Full'
:
if
opts
.
sd_vae_decode_method
!=
'Full'
:
p
.
extra_generation_params
[
'VAE Decoder'
]
=
opts
.
sd_vae_decode_method
p
.
extra_generation_params
[
'VAE Decoder'
]
=
opts
.
sd_vae_decode_method
with
hypertile_context_unet
(
p
.
sd_model
.
first_stage_
model
,
aspect_ratio
=
p
.
width
/
p
.
height
,
tile_size
=
largest_tile_size_available
(
p
.
width
,
p
.
height
),
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
p
.
sd_model
.
model
,
aspect_ratio
=
p
.
width
/
p
.
height
,
tile_size
=
largest_tile_size_available
(
p
.
width
,
p
.
height
),
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
x_samples_ddim
=
decode_latent_batch
(
p
.
sd_model
,
samples_ddim
,
target_device
=
devices
.
cpu
,
check_for_nans
=
True
)
x_samples_ddim
=
decode_latent_batch
(
p
.
sd_model
,
samples_ddim
,
target_device
=
devices
.
cpu
,
check_for_nans
=
True
)
x_samples_ddim
=
torch
.
stack
(
x_samples_ddim
)
.
float
()
x_samples_ddim
=
torch
.
stack
(
x_samples_ddim
)
.
float
()
...
@@ -1145,7 +1145,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
...
@@ -1145,7 +1145,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
x
=
self
.
rng
.
next
()
x
=
self
.
rng
.
next
()
tile_size
=
largest_tile_size_available
(
self
.
width
,
self
.
height
)
tile_size
=
largest_tile_size_available
(
self
.
width
,
self
.
height
)
with
hypertile_context_vae
(
self
.
sd_model
.
first_stage_model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
opts
=
shared
.
opts
):
with
hypertile_context_vae
(
self
.
sd_model
.
first_stage_model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
self
.
sd_model
.
first_stage_
model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
self
.
sd_model
.
model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
devices
.
torch_gc
()
devices
.
torch_gc
()
samples
=
self
.
sampler
.
sample
(
self
,
x
,
conditioning
,
unconditional_conditioning
,
image_conditioning
=
self
.
txt2img_image_conditioning
(
x
))
samples
=
self
.
sampler
.
sample
(
self
,
x
,
conditioning
,
unconditional_conditioning
,
image_conditioning
=
self
.
txt2img_image_conditioning
(
x
))
del
x
del
x
...
@@ -1247,7 +1247,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
...
@@ -1247,7 +1247,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
tile_size
=
largest_tile_size_available
(
target_width
,
target_height
)
tile_size
=
largest_tile_size_available
(
target_width
,
target_height
)
aspect_ratio
=
self
.
width
/
self
.
height
aspect_ratio
=
self
.
width
/
self
.
height
with
hypertile_context_vae
(
self
.
sd_model
.
first_stage_model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
opts
=
shared
.
opts
):
with
hypertile_context_vae
(
self
.
sd_model
.
first_stage_model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
self
.
sd_model
.
first_stage_
model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
self
.
sd_model
.
model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
samples
=
self
.
sampler
.
sample_img2img
(
self
,
samples
,
noise
,
self
.
hr_c
,
self
.
hr_uc
,
steps
=
self
.
hr_second_pass_steps
or
self
.
steps
,
image_conditioning
=
image_conditioning
)
samples
=
self
.
sampler
.
sample_img2img
(
self
,
samples
,
noise
,
self
.
hr_c
,
self
.
hr_uc
,
steps
=
self
.
hr_second_pass_steps
or
self
.
steps
,
image_conditioning
=
image_conditioning
)
sd_models
.
apply_token_merging
(
self
.
sd_model
,
self
.
get_token_merging_ratio
())
sd_models
.
apply_token_merging
(
self
.
sd_model
,
self
.
get_token_merging_ratio
())
...
@@ -1535,7 +1535,7 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
...
@@ -1535,7 +1535,7 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
aspect_ratio
=
self
.
width
/
self
.
height
aspect_ratio
=
self
.
width
/
self
.
height
tile_size
=
largest_tile_size_available
(
self
.
width
,
self
.
height
)
tile_size
=
largest_tile_size_available
(
self
.
width
,
self
.
height
)
with
hypertile_context_vae
(
self
.
sd_model
.
first_stage_model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
opts
=
shared
.
opts
):
with
hypertile_context_vae
(
self
.
sd_model
.
first_stage_model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
self
.
sd_model
.
first_stage_
model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
with
hypertile_context_unet
(
self
.
sd_model
.
model
,
aspect_ratio
=
aspect_ratio
,
tile_size
=
tile_size
,
is_sdxl
=
shared
.
sd_model
.
is_sdxl
,
opts
=
shared
.
opts
):
devices
.
torch_gc
()
devices
.
torch_gc
()
samples
=
self
.
sampler
.
sample_img2img
(
self
,
self
.
init_latent
,
x
,
conditioning
,
unconditional_conditioning
,
image_conditioning
=
self
.
image_conditioning
)
samples
=
self
.
sampler
.
sample_img2img
(
self
,
self
.
init_latent
,
x
,
conditioning
,
unconditional_conditioning
,
image_conditioning
=
self
.
image_conditioning
)
...
...
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