Krea2 SVDQuant Capture Save
Write your activation stats to disk
- latent
- latent
- status
- act_stats_path
The short version
The save half of the capture pair. Krea2 SVDQuant Capture Start hooks your model and records activation statistics while sampling runs; this node, Krea2 SVDQuant Capture Save, sits downstream of the KSampler and writes those statistics to a .safetensors file under ComfyUI/output/. That file is what makes your quantizer build an activation-aware low-rank branch - the one lever in this whole pack that's measured to improve fidelity for free at inference.
The pair exists because the statistics have to come from real sampling - real conditioning, real scheduler, real graph - and reimplementing that outside ComfyUI to run a calibration pass would be a second, subtly different sampler. So the hooks ride along on the actual generation instead.
The inputs that matter
- latent - wire the KSampler's output here. This is what forces the node to run after sampling rather than before it. ComfyUI is free to execute nodes in any order unless there's a data dependency, and this wire is the dependency. If you ever get a "no activation statistics were collected" error, it's because this wire is missing or the graph executed out of order.
- filename - default
krea2_act_stats.safetensors, written underComfyUI/output/. Keep it relative - the node rejects absolute paths and anything that escapes the output directory, on purpose. - keep_capturing - default
false. Leave it on for every prompt but the last, so several prompts accumulate into one file (that's the point of calibrating - you want a spread of prompts, not one). On the final prompt, leave it off so the hooks detach and stop recording unrelated generations.
Outputs: latent (passed through unchanged), status (where the file went and what's in it - layer count and tokens per layer), and act_stats_path (the absolute path of the file just written). Wire act_stats_path into the Krea2 SVDQuant Quantize node's act_stats input - that wire does double duty: it feeds the statistics and forces the quantizer to run after the calibration pass, instead of ComfyUI helpfully quantizing before you've captured anything.
How to install
cd ComfyUI/custom_nodes && git clone https://github.com/alperktt/Krea-2-SVDQuant-ComfyUI krea-2-svdquant
No Python dependencies. The full calibrated workflow is workflows/krea2_quantize_calibrated.json, which wires the capture and the quantize together so ordering can't go wrong.
Gotchas
- Use calibration prompts that aren't the ones you'll judge the checkpoint on. Measuring and then judging on the same prompts is how you fool yourself.
- The pre-made files are for stock weights only. If your model is a finetune or merge, sharing the architecture isn't enough - Turbo's stock calibration file loads into a base build without complaint and describes the wrong model. That's the case this capture rig exists for.
- Watch the status line for uneven token counts. A warning there means the hooks stayed live through something other than your calibration run - most likely a graph that errored between Start and Save. The stats are still usable, just not only about what you meant to calibrate on; re-run with
reset=trueon the first prompt if they're meant to describe one model. - The output filename gains an
-actawaretag when you pass it to the quantizer, and the file's metadata records which statistics built the checkpoint (krea2_svdquant_act_stats) - nice for keeping builds straight. Missing stats for any branched layer is a hard error, checked before any GPU work, rather than a silent fallback.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | Wire the KSampler's output here. This is what forces the node to run *after* sampling rather than before it. | |
| filename | STRING | krea2_act_stats.safetensors | Written under ComfyUI/output/. |
| keep_capturing | BOOLEAN | false | Leave the hooks attached so the next queued prompt keeps adding to the same statistics. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | Passed through unchanged. |
| status | STRING | Where the file went and what is in it. |
| act_stats_path | STRING | Absolute path of the file just written. Wire it into the Quantize node's act_stats: that is also what forces the quantizer to run after the calibration pass rather than before it. |