Unverified Commit ea64a786 authored by Pedro Cuenca's avatar Pedro Cuenca Committed by GitHub
Browse files

Allow k pipeline to generate > 1 images (#1645)

Allow k pipeline to generate > 1 images.
parent 2868d991
...@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment