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
4581f147
Unverified
Commit
4581f147
authored
Oct 06, 2022
by
Suraj Patil
Committed by
GitHub
Oct 06, 2022
Browse files
Update clip_guided_stable_diffusion.py
parent
2e209c30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/community/clip_guided_stable_diffusion.py
examples/community/clip_guided_stable_diffusion.py
+1
-1
No files found.
examples/community/clip_guided_stable_diffusion.py
View file @
4581f147
...
@@ -148,7 +148,7 @@ class CLIPGuidedStableDiffusion(DiffusionPipeline):
...
@@ -148,7 +148,7 @@ class CLIPGuidedStableDiffusion(DiffusionPipeline):
image
=
transforms
.
Resize
(
self
.
feature_extractor
.
size
)(
image
)
image
=
transforms
.
Resize
(
self
.
feature_extractor
.
size
)(
image
)
image
=
self
.
normalize
(
image
)
image
=
self
.
normalize
(
image
)
image_embeddings_clip
=
self
.
clip_model
.
get_image_features
(
image
)
.
float
()
image_embeddings_clip
=
self
.
clip_model
.
get_image_features
(
image
)
image_embeddings_clip
=
image_embeddings_clip
/
image_embeddings_clip
.
norm
(
p
=
2
,
dim
=-
1
,
keepdim
=
True
)
image_embeddings_clip
=
image_embeddings_clip
/
image_embeddings_clip
.
norm
(
p
=
2
,
dim
=-
1
,
keepdim
=
True
)
if
use_cutouts
:
if
use_cutouts
:
...
...
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