Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
68f61a07
"git@developer.sourcefind.cn:OpenDAS/megatron-lm.git" did not exist on "1ec6b0e941b4e324602d3fd6a955f28cd334a383"
Unverified
Commit
68f61a07
authored
Jul 09, 2023
by
Patrick von Platen
Committed by
GitHub
Jul 10, 2023
Browse files
Make sure torch compile doesn't access unet config (#4008)
parent
4a3e5748
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py
...lines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py
+3
-2
No files found.
src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py
View file @
68f61a07
...
@@ -129,6 +129,7 @@ class StableDiffusionXLPipeline(DiffusionPipeline, FromSingleFileMixin):
...
@@ -129,6 +129,7 @@ class StableDiffusionXLPipeline(DiffusionPipeline, FromSingleFileMixin):
self
.
register_to_config
(
force_zeros_for_empty_prompt
=
force_zeros_for_empty_prompt
)
self
.
register_to_config
(
force_zeros_for_empty_prompt
=
force_zeros_for_empty_prompt
)
self
.
vae_scale_factor
=
2
**
(
len
(
self
.
vae
.
config
.
block_out_channels
)
-
1
)
self
.
vae_scale_factor
=
2
**
(
len
(
self
.
vae
.
config
.
block_out_channels
)
-
1
)
self
.
image_processor
=
VaeImageProcessor
(
vae_scale_factor
=
self
.
vae_scale_factor
)
self
.
image_processor
=
VaeImageProcessor
(
vae_scale_factor
=
self
.
vae_scale_factor
)
self
.
default_sample_size
=
self
.
unet
.
config
.
sample_size
self
.
watermark
=
StableDiffusionXLWatermarker
()
self
.
watermark
=
StableDiffusionXLWatermarker
()
...
@@ -652,8 +653,8 @@ class StableDiffusionXLPipeline(DiffusionPipeline, FromSingleFileMixin):
...
@@ -652,8 +653,8 @@ class StableDiffusionXLPipeline(DiffusionPipeline, FromSingleFileMixin):
"not-safe-for-work" (nsfw) content, according to the `safety_checker`.
"not-safe-for-work" (nsfw) content, according to the `safety_checker`.
"""
"""
# 0. Default height and width to unet
# 0. Default height and width to unet
height
=
height
or
self
.
unet
.
config
.
sample_size
*
self
.
vae_scale_factor
height
=
height
or
self
.
default_
sample_size
*
self
.
vae_scale_factor
width
=
width
or
self
.
unet
.
config
.
sample_size
*
self
.
vae_scale_factor
width
=
width
or
self
.
default_
sample_size
*
self
.
vae_scale_factor
original_size
=
original_size
or
(
height
,
width
)
original_size
=
original_size
or
(
height
,
width
)
target_size
=
target_size
or
(
height
,
width
)
target_size
=
target_size
or
(
height
,
width
)
...
...
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