Load Checkpoint From String
Switch whole models with one text value
- model
- clip
- vae
This is the reason to install the pack. Load Checkpoint From String does what the core Load Checkpoint node does - loads a full checkpoint and hands you MODEL, CLIP, and VAE - except instead of picking the file from a dropdown, it takes the filename from a string that arrives on a wire. That tiny change is what makes dynamic model switching possible: your graph can now decide which checkpoint to load based on any string value in the workflow, not based on which dropdown you set before hitting Queue.
How it works
How it works is about as direct as it gets. The ckpt_name input is a STRING marked forceInput, so it has to come from a wire - a Const String, an If True output, anything that produces text. The node looks up that exact string in your models/checkpoints folder and loads it with ComfyUI's standard load_checkpoint_guess_config, which sniffs the checkpoint type and wires up the right architecture automatically. Outputs are the familiar trio: model, clip, vae, ready to feed the rest of your pipeline.
The inputs that matter
ckpt_name(STRING, wired) - must be the filename exactly as it sits inmodels/checkpoints, extension included.juggernautXL_v9.safetensors, not "Juggernaut".model/clip/vae- the loaded checkpoint, three sockets, standard wiring.
The gotchas
The sharp edges are where beginners bleed. First: exact match or hard fail. If the string doesn't match a file, the node raises a FileNotFoundError and the run stops - there's no fuzzy matching and no "did you mean". That's actually a blessing in disguise: a typo fails loudly with a clear message instead of silently loading the wrong model. Second: an empty string (or a blocked input from an If True 3/4) doesn't crash - it returns an ExecutionBlocker, so that branch is skipped and the rest of the graph keeps going. That asymmetry - missing file errors, empty name skips - is deliberate, and it's what makes the "fallback to a default checkpoint" pattern work: route an empty string through the fallback and let a Merge First pick up the slack.
Putting it together
The canonical use case is a one-string switchboard. Wire a Const String holding a preset name into an If True, put one checkpoint's output on if_true and another's on fallback, and flipping the preset flips the model - no touching the graph. Load Checkpoint From String is what makes the two sides of that If True different models at all.
Installing it
Install: ComfyUI Manager → "Conditional Nodes by Mikudes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/levox00/Conditional-Nodes-Comfy-Ui
Restart ComfyUI. No pip dependencies, no models to download - it uses whatever checkpoints you already have in the standard folder. The node lives in the conditional category.
Trade-off to be honest about: you lose the dropdown's autocomplete, so you must know your filenames cold. For a handful of named checkpoints in a shared workflow, that's a fair price for a graph that reconfigures itself from a single string.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| ckpt_name | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| clip | CLIP | — |
| vae | VAE | — |