Nodes/RES4LYF/CLIPTextEncodeFluxUnguided
ComfyUI Node Runs on cloud

CLIPTextEncodeFluxUnguided

Encode a Flux prompt without baking in guidance

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
CLIPTextEncodeFluxUnguided
  • clip
  • conditioning
  • clip_l_end
  • t5xxl_end
clip_l
t5xxl

If you've ever run a de-distilled Flux model and wanted real CFG back - an actual positive-vs-negative tug instead of Flux's baked-in guidance number - this is the encoder for it. CLIPTextEncodeFluxUnguided is RES4LYF's take on the standard Flux dual-encoder, with the "guidance" embedding left out. That omission is the whole point.

Some background. Flux Dev is a guidance-distilled model: instead of running classifier-free guidance the normal way (two forward passes, positive and negative, blended by CFG), it was trained to accept a single guidance value baked into the conditioning, and you run at CFG 1.0. Convenient, fast, but it flattens contrast and takes real CFG off the table. The RES4LYF docs make the case directly: with de-distilled Flux models, encoding your prompt without Flux guidance and running CFG around 3.0 gives a genuinely nicer result. This node is how you produce that un-guided conditioning.

How it works

Flux uses two text encoders - CLIP-L for short keyword-style text and T5-XXL for longer natural language. This node takes both prompts, runs them through the clip you provide, and produces a combined CONDITIONING with no guidance value attached. Because there's no baked guidance, the conditioning responds to CFG the way a normal model does, so a negative prompt and a CFG above 1 actually do something again. It also reports where each prompt's tokens end, which is useful when you're stitching multiple conditionings together for regional or temporal work.

The inputs and outputs that matter

  • clip (CLIP) - your dual Flux CLIP (CLIP-L + T5). Required.
  • clip_l (STRING, multiline) - the CLIP-L prompt; keep it short and keyword-ish.
  • t5xxl (STRING, multiline) - the T5 prompt; this is where longer, descriptive language goes.

Outputs:

  • conditioning (CONDITIONING) - wire it into your sampler's positive (and encode a separate negative the same way if you're using CFG > 1).
  • clip_l_end and t5xxl_end (INT) - the token end positions for each encoder, handy for advanced conditioning setups that need to know where one prompt's tokens stop.

How to install it

ComfyUI Manager: search RES4LYF, install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/ClownsharkBatwing/RES4LYF/, activate your venv, pip install -r requirements.txt (portable ComfyUI: embedded python's pip), restart, hard-refresh with F5. For the nested sampler menu, add rgthree-comfy with "Auto Nest Subdirectories" on.

Common issues

The number-one mistake is using this on stock Flux Dev and leaving CFG at 1.0. At CFG 1 there's no guidance happening at all - not the baked kind (you removed it) and not the classifier-free kind (CFG 1 disables it) - so your image goes weak and washed out. If you use the unguided encoder, you have to actually raise CFG (3.0 is the docs' suggestion) and ideally supply a negative prompt, or the whole exercise is pointless. Higher CFG also means more compute per step, since you're back to running a negative pass.

The bigger caveat: this shines on de-distilled Flux checkpoints, the community models retrained to drop the distillation. On vanilla guidance-distilled Flux Dev, the intended path is still the normal guided encode at CFG 1 with a FluxGuidance value - this node isn't a free upgrade there, and pushing CFG on a distilled model can oversaturate. Know which kind of Flux you're running before you reach for it. If you're on stock Flux Dev and happy, you don't need this.

CategoryRES4LYF/conditioning

Inputs (3)

NameTypeDefaultDescription
clipCLIP
clip_lSTRING
t5xxlSTRING

Outputs (3)

NameTypeDescription
conditioningCONDITIONING
clip_l_endINT
t5xxl_endINT