Nodes/Comfyroll Studio/πŸ’Š CR Random Weight LoRA
ComfyUI Node Runs on cloud

πŸ’Š CR Random Weight LoRA

Randomize one LoRA's strength across a batch

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,298
πŸ’Š CR Random Weight LoRA
  • lora_stack
  • LORA_STACK
β—„stride1β–Ί
β—„force_randomize_after_strideβ–Ύβ–Ί
β—„lora_nameβ–Ύβ–Ί
β—„switchβ–Ύβ–Ί
β—„weight_min0.00β–Ί
β—„weight_max1.00β–Ί
β—„clip_weight1.00β–Ί

Where CR Random LoRA Stack randomizes which LoRAs fire, CR Random Weight LoRA takes a single LoRA and randomizes its strength. You give it one adapter and a min/max weight range, and each run it picks a model weight somewhere in that band. It's the fast way to answer "how strong should I run this LoRA?" - instead of manually rendering at 0.4, 0.6, 0.8, 1.0, you set the range once and let a batch sweep it for you.

This is genuinely useful because LoRA strength is the setting people get wrong most often. Too low and the concept barely shows; too high and it fries the image or overrides the checkpoint entirely. The old 0.5–0.8 sweet spot is SDXL-era folklore, and newer bases often need 1.0 or more before likeness holds - so the "right" number really is a per-LoRA experiment, which is exactly what this node automates.

How it works

Like the other Comfyroll LoRA nodes, it outputs a LORA_STACK - a description of the LoRA and its weight - that you hand to CR Apply LoRA Stack to actually patch the model. On each run it rolls a random model weight between weight_min and weight_max. The clip_weight is set separately and doesn't randomize. stride decides how many runs share the same rolled weight before a new one, and force_randomize_after_stride forces a fresh roll when the stride elapses. Queue a batch and you get a spread of strengths to eyeball side by side.

The inputs and outputs that matter

  • lora_name - the single LoRA to sweep, from your models/loras folder. (Only None in the dropdown means you have no LoRAs installed.)
  • weight_min / weight_max - the range the model weight is drawn from. This is the whole point; set it to bracket where you think the sweet spot is (say 0.4 to 1.0).
  • clip_weight - the fixed clip-side strength; usually left at 1.0.
  • stride - runs between re-rolls.
  • switch (Off/On) - master enable for this LoRA.
  • lora_stack (optional) - chain in an existing stack to extend it.

Output: LORA_STACK - into CR Apply LoRA Stack, not straight to the model.

How to install it

Comfyroll Studio (Suzie1 and RockOfFire), a mature utility pack - no bundled models, no heavy dependencies. Bring your own LoRAs in ComfyUI/models/loras.

  • ComfyUI Manager - search Comfyroll Studio, install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, then restart.

Also on CivitAI.

Common issues

The recurring trap is forgetting the apply step: this node emits a LORA_STACK that does nothing until Apply LoRA Stack consumes it. If weights aren't changing anything, that's usually why. An empty lora_name dropdown means no LoRA files present. And remember a LoRA is architecture-bound - an SDXL LoRA won't do anything on a Flux base no matter what weight you roll.

To actually see the sweep you need a batch; one image just shows one random weight. And if the node doesn't appear at all, that's the pack load failure: Comfyroll Studio: Failed to load ... plus NameError: name 'CR_HalftoneGrid' is not defined in the log - a symptom of a real import error (commonly an incompatible Pillow version from another custom node) that can take the whole pack down. Reinstall Pillow (pip install --upgrade --force-reinstall pillow) and restart.

Category🧩 Comfyroll Studio/✨ Essential/πŸ’Š LoRA

Inputs (8)

NameTypeDefaultDescription
strideINT11–1000β€”
force_randomize_after_strideCOMBO2 options: Off, On
lora_nameCOMBO1 options: None
switchCOMBO2 options: Off, On
weight_minFLOAT0.00-10–10β€”
weight_maxFLOAT1.00-10–10β€”
clip_weightFLOAT1.00-10–10β€”
lora_stackoptLORA_STACKβ€”

Outputs (1)

NameTypeDescription
LORA_STACKLORA_STACKβ€”