Nodes/ComfyUI-GPUCLIP/GPUClipDeviceSelector
ComfyUI Node

GPUClipDeviceSelector

One dropdown to decide where your text encoders live

By hum-ma·Created 7 months ago·Updated 7 months ago· 1
GPUClipDeviceSelector
    • device
    devicecpu

    This is the pack's utility node, and it does one tiny job: hand you a dropdown of every device ComfyUI can see and pass your choice out as a string you can wire around. That's it. No model loading, no prompt encoding, no mystery.

    GPUClipDeviceSelector is part of ComfyUI-GPUCLIP, the pack built to stop ComfyUI from silently loading text encoders on CPU (the console line CLIP/text encoder model load device: cpu). It's the one place in the pack where you make the "where do my encoders live" decision, instead of clicking the same dropdown inside every loader.

    What it actually does

    • device - the only input. A dropdown built from get_device_list(): cpu first, then cuda:0, cuda:1, and onward, plus xpu, npu, mps, and directml adapters if your setup has them. It defaults to your first GPU when one is present (the "cpu" default you might see in a scrape is just what it resolves to on a box with no accelerator).
    • device - the only output, same name, holding the string you picked. The output type is the same list of device names, which is what makes the wire work.

    You feed that output into the device input on the pack's single and dual GPU CLIP loaders (GPUCLIPLoader, GPUDualCLIPLoader, and their GGUF variants when ComfyUI-GGUF is installed). The payoff is on a multi-GPU machine or any graph with more than one encoder loader: pick cuda:1 once, and every loader in the workflow follows. Change your mind, change one dropdown, not five.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/hum-ma/ComfyUI-GPUCLIP
    

    then restart ComfyUI - or search "ComfyUI-GPUCLIP" in ComfyUI Manager. No models, no pip dependencies.

    The honest take

    If you run one GPU and one loader, you can skip this node entirely - the device dropdown on the loader itself does the same thing. Where it earns its keep: workflows with several CLIP loaders you want pointed at one GPU, or a shared template where you want the device choice up top where you can see it. It's also the cleanest way to see the pack's device list at a glance, which is a nicer way to debug "which GPU is ComfyUI even seeing" than reading torch's output.

    One caution: the device you select here only matters if something is wired to it. The pack's device forcing works through its global patch of ComfyUI's text_encoder_device - a lone selector sitting in your graph changes nothing, and on a tight-VRAM card pointing an encoder at the GPU can OOM when ComfyUI had deliberately offloaded it to CPU. Pick with intent, and remember the pack's real lever is the loaders it wraps.

    CategoryGPUCLIP

    Inputs (1)

    NameTypeDefaultDescription
    deviceCOMBOcpu1 options: cpu

    Outputs (1)

    NameTypeDescription
    devicecpu