Skip to content

Conversation

pcuenca
Copy link
Member

@pcuenca pcuenca commented Dec 10, 2022

K samplers expand the sigmas to match the batch dimension of the input sample, for example here: https://github.com/crowsonkb/k-diffusion/blob/master/k_diffusion/sampling.py#LL128

However, we later expand the input inside model_fn to account for cfg, but the t remained untouched. This fails for batch sizes > 1.

Initially reported in the forums: https://discuss.huggingface.co/t/how-do-i-set-up-multiple-samples-to-display-in-a-colab-notebook-with-k-diffusion/27567

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 10, 2022

The documentation is not available anymore as the PR was closed or merged.

@patrickvonplaten
Copy link
Contributor

Thanks!

@pcuenca pcuenca merged commit ea64a78 into main Dec 10, 2022
@pcuenca pcuenca deleted the fix-k-pipeline branch December 10, 2022 16:54
tcapelle pushed a commit to tcapelle/diffusers that referenced this pull request Dec 12, 2022
Allow k pipeline to generate > 1 images.
sliard pushed a commit to sliard/diffusers that referenced this pull request Dec 21, 2022
Allow k pipeline to generate > 1 images.
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
Allow k pipeline to generate > 1 images.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants