Save Latent With Path (CRT)
Park a latent on disk and pick it up later
- latent
- latent
Latents are cheap to save and expensive to regenerate. If you're building a workflow where the same encoded starting point feeds several experiments - a loop workflow, a batch that reuses one image's latent, or a two-stage setup where you want to freeze the encode and iterate on the sampling - Save Latent With Path is the node that lets you do that without keeping the VAE encode in memory across runs.
It's a sibling of the pack's other "With Path" savers, and it does exactly what the name says: writes a LATENT to an absolute path as a .safetensors file, and hands the same latent back so the node can sit in the middle of a graph instead of dead-ending it.
What it does, precisely
Give it a latent (the standard LATENT type) and a destination. It writes filename + suffix + ".safetensors" into folder_path (plus subfolder_name if you set one), creating directories as needed. Two defensive touches: if the filename is blank it auto-generates a unique one, and if the .safetensors extension is missing it appends it for you.
Unlike a plain saver, it has an output - the same latent, unchanged - which means you can branch: save the latent for later and keep it flowing through the graph in the same run. That passthrough is the difference between this and a dead-end save node, and it's why you'd drop it mid-pipeline rather than at the end.
Inputs and outputs
- latent (
LATENT) - what you're saving. - folder_path - absolute directory. Default is
C:/tmp/loop, which is a Windows-era default and almost certainly not where you want it. Change it. - filename - base name, default
latent. - suffix - appended before the extension.
- subfolder_name - optional subdirectory under
folder_path.
Output is the same latent (LATENT) you put in.
Installing it
Same story as every node in this pack: ComfyUI Manager → search CRT-Nodes → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/PGCRT/CRT-Nodes.git
pip install -r requirements.txt
Then restart ComfyUI and it'll be under CRT/Save.
Where people get burned
The default folder path is the main trap - it's literally a Windows temp path, so on Linux it'll create /C:/tmp/loop or fail depending on how lenient your filesystem is. Set folder_path yourself before the first run. Also worth knowing: suffix joins to the filename with no separator, so if you want latent_v2.safetensors you type _v2, not v2. To pick the file back up later, the pack's Load Last Latent (CRT) is the natural companion - it grabs the most recent latent from a folder, which pairs perfectly with saving to a dated subfolder each run.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — | |
| folder_path | STRING | C:/tmp/loop | — |
| filename | STRING | latent | — |
| suffix | STRING | Optional suffix appended to filename. | |
| subfolder_name | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |