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
ea64a786
Unverified
Commit
ea64a786
authored
Dec 10, 2022
by
Pedro Cuenca
Committed by
GitHub
Dec 10, 2022
Browse files
Allow k pipeline to generate > 1 images (#1645)
Allow k pipeline to generate > 1 images.
parent
2868d991
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_k_diffusion.py
...stable_diffusion/pipeline_stable_diffusion_k_diffusion.py
+1
-0
No files found.
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_k_diffusion.py
View file @
ea64a786
...
@@ -439,6 +439,7 @@ class StableDiffusionKDiffusionPipeline(DiffusionPipeline):
...
@@ -439,6 +439,7 @@ class StableDiffusionKDiffusionPipeline(DiffusionPipeline):
# 6. Define model function
# 6. Define model function
def
model_fn
(
x
,
t
):
def
model_fn
(
x
,
t
):
latent_model_input
=
torch
.
cat
([
x
]
*
2
)
latent_model_input
=
torch
.
cat
([
x
]
*
2
)
t
=
torch
.
cat
([
t
]
*
2
)
noise_pred
=
self
.
k_diffusion_model
(
latent_model_input
,
t
,
cond
=
text_embeddings
)
noise_pred
=
self
.
k_diffusion_model
(
latent_model_input
,
t
,
cond
=
text_embeddings
)
...
...
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