Nodes/ComfyDL/Try All GPUs
ComfyUI Node

Try All GPUs

One node, every GPU on your machine, comma-separated

By Cynthia-lxx·Created 2 months ago·Updated 2 days ago· 6
Try All GPUs
    • device_str

    Got more than one GPU and want to know what you're actually working with? Try All GPUs is a zero-input node that counts your CUDA devices and returns every one of them as a comma-joined string - cuda:0,cuda:1 on a two-GPU box, or just cpu if you have no GPU at all. It's the pack's try_all_gpus() helper with nothing left to configure, and it exists so you can see your hardware situation and feed it downstream without memorizing device indices.

    Think of it as the inventory check before you split a model across devices. Where Try GPU answers "is my specific GPU available?", this one answers "what do I have?" - and then hands you the answer as a plain string you can read, wire into a display, or use as the basis for deciding how to parallelize. In a single-GPU machine it just returns cuda:0, which is a fine sanity check on first run to confirm ComfyUI is actually seeing your card. If that returns cpu when you know you have a GPU, the problem is upstream of this node - your torch build, your drivers, your CUDA setup - and this node is doing you the favor of telling you the truth.

    Inputs

    None. No widgets, no sockets on the input side. It's the kind of node you can drop on the canvas and run with zero thought.

    Output

    One output, device_str, type STRING. Comma-separated list of device strings, or cpu when no CUDA device is available.

    Installing it

    Part of ComfyDL. ComfyUI Manager, search "ComfyDL", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Cynthia-lxx/ComfyDL
    pip install -r ./ComfyDL/requirements.txt
    

    Restart ComfyUI. The pack only depends on matplotlib - no model downloads, no GPU-specific dependencies, nothing heavy.

    Gotchas

    The main thing to not do: don't expect this node to give you GPUs. It returns strings, and it's on you (or the downstream node) to act on them. The comma-separated format is the wire format for the rest of the pack, so wire it wherever a device list is expected rather than trying to parse it into something else.

    One genuinely useful diagnostic habit: on first install, drop Try All GPUs and Device Info next to each other and run. If Try All GPUs says cpu, you've got a torch/CUDA mismatch - and since this pack's only dependency is matplotlib, the mismatch is yours, not the pack's. That's the "did I set up my environment right" answer this node quietly provides. It's also a good reminder that this is a niche educational pack with no community threads behind it yet - but a device-count node has almost no surface area for bugs; the interesting failures are all in your environment, not the node.

    Categoryd2l/Device Utils

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    device_strSTRING