modelscope / DiffSynth-Studio

Enjoy the magic of Diffusion models!
Apache License 2.0
6.4k stars 575 forks source link

How do I specify a graphics card for inference? #113

Open luoan7248 opened 2 months ago

luoan7248 commented 2 months ago

How do I specify a graphics card for inference? Setting os.environ["CUDA_VISIBLE_DEVICES"] = '6' didn't work.

luoan7248 commented 2 months ago

image

luoan7248 commented 2 months ago

you can use CLP

Artiprocher commented 2 months ago

os.environ["CUDA_VISIBLE_DEVICES"] = '6' works. Please make sure to run this code before import torch and import diffsynth.