Nodes/ComfyUI_Streamv2v_Plus/Stream_Model_Loader
ComfyUI Node

Stream_Model_Loader

The 'checkpoint loader' that secretly builds a whole diffusers pipeline

By smthemex·Created 2 years ago·Updated 2 years ago· 12
Stream_Model_Loader
    • pipe
    • info
    ckpt_name
    scheduler
    use_sdxlfalse
    vae_id
    lcm_lora

    Stream_Model_Loader is the front door to ComfyUI_Streamv2v_Plus, and the first thing to understand about it is that it is not ComfyUI's checkpoint loader. The moment you run it, the pack loads your .safetensors into a full diffusers pipeline - StableDiffusionPipeline for SD1.5, StableDiffusionXLPipeline for SDXL - so it can hand that object to the vendored StreamDiffusion/StreamV2V engine later. That's why this one pack makes ComfyUI pull in a library (diffusers) it otherwise never touches. The "MODEL" output here is a diffusers pipe wearing a ComfyUI costume: wire it to a normal KSampler and you'll be confused. Wire it to the pack's own Stream_Lora_Loader and Stream_Sampler, and it all works.

    The mechanism is worth knowing because it explains the two "required" inputs. Internally it calls from_single_file() on your checkpoint, then swaps in whichever scheduler you picked, drops in a VAE if you gave one, and calls load_lora_weights(..., adapter_name="lcm") on your LCM LoRA. That last step is why the pack is fast: LCM is the latent consistency distillation that jumps to a result in a handful of steps instead of 20–50 (see the LCM section of the modidex distillation essay), and the whole real-time gimmick here depends on it. So the lcm_lora dropdown isn't optional decoration - the README says it plainly: "lcm loras是必需的", lcm LoRAs are required. Pick latent-consistency/lcm-lora-sdv1-5 for a 1.5 model or lcm-lora-sdxl for an XL, and have it in models/loras so it shows up in the list.

    The other fields that matter:

    • use_sdxl - flip it to true for an XL checkpoint. The pack then loads the SDXL config and swaps in StableDiffusionXLPipeline. Wrong setting means the model misassembles or crashes.
    • vae_id - a HuggingFace repo id, left blank by default so the community model's built-in VAE is used. But for SDXL the README insists on madebyollin/sdxl-vae-fp16-fix; SD1.5 is more forgiving (madebyollin/taesd or nothing).
    • scheduler - 19 choices, default LCM. If you're on a non-LCM LoRA workflow you'd pick accordingly, but honestly you're here for the fast path, so leave it.
    • ckpt_name - any single-file SD1.5/SDXL checkpoint from your models/checkpoints folder. The configs it assembles against are Lykon/dreamshaper-8 for 1.5 and stabilityai/stable-diffusion-xl-base-1.0 for XL.

    Outputs are pipe (MODEL) and info (STRING). Ignore the string's actual text - it's a semicolon-joined handoff like sdxl;modelname that the next two nodes split apart and pass down the chain. Just wire it into Stream_Lora_Loader and then Stream_Sampler.

    Install is the standard custom-node dance: ComfyUI Manager → search "ComfyUI_Streamv2v_Plus", or cd ComfyUI/custom_nodes && git clone https://github.com/smthemex/ComfyUI_Streamv2v_Plus, then restart ComfyUI. Then pip install -r requirements.txt (einops, av, peft, fire) - and expect to add more: the shipped code also imports diffusers, transformers, torchvision and opencv-python. ComfyUI doesn't bundle diffusers, so the author's own advice, "缺啥装啥" (install whatever's missing), is the real install doc. First run also downloads model configs from HuggingFace, so you need internet once.

    Two gotchas people actually hit: the PEFT error - "PEFT backend is required for this method" - is the classic sign to run pip install -U peft transformers. And a checkpoint without a proper VAE throws at decode time; for SDXL that's exactly what vae_id is for. This is a niche pack from smthemex, a prolific one-person node factory (EchoMimic, ParlerTTS, TwinFlow, a dozen more), so expect it maintained on "works for me" energy rather than polished.

    CategoryStreamV2V_Plus

    Inputs (5)

    NameTypeDefaultDescription
    ckpt_nameCOMBO0 options:
    schedulerCOMBO19 options: LCM, DDIM, Euler, Euler a, DDPM, DPM++ 2M, +13
    use_sdxlBOOLEANfalse
    vae_idSTRING
    lcm_loraCOMBO1 options: none

    Outputs (2)

    NameTypeDescription
    pipeMODEL
    infoSTRING