Skip to content

fix --cuda-device arg for AMD/HIP devices#5586

Merged
comfyanonymous merged 3 commits intoComfy-Org:masterfrom
Bratzmeister:hip-device-switch
Nov 12, 2024
Merged

fix --cuda-device arg for AMD/HIP devices#5586
comfyanonymous merged 3 commits intoComfy-Org:masterfrom
Bratzmeister:hip-device-switch

Conversation

@Bratzmeister
Copy link
Copy Markdown
Contributor

concerning #5585
CUDA_VISIBLE_DEVICES is ignored for HIP devices/backend. Instead it uses HIP_VISIBLE_DEVICES. Setting this environment variable has no side effect for CUDA/NVIDIA so it can safely be set in any case and vice versa.

CUDA_VISIBLE_DEVICES is ignored for HIP devices/backend. Instead it uses HIP_VISIBLE_DEVICES. Setting this environment variable has no side effect for CUDA/NVIDIA so it can safely be set in any case and vice versa.
@Bratzmeister
Copy link
Copy Markdown
Contributor Author

as mentioned in #5585 this should solve the problem itself but it needs testing. I currently can't verify myself due to my multi-gpu setup being faulty apparently. However the switch is working as intended after this code change.

@comfyanonymous comfyanonymous merged commit a72d152 into Comfy-Org:master Nov 12, 2024
@Bratzmeister Bratzmeister deleted the hip-device-switch branch November 12, 2024 19:26
tiangles pushed a commit to diffus-me/ComfyUI that referenced this pull request Nov 29, 2024
* fix --cuda-device arg for AMD/HIP devices

CUDA_VISIBLE_DEVICES is ignored for HIP devices/backend. Instead it uses HIP_VISIBLE_DEVICES. Setting this environment variable has no side effect for CUDA/NVIDIA so it can safely be set in any case and vice versa.

* deleted accidental if
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

Successfully merging this pull request may close these issues.

2 participants