Now run a new prompt with a larger image. Note that the original model was trained on 512x512 and may lead to repetition especially if you try to increase both dimensions (this is mentioned in the SD readme) so just run with one dimension increased.
For example try the following example:
python scripts/txt2img.py --prompt "a person gardening, by claude monet" --ddim_steps 50 --seed 12000 --scale 9 --n_iter=1 --n_samples=1 --H=512 --W=1024 --skip_grid
I confirmed that if I run that command with the original attention.py, it fails due to lack of memory. With the new attention.py, it succeeds.
That said, this still uses 13GB of ram on my system.
I suppose you can check out the full repo with the updated code, which seems to have other changes, if you want to give that a try.
Clone the original SD repo, which is what this code was built off of, and follow all the installation instructions:
https://github.com/CompVis/stable-diffusion
In that repo, replace the file ldm/modules/attention.py with this file:
https://raw.githubusercontent.com/neonsecret/stable-diffusio...
Now run a new prompt with a larger image. Note that the original model was trained on 512x512 and may lead to repetition especially if you try to increase both dimensions (this is mentioned in the SD readme) so just run with one dimension increased.
For example try the following example:
python scripts/txt2img.py --prompt "a person gardening, by claude monet" --ddim_steps 50 --seed 12000 --scale 9 --n_iter=1 --n_samples=1 --H=512 --W=1024 --skip_grid
I confirmed that if I run that command with the original attention.py, it fails due to lack of memory. With the new attention.py, it succeeds.
That said, this still uses 13GB of ram on my system.
I suppose you can check out the full repo with the updated code, which seems to have other changes, if you want to give that a try.
https://github.com/neonsecret/stable-diffusion/
I have already been using the original SD repo so I found benefit by just changing attention.py