Nodes/Realtime LoRA Trainer/Z-Image Analyzer + Selective Loader V2
ComfyUI Node

Z-Image Analyzer + Selective Loader V2

Block control plus strength scheduling in one node

By shootthesound·Created 8 months ago·Updated 2 months ago· 538
Z-Image Analyzer + Selective Loader V2
  • model
  • positive
  • negative
  • model
  • positive
  • negative
  • analysis
  • analysis_json
lora_name
strength1.00
presetDefault
layer_0true
layer_0_str1.00
layer_1true
layer_1_str1.00
layer_2true
layer_2_str1.00
layer_3true
layer_3_str1.00
layer_4true
layer_4_str1.00
layer_5true
layer_5_str1.00
layer_6true
layer_6_str1.00
layer_7true
layer_7_str1.00
layer_8true
layer_8_str1.00
layer_9true
layer_9_str1.00
layer_10true
layer_10_str1.00
layer_11true
layer_11_str1.00
layer_12true
layer_12_str1.00
layer_13true
layer_13_str1.00
layer_14true
layer_14_str1.00
layer_15true
layer_15_str1.00
layer_16true
layer_16_str1.00
layer_17true
layer_17_str1.00
layer_18true
layer_18_str1.00
layer_19true
layer_19_str1.00
layer_20true
layer_20_str1.00
layer_21true
layer_21_str1.00
layer_22true
layer_22_str1.00
layer_23true
layer_23_str1.00
layer_24true
layer_24_str1.00
layer_25true
layer_25_str1.00
layer_26true
layer_26_str1.00
layer_27true
layer_27_str1.00
layer_28true
layer_28_str1.00
layer_29true
layer_29_str1.00
context_refinertrue
context_refiner_str1.00
noise_refinertrue
noise_refiner_str1.00
final_layertrue
final_layer_str1.00
x_embeddertrue
x_embedder_str1.00
other_weightstrue
other_weights_str1.00
lora_path_opt
schedule_presetCustom
strength_schedule
save_refined_lorafalse
save_path
save_filename

What it is

This is the pack's V2 answer to needing both LoRA Loader + Analyzer and Selective LoRA Loader (Z-Image) wired together - it folds analysis and per-layer control into one node, then adds two things neither V1 node had: strength scheduling (vary the LoRA's influence across the denoising steps, not just a flat value) and a save-to-disk option that lets you bake your block selection into a new, smaller LoRA file. If you're doing serious LoRA surgery on Z-Image rather than a quick strength tweak, this is the node to reach for over its V1 predecessors.

It also passes positive/negative conditioning straight through, which is the tell that this node is meant to sit inline in your main sampling graph rather than off to the side - you wire your prompt conditioning through it the same way you'd wire model and clip.

How it works

Same block-impact scoring as LoRA Loader + Analyzer underneath - 0–100% per layer based on weight magnitude, with the same 30-layer map the author's own testing mapped out (identity concentrating in layers ~18–28, style earlier, plus an "other weights" bucket and four extra Z-Image-specific blocks: context_refiner, noise_refiner, final_layer, x_embedder). What's new is the scheduling: instead of one strength number, you can supply a step:strength sequence like 0:0,1:1 (linear fade-in across the generation) or 0:1,0.5:1,0.6:0,1:0 (full strength for the first half, then cut), picked from over 40 built-in presets covering fades, bell curves, and pulses, or typed by hand.

Inputs and outputs that matter

  • model, positive, negative, lora_name - this node sits inline with your conditioning, not just your model/clip.
  • strength - the base multiplier (-10 to 10), before any schedule is applied.
  • preset - the block-selection presets: Default, All Off, Half Strength, Late Only (20–29), Peak Impact (18–25), Face Priority, and more.
  • layer_0layer_29 (each with a _str slider), plus context_refiner, noise_refiner, final_layer, x_embedder, and other_weights - every one individually toggleable and reweightable.
  • schedule_preset and strength_schedule (optional) - pick a named schedule or write your own step:strength sequence to vary influence during generation.
  • save_refined_lora, save_path, save_filename (optional) - export your block-filtered result as a standalone LoRA file.
  • Optional lora_path_opt overrides the dropdown with a direct path.

Outputs: model, positive, negative (all patched/pass-through, wire straight into your sampler), analysis (readable report), analysis_json (chain into another node if needed).

Installing it

Works out of the box with the rest of the pack - no external backend required. ComfyUI Manager (search "Realtime LoRA Trainer") or:

cd ComfyUI/custom_nodes
git clone https://github.com/ShootTheSound/comfyUI-Realtime-Lora

Restart ComfyUI. The pack's workflows/Lora Analysis, Block and Model Editing/ folder has a dedicated "ADVANCED" demo workflow built around this exact node's scheduling.

Common issues

Scheduling syntax silently does nothing. The format is strict: comma-separated step:strength pairs, steps expressed as 0–1 fractions of the total generation, not step counts. 0:0, 1:1 is a valid linear fade-in; a typo or an out-of-range step number tends to fail quietly rather than error loudly - start from a named preset and modify it rather than writing the string from scratch.

Extra Z-Image blocks (context_refiner, noise_refiner, etc.) get overlooked. These four sit outside the numbered layer_0–29 range and don't show up in most presets by default - worth checking individually if a LoRA still bleeds unwanted style after you've tuned the numbered layers.

Forgot to wire positive/negative through. Because this node passes conditioning inline, a broken conditioning chain here breaks your whole sampling graph, not just the LoRA - if generation looks wrong in an unrelated way, check this node is actually in the conditioning path, not just the model path.

save_refined_lora produces an unexpectedly large or small file. The saved LoRA only contains the blocks you left enabled - a heavily pruned selection produces a smaller file than the source LoRA, which is expected, not a bug.

Categoryloaders/lora

Inputs (82)

NameTypeDefaultDescription
modelMODEL
positiveCONDITIONINGPositive conditioning from CLIP encode
negativeCONDITIONINGNegative conditioning from CLIP encode
lora_nameCOMBOLoRA file to load and analyze
strengthFLOAT1.00-10–10Overall LoRA strength (ignored when using schedule)
presetCOMBODefaultQuick preset selection. Individual toggles below override when changed.
layer_0BOOLEANtrue
layer_0_strFLOAT1.00-5–5
layer_1BOOLEANtrue
layer_1_strFLOAT1.00-5–5
layer_2BOOLEANtrue
layer_2_strFLOAT1.00-5–5
layer_3BOOLEANtrue
layer_3_strFLOAT1.00-5–5
layer_4BOOLEANtrue
layer_4_strFLOAT1.00-5–5
layer_5BOOLEANtrue
layer_5_strFLOAT1.00-5–5
layer_6BOOLEANtrue
layer_6_strFLOAT1.00-5–5
layer_7BOOLEANtrue
layer_7_strFLOAT1.00-5–5
layer_8BOOLEANtrue
layer_8_strFLOAT1.00-5–5
layer_9BOOLEANtrue
layer_9_strFLOAT1.00-5–5
layer_10BOOLEANtrue
layer_10_strFLOAT1.00-5–5
layer_11BOOLEANtrue
layer_11_strFLOAT1.00-5–5
layer_12BOOLEANtrue
layer_12_strFLOAT1.00-5–5
layer_13BOOLEANtrue
layer_13_strFLOAT1.00-5–5
layer_14BOOLEANtrue
layer_14_strFLOAT1.00-5–5
layer_15BOOLEANtrue
layer_15_strFLOAT1.00-5–5
layer_16BOOLEANtrue
layer_16_strFLOAT1.00-5–5
layer_17BOOLEANtrue
layer_17_strFLOAT1.00-5–5
layer_18BOOLEANtrue
layer_18_strFLOAT1.00-5–5
layer_19BOOLEANtrue
layer_19_strFLOAT1.00-5–5
layer_20BOOLEANtrue
layer_20_strFLOAT1.00-5–5
layer_21BOOLEANtrue
layer_21_strFLOAT1.00-5–5
layer_22BOOLEANtrue
layer_22_strFLOAT1.00-5–5
layer_23BOOLEANtrue
layer_23_strFLOAT1.00-5–5
layer_24BOOLEANtrue
layer_24_strFLOAT1.00-5–5
layer_25BOOLEANtrue
layer_25_strFLOAT1.00-5–5
layer_26BOOLEANtrue
layer_26_strFLOAT1.00-5–5
layer_27BOOLEANtrue
layer_27_strFLOAT1.00-5–5
layer_28BOOLEANtrue
layer_28_strFLOAT1.00-5–5
layer_29BOOLEANtrue
layer_29_strFLOAT1.00-5–5
context_refinerBOOLEANtrue
context_refiner_strFLOAT1.00-5–5
noise_refinerBOOLEANtrue
noise_refiner_strFLOAT1.00-5–5
final_layerBOOLEANtrue
final_layer_strFLOAT1.00-5–5
x_embedderBOOLEANtrue
x_embedder_strFLOAT1.00-5–5
other_weightsBOOLEANtrue
other_weights_strFLOAT1.00-5–5
lora_path_optoptSTRINGOptional: Override LoRA selection with a path
schedule_presetoptCOMBOCustomSelect a preset schedule (populates the text field below for editing)
strength_scheduleoptSTRINGStrength schedule: 0:.2,.5:.8,1:1.0 (step:strength pairs). Edit freely after selecting preset.
save_refined_loraoptBOOLEANfalseEnable to save the refined LoRA to disk
save_pathoptSTRINGDirectory to save refined LoRA
save_filenameoptSTRINGFilename for saved LoRA (timestamp auto-appended). Leave empty for auto-name.

Outputs (5)

NameTypeDescription
modelMODELModel with LoRA applied (filtered by enabled blocks).
positiveCONDITIONINGPositive conditioning (with hooks if using schedule).
negativeCONDITIONINGNegative conditioning (with hooks if using schedule).
analysisSTRINGPer-block analysis showing impact scores.
analysis_jsonSTRINGJSON analysis data for UI coloring.