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
f26cde3d
Unverified
Commit
f26cde3d
authored
Nov 25, 2022
by
Patrick von Platen
Committed by
GitHub
Nov 25, 2022
Browse files
fix clip guided (#1414)
parent
9f10c545
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
examples/community/clip_guided_stable_diffusion.py
examples/community/clip_guided_stable_diffusion.py
+2
-1
No files found.
examples/community/clip_guided_stable_diffusion.py
View file @
f26cde3d
...
@@ -78,7 +78,8 @@ class CLIPGuidedStableDiffusion(DiffusionPipeline):
...
@@ -78,7 +78,8 @@ class CLIPGuidedStableDiffusion(DiffusionPipeline):
)
)
self
.
normalize
=
transforms
.
Normalize
(
mean
=
feature_extractor
.
image_mean
,
std
=
feature_extractor
.
image_std
)
self
.
normalize
=
transforms
.
Normalize
(
mean
=
feature_extractor
.
image_mean
,
std
=
feature_extractor
.
image_std
)
self
.
make_cutouts
=
MakeCutouts
(
feature_extractor
.
size
)
cut_out_size
=
feature_extractor
.
size
if
isinstance
(
feature_extractor
.
size
,
int
)
else
feature_extractor
.
size
[
"shortest_edge"
]
self
.
make_cutouts
=
MakeCutouts
(
cut_out_size
)
set_requires_grad
(
self
.
text_encoder
,
False
)
set_requires_grad
(
self
.
text_encoder
,
False
)
set_requires_grad
(
self
.
clip_model
,
False
)
set_requires_grad
(
self
.
clip_model
,
False
)
...
...
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