LAION-AI / ldm-finetune

Home of `erlich` and `ongo`. Finetune latent-diffusion/glid-3-xl text2image on your own data.
MIT License
182 stars 19 forks source link

Batch Sizes greater than 1 error #4

Open KnoBuddy opened 2 years ago

KnoBuddy commented 2 years ago
Traceback (most recent call last):
  File "sample.py", line 554, in <module>
    do_run()
  File "sample.py", line 545, in do_run
    for j, sample in enumerate(samples):
  File "/notebooks/test/ldm-finetune/guided_diffusion/gaussian_diffusion.py", line 976, in plms_sample_loop_progressive
    out = self.prk_sample(
  File "/notebooks/test/ldm-finetune/guided_diffusion/gaussian_diffusion.py", line 790, in prk_sample
    eps_1 = self.get_eps(model, x, t, model_kwargs, cond_fn)
  File "/notebooks/test/ldm-finetune/guided_diffusion/respace.py", line 105, in get_eps
    return super().get_eps(self._wrap_model(model), *args, **kwargs)
  File "/notebooks/test/ldm-finetune/guided_diffusion/gaussian_diffusion.py", line 740, in get_eps
    eps = eps - th.sqrt(1 - alpha_bar) * cond_fn(x, t, **model_kwargs)
RuntimeError: The size of tensor a (4) must match the size of tensor b (2) at non-singleton dimension 0