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

Some thing about CUDA #34

Open
tychey opened this issue May 19, 2021 · 2 comments
Open

Some thing about CUDA #34

tychey opened this issue May 19, 2021 · 2 comments

Comments

@tychey
Copy link

tychey commented May 19, 2021

HI:

When I execute demo.py

I meet the bug as below:

RuntimeError: CUDA out of memory. Tried to allocate 626.00 MiB (GPU 0; 8.00 GiB total capacity; 3.71 GiB already allocated; 469.62 MiB free; 5.58 GiB reserved in total by PyTorch)

The model I choose is bigger one: ./checkpoints_G_oilpaintbrush

The net_G I choose is zou-fusion-net

Hope your answer.

Thank you.

@tychey
Copy link
Author

tychey commented May 19, 2021

I think maybe change the batch_size will help, but I didn't find it

should I increase or decrease the arg m_grid?

@jiupinjia
Copy link
Owner

Hi, sorry for the late response.
You can try using a smaller stroke number, e.g., by reducing --max_m_strokes from 500 to 300.

Also you can try our lightweight renderer:
python demo_prog.py --img_path ./test_images/apple.jpg --canvas_color 'white' --max_m_strokes 500 --max_divide 5 --renderer oilpaintbrush --renderer_checkpoint_dir checkpoints_G_oilpaintbrush_light --net_G zou-fusion-net-light
Hope it helps. 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

2 participants