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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user