txt2img grid contains same repeated for all images
python ./scripts/orig_scripts/txt2img.py --prompt 'they were dark and golden eyed' --W 256 --H 256 --n_sample=2 --n_iter 5 --ddim_steps 5 --seed 999
gave me the same image in grid over and over again.

All saved images are unique
Did you by chance mean to post this over at https://github.com/basujindal/stable-diffusion ?
Edit: nm I'm just so used to using the dream prompt on this repo 😁
Either way, ./scripts/orig_scripts/txt2img.py is the wrong script
txt2img is being maintained I can see it had a change 12 hours ago.
Right. That's not the correct script to call. Use scripts/dream.py
I wouldn't rely on txt2img and img2img being maintained here much longer. Support for batch size (n_sample) was recently removed and that's probably causing your problem. Try with --n_iter=10. It'll use much less VRAM.
I know, the n_sample 2 was to demonstrate the image is the same across samples.
Is dream.py going to get a full command line then, that is why I use txt2img.py
What dream.py can do now is to read a series of prompts and switches from standard input or a file, by using the --from_file argument. Internally it uses a simple function call to a library called ldm.simplet2i, and someday soon I'll reimplement txt2img and img2img using that library. This'll make everything more stable and consistent.
I still get the same image in the grid without using the n_samples and with n_samples=1
dream.py I've got to wait for PR #256 to be merged :-(
Are you on a Mac, or on a system without NVIDIA hardware?
Mac, Mac Mini M1 (with 8 GB, 512x512 just about squeezes in there with samples a 1)
Mac, Mac Mini M1 (with 8 GB, 512x512 just about squeezes in there with samples a 1)
It seems different M1 users are seeing the program fail on their machines. Have you encountered any errors before running the model? or did the model run first try?
IIUC Mx/MPS support implementation is a work-in-progess, so you're likely to see bugs.
With this repo taken around 6 hours ago, using txt2img.py, then yes it ran first try
However I don't quite use the standard build instructions, conda seems to cause more issues that it fixes with Apple Silicon. So I'm using a venv and pip to install.
I'm not perfect, kms give me nothing but black images, and I've had one crash so at 512x512, which I'm not sure is an issue with the repo or just me being on the edge memory wise.
conda seems to cause more issues that it fixes with Apple Silicon. So I'm using a venv and pip to install
You might find something useful in the wiki instructions for using pip to install on Windows (particularly the revised requirements.txt, although numpy and torch are platform-specific). Note that the deps in the wiki are for Python 3.10. If nothing else, I'd offer 'pew' as a fantastic venv manager/util.
So, this look like its a issue with torchvision, maybe just the nightlies, and probably the underlying issue is yet another torch bug.
the make_grid function is broke.
Raised a ticket other there
https://github.com/pytorch/vision/issues/6533
This can be worked around with
if not opt.skip_grid:
- all_samples.append(x_samples_ddim)
+ all_samples.append(x_samples_ddim.to(torch.device("cpu")))
So it does the grid with CPU Tensors