Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cuda memory error #441

Open
slives-lab opened this issue Oct 28, 2022 · 4 comments
Open

cuda memory error #441

slives-lab opened this issue Oct 28, 2022 · 4 comments

Comments

@slives-lab
Copy link

The script to generate image from text works (python scripts/txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms ). However, the img2img script fails with a cuda error (python scripts/img2img.py --prompt "A fantasy landscape, trending on artstation" --init-img <path-to-img.jpg> --strength 0.8).

RuntimeError: CUDA out of memory. Tried to allocate 8.00 GiB (GPU 0; 15.78 GiB total capacity; 8.17 GiB already allocated; 5.91 GiB free; 8.63 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

@surister
Copy link

You don't have enough memory, try to adjust the height and width to a smaller ratio, 512x512 for example.

@slives-lab
Copy link
Author

What is the VRAM requirement to avoid error?

@g-jing
Copy link

g-jing commented Nov 1, 2022

How to change the output image size for img2img.sh?

@andresmgsl
Copy link

How to change the output image size for img2img.sh?

I have the same question.. any help?? thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants