Override CLIP Device [LP]
Force the text encoder onto CPU to free up VRAM
- clip
- CLIP
This node forces a loaded CLIP model onto a specific device - GPU or CPU - instead of letting ComfyUI's own automatic memory management decide. The classic reason to reach for it: you're tight on VRAM, and moving the text encoder off the GPU frees up room for the part that actually needs it, the diffusion model doing the sampling.
Why moving CLIP off GPU is a reasonable trade
Text encoding happens once at the start of a run - you encode your prompt, you get conditioning, and CLIP is done for the rest of that generation. The sampling loop that follows is where the real VRAM pressure lives, especially on SDXL- or Flux-class checkpoints where the UNet itself is already large. Forcing CLIP onto CPU for that one-time encoding pass costs you a bit of extra latency at the start (CPU text encoding is slower than GPU) in exchange for VRAM headroom during the part of the run that's actually GPU-bound. On an 8-12GB card, or any setup where you're brushing up against out-of-memory errors, that trade is often worth making.
How it works
ComfyUI already tracks which device each loaded model object lives on and moves things around automatically as needed. This node just overrides that decision for CLIP specifically: you tell it "cpu" and it pins the CLIP model there instead of letting ComfyUI's automatic placement put it wherever it thinks is best.
The inputs and outputs that matter
- device - a two-choice dropdown,
autoorcpu. Note the default iscpu, so dropping this node with default settings immediately forces CLIP off the GPU - you have to explicitly pickautoif you just want ComfyUI's normal behavior back. - clip - the CLIP model you're overriding, wired in from your checkpoint or CLIP loader.
- Output - CLIP, the same model object with its device pinned, which you then wire into your text-encode nodes exactly as you would the unmodified CLIP.
How to install it
ComfyUI Manager: search "ComfyUI Level Pixel" or ComfyUI-LevelPixel, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/LevelPixel/ComfyUI-LevelPixel.git
Restart ComfyUI. No models to download, no extra Python dependencies - this is a thin wrapper around ComfyUI's own device management.
Common issues & troubleshooting
Text encoding got noticeably slower and nothing else changed. That's expected - you traded CPU-encoding latency for VRAM. If the slowdown isn't worth it, switch the device back to auto.
You don't see much VRAM savings. CLIP is usually small relative to the UNet, so this mostly helps at the margin on already-tight setups. If your real bottleneck is a bigger vision encoder rather than the text encoder, the pack's OverrideCLIPVisionDevice-LP sibling node is likely to matter more - vision encoders used in IPAdapter- or reference-image-style workflows tend to be considerably heavier.
Things worked once, then broke after adding another VRAM-management node. If you're also running one of the multi-GPU or device-selector packs in the same graph, you can end up with two mechanisms fighting over where a model actually lives. Stick to one device-placement tool per model in a given workflow - mixing this node with another pack's device override on the same CLIP object is the classic way to get inconsistent, hard-to-reproduce behavior.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| device | COMBO | cpu | 2 options: auto, cpu |
| clip | CLIP | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CLIP | CLIP | — |