Nodes/LCM_Inpaint_Outpaint_Comfy/LCMLoraLoader_ipadapter
ComfyUI Node

LCMLoraLoader_ipadapter

The loader with an LCM on/off switch

By taabata·Created 3 years ago·Updated 2 years ago· 259
LCMLoraLoader_ipadapter
    • class
    device
    tomesd_value0.60
    ip_adapter_model
    reference_only
    ip_adapter
    control_net
    model_name
    controlnet_model
    LCM_enable

    LCMLoraLoader_ipadapter is the loader for the LCMLora_ipadapter generate node, and its defining feature is a switch most loaders don't have: LCM_enable. Set it to enable and the loader swaps in the LCM scheduler and fuses the LCM-LoRA, giving you 4-step generation. Set it to disable and you get a plain DDIM pipeline - the same model, slower, but with the full quality of a normal diffusion pass. Same node, two entirely different animals.

    That switch exists because the generate node it feeds defaults to CFG 8, which is nonsense for LCM but right for normal img2img. The author wanted both paths usable from one workflow, and honestly, having the choice in one loader is handy - you can iterate at LCM speed and drop to full quality for finals without rebuilding the graph.

    Beyond the switch, it's the most configurable loader in the pack: controlnet, reference-only, and IP-Adapter each have a toggle, and it builds whichever pipeline combination those toggles describe.

    How it works

    It reads four toggles - control_net, reference_only, ip_adapter, LCM_enable - and picks a diffusers pipeline class to match. With control_net on it loads your chosen ControlNet from models/controlnet/ and uses a controlnet img2img pipeline (with an optional TAESD from models/vae/taesd for fast previews); with ip_adapter on it loads the adapter model from models/controlnet/IPAdapter/models/. Then LCM_enable decides the scheduler: LCM + fused LoRA from models/loras/pytorch_lora_weights.safetensors, or a plain DDIMScheduler. ToMe and CPU offload are applied last.

    The critical rule: the toggles here and the toggles on LCMLora_ipadapter must match, because the generate node passes flags into whatever pipeline this loader built.

    The inputs that matter

    • model_name - dropdown of diffusers folders in models/diffusers/ (your base).
    • controlnet_model - folder dropdown from models/controlnet/. Only used when control_net is enabled, but it's required either way.
    • ip_adapter_model - file dropdown from models/controlnet/IPAdapter/models/; pick one when ip_adapter is on.
    • LCM_enable - enable/disable. The speed/quality switch. Enable → LCM scheduler + fused LCM-LoRA; disable → DDIM.
    • control_net, reference_only, ip_adapter - the three conditioning toggles.
    • device, tomesd_value - the usual.

    Output: the class pipeline wire for LCMLora_ipadapter.

    How to install it

    Same pack, same one-time install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/taabata/LCM_Inpaint-Outpaint_Comfy
    cd LCM_Inpaint-Outpaint_Comfy
    pip install -r requirements.txt
    

    Or ComfyUI Manager → "LCM_Inpaint_Outpaint_Comfy" → restart. Files: base diffusers model in models/diffusers/, ControlNet folder in models/controlnet/, IP-Adapter model in models/controlnet/IPAdapter/models/, and - for LCM_enable - pytorch_lora_weights.safetensors in models/loras/.

    Common issues

    The toggle-mismatch trap is the big one: build the loader with LCM_enable on but forget the LoRA file, and it errors at load; enable ip_adapter on the generate node while the loader never loaded one, and the run fails. Decide your combination once, on both nodes.

    Also remember the CFG implication of LCM_enable - the generate node defaults to 8.0, which is DDIM territory. Turn LCM on and you should be down around 1.8. Nothing about this pack will tell you that; it's just the math of the two schedulers.

    CategoryLCM_Nodes/nodes

    Inputs (9)

    NameTypeDefaultDescription
    deviceCOMBO2 options: GPU, CPU
    tomesd_valueFLOAT0.600–1
    ip_adapter_modelCOMBO0 options:
    reference_onlyCOMBO2 options: disable, enable
    ip_adapterCOMBO2 options: disable, enable
    control_netCOMBO2 options: disable, enable
    model_nameCOMBO0 options:
    controlnet_modelCOMBO0 options:
    LCM_enableCOMBO2 options: disable, enable

    Outputs (1)

    NameTypeDescription
    classclass