mirror of
https://github.com/Comfy-Org/desktop.git
synced 2026-11-04 23:47:43 +00:00
[GH-ISSUE #895] How to Launch Comfy UI Desktop with Specific GPU (e.g., GPU 1)? #245
Labels
No labels
area: desktop-app
Bounty
bug
bug-cop:answered
bug-cop:response-received
component: installer
component: preload
custom node
dependencies
Design
documentation
duplicate
enhancement
expected
frontend
good first issue
installation
Low-Priority
performance
Planned
platform: cross-platform
platform: windows
Potential Bug
Potential Bug
pull-request
question
refactor
Release
stale
User Support
V1
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/desktop#245
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Lionnn107 on GitHub (Feb 13, 2025).
Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/895
Could you please tell me how to launch Comfy UI Desktop with GPU 1? In the portable version, I did it like this: "set CUDA_VISIBLE_DEVICES=1", but I've been trying to figure it out on the desktop version for two days now, and none of the solutions I found online worked for me.
┆Issue is synchronized with this Notion page by Unito
@dosubot[bot] commented on GitHub (Feb 13, 2025):
Hey @Lionnn107! 👋 I'm here to help you with any bugs, questions, or contributions you have. If you need assistance, feel free to ask!
The ComfyUI Desktop application does not have explicit documentation or command-line arguments for setting a specific GPU directly. However, you can try setting the
CUDA_VISIBLE_DEVICESenvironment variable before launching the application, similar to what you did with the portable version. This environment variable is a standard way to specify which GPU to use in CUDA applications.Here's how you can do it:
set CUDA_VISIBLE_DEVICES=1(on Windows) orexport CUDA_VISIBLE_DEVICES=1(on Linux/Mac).This method should help the application recognize and use the specified GPU. If this doesn't work, it might be due to how the desktop application is packaged or executed, which could ignore the environment variable settings.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other | Bug Report
@Lionnn107 commented on GitHub (Feb 13, 2025):
Thank you, this helped me a lot.
@dosubot[bot] commented on GitHub (May 15, 2025):
Hi, @Lionnn107. I'm Dosu, and I'm helping the desktop team manage their backlog. I'm marking this issue as stale.
Issue Summary:
CUDA_VISIBLE_DEVICESenvironment variable before launching the application.Next Steps:
Thank you for your understanding and contribution!