ComfyUI Node

Loader Core

A LoRA test rig and model loader in one node

By sickollie·Created 2 months ago·Updated 7 days ago· 19
Loader Core
    • model
    • diffusion_model_file
    • diffusion_model_stem
    • main_file
    • raw_stem
    • clean_name
    • applied_loras
    • main_active
    • folder_count
    • main_trigger
    • main_folder
    diffusion_model
    weight_dtypedefault
    folder_name[All LoRA folders]
    epoch_filter[All epochs]
    main_enabledtrue
    main_loraNone
    main_strength1.00
    include_subfoldersfalse
    loop_foldertrue
    control_after_generateincrement
    skip_none_during_cycletrue
    off_nameno_lora
    auto_clean_nametrue
    cleanup_rulesauto:1

    The whole SickOllie pack exists to make LoRA testing repeatable, and Classic Loader Core (SOLoaderCoreEngine) is where that starts. It's a model loader that also runs a LoRA test rig: it loads a diffusion model, applies a primary LoRA from a folder pool, cycles that pool the way a KSampler cycles seeds, then stacks a dynamic secondary LoRA list on top. And because the rest of the pack needs to know what's loaded, it exposes the file names, clean names, folder, and trigger as outputs instead of hiding them inside.

    How it works

    You pick a diffusion_model and the node loads it internally before any LoRA work. The primary LoRA is the test subject: folder_name restricts the cycling pool to one folder, epoch_filter narrows to a detected epoch (it groups epoch1, epoch_1, epoch-01, and epoch 001 under one canonical number), and control_after_generate - fixed, increment, decrement, randomize, or shuffle - decides how the selection advances after each run. loop_folder keeps the cycle bounded to the folder; skip_none_during_cycle jumps over the "no LoRA" state while cycling; off_name is the filename that means "none" (default no_lora). There's even include_subfolders if your library is nested.

    The secondary LoRA stack is where rgthree-comfy comes in: Loader Core imports rgthree's enhanced LoRA chooser and model-information interface directly, so it's a hard dependency for the fuller interface. Strengths apply per entry, and everything is summarized in an applied_loras string for downstream metadata.

    On the identity side, auto_clean_name runs a cleanup (default rules auto:1) to turn a raw filename into a prompt-friendly clean_name, while the exact filename is kept separately as raw_stem. And the node gathers trigger evidence - safetensors trigger metadata, ss_tag_frequency candidates, adjacent Civitai sidecars, and an exact SHA-256 Civitai version lookup - to populate main_trigger. It's deliberately conservative: short, safe candidates auto-select, while long weighted recipe-like trained words are shown for review but not injected automatically.

    Inputs and outputs that matter

    Set: diffusion_model, weight_dtype (default, or fp8_e4m3fn / fp8_e4m3fn_fast / fp8_e5m2), folder_name, main_lora, main_strength, and control_after_generate. Wire out: model (to Generation Core), plus the context strings - clean_name (to Prompt Core's NAME), main_trigger (to TRIGGER), raw_stem, main_file, main_folder, applied_loras, diffusion_model_file, and diffusion_model_stem, with main_active and folder_count for logic.

    Installing it

    Part of the SickOllie pack, plus one friend:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sickollie/SickOllie
    

    or ComfyUI Manager → "SickOllie". Then make sure rgthree-comfy is installed alongside it - the enhanced secondary-LoRA chooser and the model-info dialog come from there. Restart and Ctrl+F5.

    Where people get burned

    Two classics. First, if the secondary-LoRA interface or info dialog is missing, rgthree-comfy isn't installed or is stale - update it, restart, hard-refresh. Second, control_after_generate fires after the run, same as stock KSampler's seed control: the LoRA shown is the one that runs next, not the one that just produced the image, so flip it to fixed before you change anything if you liked what you saw. And don't expect main_trigger to be magic - if Civitai can't match the file's exact hash, the trigger won't resolve, and the node is honest about leaving it blank rather than guessing.

    CategorySick Ollie/Classic

    Inputs (14)

    NameTypeDefaultDescription
    diffusion_modelCOMBODiffusion model loaded internally before LoRAs.
    weight_dtypeCOMBOdefault4 options: default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2
    folder_nameCOMBO[All LoRA folders]Restrict the primary cycling LoRA to this folder.
    epoch_filterCOMBO[All epochs]Optionally restrict the selected folder to one detected epoch. Forms such as epoch1, epoch_1, epoch-01, and epoch 001 are grouped under the same canonical Epoch number.
    main_enabledBOOLEANtrueEnable or disable the primary LoRA.
    main_loraCOMBONonePrimary LoRA used for folder batch testing.
    main_strengthFLOAT1.00-100–100
    include_subfoldersBOOLEANfalse
    loop_folderBOOLEANtrue
    control_after_generateCOMBOincrement5 options: fixed, increment, decrement, randomize, shuffle
    skip_none_during_cycleBOOLEANtrue
    off_nameSTRINGno_lora
    auto_clean_nameBOOLEANtrue
    cleanup_rulesSTRINGauto:1

    Outputs (11)

    NameTypeDescription
    modelMODEL
    diffusion_model_fileSTRING
    diffusion_model_stemSTRING
    main_fileSTRING
    raw_stemSTRING
    clean_nameSTRING
    applied_lorasSTRING
    main_activeBOOLEAN
    folder_countINT
    main_triggerSTRING
    main_folderSTRING