1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

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

Allow k pipeline to generate > 1 images.
This commit is contained in:
Pedro Cuenca
2022-12-10 17:54:02 +01:00
committed by GitHub
parent 2868d99181
commit ea64a7860a

View File

@@ -439,6 +439,7 @@ class StableDiffusionKDiffusionPipeline(DiffusionPipeline):
# 6. Define model function
def model_fn(x, t):
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)