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
2fa55fc7
Commit
2fa55fc7
authored
Oct 06, 2022
by
anton-l
Browse files
Merge remote-tracking branch 'origin/main'
parents
95311501
737195dd
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1640 additions
and
1 deletion
+1640
-1
diffusers/sd_dreambooth_training.ipynb
diffusers/sd_dreambooth_training.ipynb
+1639
-0
examples/community/clip_guided_stable_diffusion.py
examples/community/clip_guided_stable_diffusion.py
+1
-1
No files found.
diffusers/sd_dreambooth_training.ipynb
0 → 100644
View file @
2fa55fc7
This diff is collapsed.
Click to expand it.
examples/community/clip_guided_stable_diffusion.py
View file @
2fa55fc7
...
@@ -146,7 +146,7 @@ class CLIPGuidedStableDiffusion(DiffusionPipeline):
...
@@ -146,7 +146,7 @@ class CLIPGuidedStableDiffusion(DiffusionPipeline):
image
=
self
.
make_cutouts
(
image
,
num_cutouts
)
image
=
self
.
make_cutouts
(
image
,
num_cutouts
)
else
:
else
:
image
=
transforms
.
Resize
(
self
.
feature_extractor
.
size
)(
image
)
image
=
transforms
.
Resize
(
self
.
feature_extractor
.
size
)(
image
)
image
=
self
.
normalize
(
image
)
image
=
self
.
normalize
(
image
)
.
to
(
latents
.
dtype
)
image_embeddings_clip
=
self
.
clip_model
.
get_image_features
(
image
)
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
)
...
...
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