basujindal / stable-diffusion

Optimized Stable Diffusion modified to run on lower GPU VRAM
Other
3.14k stars 469 forks source link

When using --device to select other GPUs, img2img will stuck in sleep(1) loop #166

Closed zoopigzoo closed 1 year ago

zoopigzoo commented 1 year ago

Problem: When using --device to use "cuda:5" in a multiple GPU machine, the img2img script will stuck in the sleep(1) loop.

Fix: change torch.cuda.memory_allocated() to torch.cuda.memory_allocated(device=opt.device)

basujindal commented 1 year ago

Hi, thanks for reporting the bug and the PR. It is very helpful!

doevent commented 1 year ago

Hi. How to use "cuda:1" or "cuda:2" to run img2img_gradio.py?