CompVis / latent-diffusion

High-Resolution Image Synthesis with Latent Diffusion Models
MIT License
11.53k stars 1.51k forks source link

errors while Sampling with custom trained models on LSUN #97

Open naveedunjum opened 2 years ago

naveedunjum commented 2 years ago

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 commented 2 years ago

@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

bojlahg commented 2 years ago

set batch size same as n (4)