Nodes/ComfyUI_PromptStudio/LoRA Studio Comparison Checkpoint
ComfyUI Node

LoRA Studio Comparison Checkpoint

The node behind LoRA Studio's 'Compare checkpoints'

By tiko13·Created 3 months ago·Updated 12 days ago· 8
LoRA Studio Comparison Checkpoint
  • model
  • MODEL
◄checkpoint_id—►
◄strength1.00►

Training a LoRA hands you a pile of checkpoints - every N steps, plus a final - and the only honest way to choose is to render one prompt at one seed through all of them and squint. LoRA Studio (tiko13's AI Toolkit front end) calls that Compare checkpoints, and PS_LoraStudioCheckpoint is the node ComfyUI needs on the other end to make it work.

First thing to know: you don't wire it, and there is no file picker. The checkpoint_id input is an opaque 32-hex string minted at runtime by a registration handshake between the two apps. Type a filename into it and you get an error, not a LoRA. It exists so a comparison grid can load a just-trained checkpoint without that checkpoint ever appearing in your LoRA library.

How it works

The mechanism is deliberately narrow, and that's the point.

LoRA Studio snapshots the checkpoints you ticked into its own managed store (comparisons/<id>/weights/<sha256>.safetensors). For each one it calls Prompt Studio's POST /promptstudio/lora-studio/register with its loopback origin and a one-use token; Prompt Studio calls back to /api/comparison-bridge, checks the app name and bridge protocol version, confines the returned path, verifies the file's SHA-256, and hands back a random checkpoint_id. The node accepts only that ID - never a caller-supplied path - so a workflow JSON can't be used to load arbitrary files.

At run time it re-checks the file's size and mtime, then patches the model:

self._weights = comfy.utils.load_torch_file(str(item['path']), safe_load=True)
patched, _ = comfy.sd.load_lora_for_models(model, None, self._weights, strength, 0)

Same machinery a LoraLoader uses, minus the folder scan - no filenames, no LoRA folder, no library clutter. Weights are cached per ID, so a grid's seeds and strength variants don't re-read the file every cell. The registry is in memory only: restart ComfyUI and every ID is dead - "Checkpoint registration expired. Retry the comparison in LoRA Studio."

While a comparison runs the bridge holds ComfyUI's queue for it, so a 12-checkpoint by 3-seed grid doesn't interleave with your own prompts; if LoRA Studio dies mid-grid, the lease expires after 30 seconds and the queue moves again.

The inputs that matter

Three, and you'll only ever adjust one.

  • model - the MODEL wire from your checkpoint or UNet loader. This is a patch passthrough, so it sits exactly where a LoRA loader sits, between loader and sampler.
  • checkpoint_id - the registered snapshot ID. LoRA Studio substitutes it per cell; you don't.
  • strength - default 1.0, range -100 to 100. Worth knowing: 0 returns model completely untouched, which is how the baseline-without-the-LoRA cell is produced, and negative values invert the adapter - useful when a LoRA is doing more than you asked.

Output is a single MODEL, straight into your sampler - no latents, images or text. The grid's images come from the rest of the workflow and stay in LoRA Studio.

How to install it

Install the host pack first; that's what registers this node. ComfyUI Manager, search ComfyUI_PromptStudio, or:

cd ComfyUI/custom_nodes
git clone https://github.com/tiko13/ComfyUI_PromptStudio
# restart ComfyUI

Current Prompt Studio versions already ship the bridge (backend/lora_studio_bridge.py, registered from __init__.py). On an older one, LoRA Studio's own installer adds it:

python scripts/install_comparison_bridge.py --prompt-studio "path/to/ComfyUI_PromptStudio"

Prompt Studio adds no pip requirements of its own; pyproject.toml allows Python >=3.9 and ComfyUI supplies the rest. LoRA Studio is the heavier half - Python 3.10+, an AI Toolkit install (existing, or a managed download needing Git and roughly 10 GB).

Common issues & troubleshooting

"Checkpoint registration expired. Retry the comparison in LoRA Studio." Almost always a ComfyUI restart between starting the comparison and now; registrations live in RAM. Resume from LoRA Studio and it registers the pending cells again.

"Checkpoint snapshot changed. Create a new comparison." The file behind the ID was rewritten - retention cleaned it up, or a new run saved over the same path. Snapshots are meant to be immutable.

Both apps have to be on the same computer. The bridge accepts loopback origins only and refuses non-loopback requests outright. ComfyUI on a remote box, or a Docker port-forward presenting a non-local host, breaks the handshake - and no node-wrangling fixes it.

LoRA Studio doesn't offer your workflow. It lists only Prompt Studio [PS] Create workflows that pass its validation: a matching LoRA family descriptor, connected prompt and seed controls, image output. Edit, upscale and input-image workflows are excluded.

Don't expect a forum thread when it misbehaves. GPL-3.0, single-digit star counts, effectively nothing on r/comfyui or r/StableDiffusion - the README, the source and LoRA Studio's bridge doc are the whole support surface. Small enough to actually read, though - worth doing before you let any bridge into your ComfyUI process, since custom nodes are arbitrary Python with your permissions.

CategoryPrompt Studio/integrations

Inputs (3)

NameTypeDefaultDescription
modelMODEL—
checkpoint_idSTRING—
strengthFLOAT1.00-100–100—

Outputs (1)

NameTypeDescription
MODELMODEL—