ComfyUI Node

Conditioning Unfreeze

Stop paying for the same text encode twice

By nova452·Created 3 months ago·Updated a day ago· 524
Conditioning Unfreeze
    • conditioning
    ◄filenameconditioning.pt►

    If you installed this pack for the Krea 2 rebalance node - the one that got posted to r/StableDiffusion as "this custom node removes the built-in Krea 2 safety filter" - you now have about forty unfamiliar nodes sitting in your right-click menu. This is one of the boring ones, and it's the one I actually use most.

    What Conditioning Unfreeze does

    It loads a CONDITIONING object back off disk. That's the whole node.

    The point is its partner, Conditioning Freeze, which saves one. Together they let you compute a conditioning tensor once - the expensive part, a Qwen3-VL text encode with a long edit prompt and three reference images attached - dump it to a .pt file, and then reuse that exact tensor on every subsequent run instead of re-encoding it.

    You reach for it in three situations:

    • Iteration. You're tweaking sampler settings, seed, or LoRA strength on a prompt that takes several seconds to encode. Freeze the encode, sample nothing but the sampler.
    • Reproducibility. A frozen conditioning is a fixed input. If two runs differ, it isn't because the text encoder drifted.
    • Saving a rebalanced conditioning. Same pack, different node: Conditioning Krea 2 Rebalance rewrites conditioning to push past the model's built-in refusals. If you've hand-tuned values you like, freezing the result means you're not relying on the node to land on the same output twice.

    How it works

    Raw conditioning is a list of [tensor, dict] pairs produced by a text encoder. Nothing in a normal workflow persists it - re-run the graph and the encoder fires again. Conditioning Freeze calls torch.save on that object into ComfyUI/input/conditioning/, and Conditioning Unfreeze calls torch.load(..., map_location="cpu") on it. Straight pickle round-trip, no cleverness in between.

    The path is derived, not chosen: it's folder_paths.get_input_directory() plus /conditioning/. You can't point it somewhere else, and there's no upload widget or dropdown for the file - the filename is a plain text field.

    Inputs and outputs

    One input, one output.

    • filename - a STRING, default conditioning.pt. If you forget the extension it appends .pt for you, so both conditioning and conditioning.pt work. It's case-sensitive on Linux, and since there's no dropdown, a typo gets you a full-path error rather than a helpful list.
    • conditioning (CONDITIONING) - wire it into a sampler's positive or negative input, or into a merge node like the pack's Conditioning Merge or core's Conditioning (Combine). It is not an output node, so on its own it does nothing; something downstream has to consume it or it never runs.

    Installing it

    It ships with the Rebalance Pack, so you either have it or you don't.

    In ComfyUI Manager, search Rebalance Pack (publisher nova452) and install. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/nova452/Rebalance-Pack.git
    # restart ComfyUI
    

    Two things worth knowing. First, the repository was renamed - older links, including half the tutorials on the internet, point at ComfyUI-ConditioningKrea2Rebalance. GitHub redirects, so both clone fine, and it's the same pack. Second, this pack needs nothing: there's no requirements.txt, no install script, and no model downloads. Its only imports are torch, numpy and Pillow, all of which ComfyUI already ships. Install it and it works, which is more than you can say for most packs.

    Where it bites

    "Conditioning file not found: /home/you/ComfyUI/input/conditioning/thing.pt" is the error you'll hit first, and it always means the same thing: you never ran Conditioning Freeze with that name. The conditioning/ folder doesn't exist until the first freeze creates it. Read the path in the error - that's the folder you're actually reading from, which is how you discover you've been saving into a different ComfyUI install.

    Stale tensor on re-freeze. This node doesn't declare an IS_CHANGED method, so ComfyUI caches it on its inputs - and its only input is the filename string. Save new conditioning over conditioning.pt and the unfreeze can happily hand you the old tensor, because from the cache's point of view nothing changed. Rename the file, or force the graph dirty. Compare with Load Image Full in the same pack, which hashes the file's path and mtime specifically to avoid this.

    Don't treat a .pt as portable. The tensor is tied to the encoder that made it and the model it was made for. Sending someone your frozen Krea 2 conditioning and expecting it to work against a different text encoder gets you a shape error at best and confident garbage at worst. It's not a LoRA; it's a cache of one machine's math.

    And a housekeeping note: those files live in ComfyUI/input/, next to your source images. They're tensors, not small. Everybody eventually finds a 200MB conditioning.pt sitting in there.

    CategoryRebalance-Pack/conditioning

    Inputs (1)

    NameTypeDefaultDescription
    filenameSTRINGconditioning.pt—

    Outputs (1)

    NameTypeDescription
    conditioningCONDITIONING—