Nodes/ComfyUI_LC123_nodes/LC Model Optimizer (pipe) ⚡
ComfyUI Node

LC Model Optimizer (pipe) ⚡

One Loader, One Wire, Twenty-Five Values

By lonecatone23·Created 3 months ago·Updated about 7 hours ago· 46
LC Model Optimizer (pipe) ⚡
    • pipe
    • model
    • clip
    • vae
    • summary
    ◄base_modelKrea 2 (Turbo)►
    ◄goalOptimal►
    ◄model_file★ Recommended►
    ◄text_encoder★ Recommended►
    ◄vae★ Recommended►
    ◄speed_upsAuto►
    ◄attentionauto►
    ◄fp16_accumulationauto►
    ◄step_cacheauto►
    ◄torch_compileoff►
    ◄qwen21_cacheauto►
    ◄clip_typeauto►
    ◄spectrumauto►

    LC Model Optimizer (pipe) is the same loader as LC Model Optimizer with an LC_PIPE output bolted on the front. Same file pickers, same measured-on-your-machine recommendations, same speed-up panel. What changes is how it hands the result downstream - and whether you want that depends entirely on how you feel about wires.

    What's different

    Instead of model / clip / vae and a summary, you also get a pipe of type LC_PIPE, which bundles the whole context of a workflow in one object: model 1, clip 1, VAE 1, then model 2, clip 2, VAE 2, then image, mask, width, height, latent, batch, positive and negative prompt plus their conditioning, seed, total_steps, cfg_1, denoise, step_swap, cfg_2, sampler name, scheduler and detailer steps. Twenty-five slots in total.

    The pipe is the packing-layer answer to the same problem rgthree's Context and Efficiency Nodes' pipe solved years ago: a big workflow stops being forty wires and starts being one, so you can carry the entire state of a generation down the graph and unpack it only where you need it. LC's version pairs with LC Pipe Out, LC Pipe (in/edit), LC Sampler Configure (pipe) and LC Pipe Combine.

    The regular model, clip and vae outputs are still there, so nothing forces you to commit. On this particular node the second slot set isn't decoration either: model 2 is Ideogram 4's second model, which is why the pipe version is the one you reach for on Ideogram graphs.

    Why you'd pick it

    Three honest reasons:

    1. You're building or reading a large graph. One wire carrying everything is genuinely more legible than six parallel ones, and you can pack the pipe at the top and unpack at the bottom.
    2. You want the sampler settings to travel with the model. LC Sampler Configure Pipe Out unpacks an LC_PIPE into sampler sockets plus a latent, so steps, CFG, sampler and scheduler arrive from the same object that carried your weights.
    3. You're using the pack's other pipe nodes. Pipes are the pack's connective tissue, and mixing a pipe node with a spaghetti of individual wires gets you the worst of both.

    The reason not to: pipes are a one-way door. Every pack invented its own context type, and they don't interoperate - an LC_PIPE is not rgthree's Context and it's not a ComfyUI-Easy-Use pipe. Adopt one and your workflow is married to it.

    The failure mode (say it out loud once)

    Bundles hide what's inside them. The classic mistake is unpacking model off a pipe assembled before the node that applied your LoRA, silently running base weights because the wire looks connected and the contents are stale. With six wires you can see the LoRA isn't feeding the sampler. With one pipe, you can't - the connection is present and the value is wrong.

    Rule of thumb: keep explicit wires in the part of the graph you're actively iterating on, and use the pipe where the graph has settled.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/lonecatone23/ComfyUI_LC123_nodes.git
    

    Restart, or search ComfyUI LC123 Nodes in ComfyUI Manager. No pip step: the pack skips requirements.txt entirely and uses ComfyUI's own torch/numpy. If the pipe socket shows as missing type, your ComfyUI didn't reload the pack - a restart fixes that, and Ctrl+F5 clears the browser side after an update.

    Troubleshooting

    Everything in the plain optimizer node's bag of tricks applies here, since it's the same engine: gated Hugging Face downloads need the licence accepted and a local login or the run dies mid-queue, GGUF files need ComfyUI-GGUF installed, and a mismatched text encoder or VAE gets a ⚠️ read from the file header - it warns, it doesn't block.

    Pipe-specific: if downstream nodes behave as if a socket is empty, check whether the pipe reaching them was built before the value was set. And if you're feeding an old workflow, note that pipes carry fixed slots - a slot that didn't exist in the version that saved your workflow will simply be empty, not an error.

    CategoryLC123/optimizer

    Inputs (13)

    NameTypeDefaultDescription
    base_modelCOMBOKrea 2 (Turbo)The model family. Picks the recommended files and the checks.
    goalCOMBOOptimalQuality = closest to bf16. Optimal = fast and near identical. Fast = fastest that still looks right.
    model_fileCOMBO★ Recommended88 options: ★ Recommended, From checkpoint, None, ⬇ Download: anima-base-v1.0.safetensors, ⬇ Download: anima-base-v1.0-fp8.safetensors, ⬇ Download: anima-base-v1.0-int8convrot.safetensors, +82
    text_encoderCOMBO★ Recommended27 options: ★ Recommended, From checkpoint, None, ⬇ Download: qwen_3_06b_base.safetensors, ⬇ Download: qwen_3_8b.safetensors, ⬇ Download: qwen_3_8b_fp8mixed.safetensors, +21
    vaeCOMBO★ Recommended8 options: ★ Recommended, From checkpoint, None, ⬇ Download: qwen_image_vae.safetensors, ⬇ Download: flux2-vae.safetensors, ⬇ Download: flux2-vae_small.safetensors, +2
    speed_upsCOMBOAutoAuto = from the System & Model Optimization Report. Manual = choose each one below.
    attentionCOMBOautoAttention backend. auto = the fastest one that passed the report's test.
    fp16_accumulationCOMBOautoFaster fp16 math with a small quality cost. auto = Fast goal only.
    step_cacheCOMBOautoEasyCache: skips steps that barely change. auto = Fast goal, 20+ steps.
    torch_compileCOMBOoffCompiles the model: the first run is slow, later runs are faster. Needs Triton.
    qwen21_cacheCOMBOautoQwen-Image 2.1 only (Qwen Image 2.1 Cache): where the KV cache lives and how it is stored. auto = lossless, int8 on the Fast goal or cards under 16 GB. int8 halves the cache at about bf16 accuracy, int4 quarters it but roughly doubles the per-step error. RAM costs little speed. off = slowest.
    clip_typeCOMBOautoCustom only: how the text encoder is loaded (CLIPLoader's type). auto = from the encoder's shape when it matches one known base model. Ignored for the other base models and for a checkpoint's own encoder.
    spectrumoptCOMBOautoMOSS Image and Krea 2: Spectrum forecasts some steps instead of running them, with no visible change in our tests (MOSS about 1.7x, Krea 2 Turbo about 1.35x, Raw about 1.6x). Built in, nothing to install. auto = Optimal and Fast goals; the first 20% of the steps always run (the layout forms there) and it sits out runs under 8 steps. off = opt out (works with speed_ups on Auto too). Replaces the step cache when on.

    Outputs (5)

    NameTypeDescription
    pipeLC_PIPE—
    modelMODEL—
    clipCLIP—
    vaeVAE—
    summarySTRING—