ComfyUI Node

Style Loader

One node that replaces your whole model-loading cluster — driven by JSON files

By relhamdi·Created 7 months ago·Updated 2 months ago· 1
Style Loader
    • model
    • clip
    • vae
    • quality_tags
    • extra_quality_tags
    • negative_tags
    • steps
    • refiner_step
    • cfg
    • sampler
    • scheduler
    style_file
    checkpoint
    vaenone
    clip_skip-2
    loras_data[]
    quality_tags
    extra_quality_tags
    negative_tags
    steps15
    refiner_step24
    cfg4.00
    samplereuler_ancestral
    schedulernormal

    Every time you switch from, say, an anime checkpoint to a realism one, you rebuild the same little cluster: checkpoint loader, CLIP skip, two LoraLoaders, and the sampler settings that go with each. StyleLoader collapses all of that into one node driven by a JSON file per "style." Pick a style from the dropdown and it loads the right checkpoint, VAE, LoRAs and clip skip, and hands you the sampler parameters and quality tags to go with them.

    It's the heavyweight of ComfyUI-RE-CustomUtils, and the one that feels like the author built it for their own workflow.

    How it works

    Under the hood it uses ComfyUI's own loading machinery - load_checkpoint_guess_config (the same config-guessing loader as a normal checkpoint node, so SD1.5, SDXL and newer architectures all work), an optional VAE override, clip.clip_layer() for skip, and load_lora_for_models for the LoRA stack. Nothing exotic, no external models, no API. A style file is just JSON:

    {
      "checkpoint": "model.safetensors",
      "vae": "none",
      "clip_skip": -2,
      "loras": [ { "name": "lora.safetensors", "weight": 0.8 } ],
      "quality_tags": "masterpiece, best quality",
      "extra_quality_tags": "perfect face",
      "negative_tags": "worst quality, low quality",
      "steps": 15,
      "refiner_step": 24,
      "cfg": 4.0,
      "sampler": "euler_ancestral",
      "scheduler": "karras"
    }
    

    LoRAs accept a single weight (applied to both model and clip) or separate model_weight/clip_weight. Drop a PNG/JPG with the same name as the style next to the file and it shows up as a preview image in the editor - a nice touch for remembering what each style actually looks like.

    The inputs and outputs

    Inputs: style_file dropdown, checkpoint, vae (none = use the checkpoint's built-in), clip_skip (default -2, -1 disables), loras_data (internal), the three tag fields, and the sampler settings - steps, refiner_step, cfg, sampler, scheduler.

    Outputs: model, clip, vae, plus quality_tags, extra_quality_tags, negative_tags, and every sampler parameter (steps, refiner_step, cfg, sampler, scheduler) as plain values. That's the routing pattern: model/clip/vae go to a KSampler, the sampler params wire into that KSampler's own inputs, and the tags feed your prompt encoder. This node loads and routes - it doesn't sample for you.

    A word on clip skip, since this node defaults to -2: that's the anime-lineage convention (Pony, Illustrious, NoobAI all expect it). It's genuinely load-bearing on SD1.5 anime models. On SDXL it's nearly inert - SDXL already conditions on the penultimate layer, so the setting does little. If your style isn't an anime model, -1 is usually the honest choice.

    Managing styles

    The header buttons handle everything: ➕ New (blank template), 💾 Save (write current widget values to the file), 📋 Clone (save as a new file), 🗑️ Delete. Checkpoints, VAEs, LoRAs and samplers all come from ComfyUI's own model folders, with native search on the dropdowns. New files created in the editor appear immediately; files you add to the folder yourself need a page refresh.

    Installing it

    It's part of ComfyUI-RE-CustomUtils. ComfyUI Manager → search the pack, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/relhamdi/ComfyUI-RE-CustomUtils
    

    Restart ComfyUI. No extra Python dependencies - the pack only declares torch - but you do need your checkpoints/VAEs/LoRAs in ComfyUI's standard models/ folders, since this node reads those directly.

    Where people get burned

    • The folder. Style files live in ComfyUI-RE-CustomUtils/data/styles/ (the README sometimes writes src/data/styles/, but the code resolves to the pack-root data/). Wrong place = empty dropdown.
    • Missing LoRAs are silent. If a LoRA name isn't in your models/loras/, the node prints a console warning and skips it - no error. Your style silently loads without part of its stack. If output looks off, check the console.
    • Missing checkpoints are not silent. Unknown checkpoint = hard error, which is the right behavior.
    • F5 for external files. Styles added by hand only appear after a browser refresh.

    Is it a substitute for learning the standard loader nodes? No, and it's not meant to be - you'll still want the plain building blocks for one-off work. But for "here are my five go-to setups, and I want to switch between them by clicking one dropdown," this is the cleanest version of that idea in the pack.

    CategoryRE-CustomUtils

    Inputs (13)

    NameTypeDefaultDescription
    style_fileCOMBO1 options: --
    checkpointCOMBO0 options:
    vaeCOMBOnone1 options: none
    clip_skipINT-2-24–-1-1 = No clip skip
    loras_dataSTRING[]
    quality_tagsSTRING
    extra_quality_tagsSTRING
    negative_tagsSTRING
    stepsINT151–150
    refiner_stepINT241–150
    cfgFLOAT4.000–30
    samplerCOMBOeuler_ancestral44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
    schedulerCOMBOnormal9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3

    Outputs (11)

    NameTypeDescription
    modelMODEL
    clipCLIP
    vaeVAE
    quality_tagsSTRING
    extra_quality_tagsSTRING
    negative_tagsSTRING
    stepsINT
    refiner_stepINT
    cfgFLOAT
    samplereuler,euler_cfg_pp,euler_ancestral,euler_ancestral_cfg_pp,heun,heunpp2,exp_heun_2_x0,exp_heun_2_x0_sde,dpm_2,dpm_2_ancestral,lms,dpm_fast,dpm_adaptive,dpmpp_2s_ancestral,dpmpp_2s_ancestral_cfg_pp,dpmpp_sde,dpmpp_sde_gpu,dpmpp_2m,dpmpp_2m_cfg_pp,dpmpp_2m_sde,dpmpp_2m_sde_gpu,dpmpp_2m_sde_heun,dpmpp_2m_sde_heun_gpu,dpmpp_3m_sde,dpmpp_3m_sde_gpu,ddpm,lcm,ipndm,ipndm_v,deis,res_multistep,res_multistep_cfg_pp,res_multistep_ancestral,res_multistep_ancestral_cfg_pp,gradient_estimation,gradient_estimation_cfg_pp,er_sde,seeds_2,seeds_3,sa_solver,sa_solver_pece,ddim,uni_pc,uni_pc_bh2
    schedulersimple,sgm_uniform,karras,exponential,ddim_uniform,beta,normal,linear_quadratic,kl_optimal