Nodes/arkennemasis Nodes/arkennemasis Video Save (write a clip, free the models)
ComfyUI Node

arkennemasis Video Save (write a clip, free the models)

Save the clip, free the models

By Hishamahmer·Created 2 months ago·Updated 8 days ago· 9
arkennemasis Video Save (write a clip, free the models)
  • video
  • video
  • path
filename_prefixvideo/scene
free_memorytrue

Here's the scene-loop failure that this node exists to solve: the pack's Scene List drives a chain that runs once per scene, but ComfyUI runs each node across every scene before moving to the next node - nothing gets a chance to release memory between shots except the nodes already in the chain. A 22B video transformer plus a 12B text encoder plus two VAEs stays resident through all of it, and the run dies partway through staging. The GPU looks nearly empty, because it was host RAM that ran out. ArkVideoSave is the release valve: put it straight after a video subgraph in a scene loop, and it writes the clip to disk, hands back the path, and evicts every loaded model.

What it does

Two required inputs: video (the clip to write) and filename_prefix (default video/scene, relative to ComfyUI's output dir). Each call appends the next counter, so clips land in scene order - scene_00001_.mp4, scene_00002_.mp4, ... The optional free_memory defaults to true: after writing, the node calls unload_all_models() plus the whole family of ComfyUI cleanup calls - cleanup_models, reset_cast_buffers, a purge of the aimdo host-buffer file reader, soft_empty_cache, torch.cuda.empty_cache - and reports the VRAM and RAM it recovered.

The two outputs are both load-bearing. video returns a file-backed VideoFromFile, which holds a path rather than frames - so the assembler downstream can collect every scene of a run without keeping any of them in memory. And path is the clip's file on disk, which the dub node downstream wants: give the dub only a VIDEO object and it falls back to save_to() into a temp file, re-encoding every shot through TorchCodec (which isn't installed) and leaving nothing on disk to recover an interrupted run from. Saving once, here, is what gives the dub a real path and leaves numbered clips behind.

The subtle bit: this is for subgraph renderers

The pack's own Hailuo Scene node does its own saving and releasing - that's its whole job. ArkVideoSave is for video models that arrive as a subgraph rather than a node of ours (the LTX branch is the intended case): a stock subgraph does neither, and in a scene loop that's fatal. So the practical rule: if your renderer is a subgraph and you're looping it, ArkVideoSave goes immediately after it, free_memory on. The tooltip's nuance: leave free_memory off for a single clip, where reloading the model next run costs more than it saves.

Install

ArkVideoSave is one of the 61 nodes in the comfyui-arkennemasis pack, in arkennemasis/Video:

cd ComfyUI/custom_nodes
git clone https://github.com/Hishamahmer/comfyui-arkennemasis
pip install -r comfyui-arkennemasis/requirements.txt   # then restart ComfyUI

Or ComfyUI Manager → Install via Git URL with the repo URL. No model downloads, no key - the models it frees belong to the renderer upstream.

The memory management is genuinely the difference between a scene loop that works and one that OOMs at shot eleven. If you've ever had a multi-shot video render die "randomly" with the GPU half-empty, this is the fix in node form: write early, free often, and let the next scene start clean.

Categoryarkennemasis/Video

Inputs (3)

NameTypeDefaultDescription
videoVIDEOThe clip to write.
filename_prefixSTRINGvideo/sceneRelative to ComfyUI's output dir. Each call appends the next counter, so clips land in scene order.
free_memoryoptBOOLEANtrueEvict every loaded model after writing. Leave ON in a scene loop — it is what lets twenty shots finish. Turn it off only for a single clip, where reloading the model next run costs more than it saves.

Outputs (2)

NameTypeDescription
videoVIDEO
pathSTRING