Nodes/ComfyUI_StoryDiffusion/StoryDiffusion_Apply
ComfyUI Node

StoryDiffusion_Apply

One dropdown, sixteen ways to keep a character consistent

By smthemex·Created 2 years ago·Updated 11 months ago· 514
StoryDiffusion_Apply
  • model
  • vae
  • info
  • CLIP_VISION
  • model
  • switch
infer_mode
photomake_ckpt
ipadapter_ckpt
quantize_mode
lora_scale0.8
extra_function

StoryDiffusion_Apply is the brain of the ComfyUI_StoryDiffusion pack. Every workflow in that pack starts here, and the whole point of it is the infer_mode dropdown: sixteen different ways to keep the same character (or two characters) across a sequence of images, all in one node. Same face in scene one and scene five, without training a LoRA. That's the pitch, and it mostly delivers.

The pack is smthemex's grab-bag of nearly every identity-preservation method that got a paper in 2024–2025 - StoryDiffusion's self-attention trick on SDXL, MS-Diffusion for two characters in one frame, PhotoMaker, PuLID-Flux, StoryMaker, InfiniteYou, UNO, RealCustom, InstantCharacter, DreamO, Bagel, OmniConsistency, Qwen-Image. Apply doesn't implement them itself; it dispatches. You pick a mode, it loads the right adapter into the model you fed in, and returns a patched MODEL plus a switch output that carries the mode's context to the pack's CLIPTextEncode and KSampler nodes downstream.

What you actually set

  • model and vae - the boring but load-bearing inputs. For story mode this is any SDXL checkpoint (juggernautXL-class). For the Flux modes (flux_pulid, infiniteyou, uno, instant_character, dreamo, flux_omi, bagel_edit) you feed a Flux UNet or GGUF instead. So don't expect one model to work for all sixteen modes.
  • infer_mode - the dropdown. story is the classic SDXL text-to-image path; classic is a pass-through that lets you wire the pack's multi-character conditioning into any normal ComfyUI flow (the README's "comfyUI classic" mode, useful for SD1.5/SD3.5 too); msdiffusion and story_maker / story_and_maker handle two characters in the same frame; flux_pulid, infiniteyou, uno, realcustom, instant_character, dreamo, qwen_image, flux_omi, bagel_edit, consistory, kolor_face are the rest. flux_pulid only runs image-to-image, and several modes need their specific checkpoints loaded in the photomake_ckpt / ipadapter_ckpt dropdowns.
  • photomake_ckpt - a dropdown over models/photomaker filtered to names containing "v1" or "v2" (TencentARC's photomaker-v1.bin / -v2.bin). You need one of these for story img2img.
  • ipadapter_ckpt - the catch-all adapter slot. Per mode this is ms_adapter.bin, pulid_flux_v0.9.0.safetensors, StoryMaker's mask.bin, RealCustom's .pth, the DreamO turbo LoRA, and so on.
  • quantize_mode - fp8 / nf4 / fp16, mainly for the Flux-family modes. nf4 is what makes DreamO/Bagel run on ~7-8GB.
  • lora_scale (0.1–1.0, default 0.8) and extra_function (free text - save with fp8 writes a quantized copy to disk; v1.0/v1.1 picks the DreamO variant).

The optional info input is where EasyFunction_Lite hands in the paths to repo-format checkpoints, GGUFs and CLIPs. The CLIP_VISION input is used by the PuLID, Kolors and StoryMaker paths - or you can leave it to the paths in info.

Outputs

  • model - the patched model that flows into StoryDiffusion_KSampler. In classic mode it's basically unchanged, which is the point.
  • switch - the DIFFCONDI dict. It carries the mode, adapter paths, CLIP vision and offload flags down the line. Wire it into StoryDiffusion_CLIPTextEncode's switch input.

Install and models

Install the pack once (ComfyUI Manager → search "ComfyUI_StoryDiffusion", or clone it), then the real cost is models - the README lists a different download section per mode, and some are heavy repo-format checkpoints (Kolors, Bagel, Flux transformer). Face-ID modes (flux_pulid, kolor_face, story_maker, infiniteyou, PhotoMaker v2) need pip install insightface and auto-download the antelopev2/buffalo_l face models. The author's own debugging advice is literal: "缺什么库就装什么" - whatever module is missing, pip install it.

cd ComfyUI/custom_nodes
git clone https://github.com/smthemex/ComfyUI_StoryDiffusion.git
cd ComfyUI_StoryDiffusion
pip install -r requirements.txt
pip install insightface   # only if you use the face-ID modes

Where people get burned

The pack is a power tool with a learning curve, and Apply is where most failures surface. Common ones: flux_pulid raising "PuLID can't link a normal comfyui model" because you fed it an SDXL checkpoint instead of a Flux UNet; kolor_face needing a repo path containing "kolor" in EasyFunction_Lite; bagel_edit needing the Bagel repo filled in too; realcustom refusing without a checkpoint in ipadapter_ckpt. And if you use a face-ID mode without insightface installed, it dies at the insightface import. The pack auto-manages VRAM offload (<17GB gets aggressive offloading), so slow-but-working is normal on 12GB cards.

Honest take: this is a jack-of-all-modes node, and some of those modes are thin wrappers around research repos that never became polished. For pure face consistency on SDXL, story with PhotoMaker is the most battle-tested path here. Use that one to learn the graph, then branch out.

CategoryStorydiffusion

Inputs (10)

NameTypeDefaultDescription
modelMODEL
vaeVAE
infer_modeCOMBO16 options: story, classic, flux_pulid, infiniteyou, uno, realcustom, +10
photomake_ckptCOMBO1 options: none
ipadapter_ckptCOMBO1 options: none
quantize_modeCOMBO3 options: fp8, nf4, fp16
lora_scaleFLOAT0.80.1–1
extra_functionSTRING
infooptSTORY_CONDITIONING_1
CLIP_VISIONoptCLIP_VISION

Outputs (2)

NameTypeDescription
modelMODEL
switchDIFFCONDI