override device doesnt show all options
I have 3 gpus, a 3090, 3080, and p40. the force/set clip device shows only "cpu" and "cuda:0". when I set the comfy device to cuda:0 it shows cuda:1 instead. I do not see cuda:2 ever.
What does launching without the cuda cli flag or cuda_visible_devices set do?
Also, what do you get if you just run this in a standalone console:
import torch
print(torch.cuda.device_count())
running that in console works right (get 3), and I dont use cuda_visible_devices, but rather the comfyui --cuda-device 0 without --cuda-device it works. looks like it might be a comfyui issue I guess because comfyui sets the environment instead of just setting device. sorry for posting to the wrong place.
I think the problem might be that the --cuda-device flag in comfy just sets cuda_visible_devices internally here.
You could try edit it to use torch.set_default_device instead I guess. Something like this: (untested)
if args.cuda_device is not None:
torch.set_default_device(f"cuda:{args.cuda_device}")