latent-diffusion icon indicating copy to clipboard operation
latent-diffusion copied to clipboard

errors while Sampling with custom trained models on LSUN

Open naveedunjum opened this issue 3 years ago • 2 comments

I trained the LDM on LSUN churches and now want to use this model to sample images. i used python scripts/sample_diffusion.py -r models/ldm/lsun_churches256/model.ckpt -l preds -n 4 --batch_size 8 -c 500 -e 1 but it is giving ValueErrors

Traceback (most recent call last):
  File "latent-diffusion/scripts/sample_diffusion.py", line 309, in <module>
    run(model, imglogdir, eta=opt.eta,
  File "latent-diffusion/scripts/sample_diffusion.py", line 131, in run
    all_img = np.concatenate(all_images, axis=0)
  File "<__array_function__ internals>", line 180, in concatenate
ValueError: need at least one array to concatenate

What can i do about this

naveedunjum avatar Jun 27 '22 04:06 naveedunjum

@sunsq-blue, can you please post here. So what I did was , train the models with given configs for some epochs. I use the checkpointed model to sample using python scripts/sample_diffusion.py -r models/ldm/lsun_churches256/model.ckpt -l preds -n 4 --batch_size 8 -c 500 -e 1. But it gives me errors above. Can you please check

naveedunjum avatar Jul 07 '22 12:07 naveedunjum

set batch size same as n (4)

bojlahg avatar Aug 16 '22 23:08 bojlahg