Nodes/Grok Imagine (xAI)/Grok Video Save 🎬
ComfyUI Node

Grok Video Save 🎬

Finally, a Save Node That Puts Files Where You Want Them

By Slartibart23Β·Created 3 months agoΒ·Updated 21 days agoΒ· 1
Grok Video Save 🎬
  • base_image
  • saved_path
β—„video_pathβ€”β–Ί
β—„folderD:/grok_videosβ–Ί
β—„filenameclipβ–Ί
β—„save_prompt_txttrueβ–Ί
β—„save_workflow_jsontrueβ–Ί
β—„save_base_imagetrueβ–Ί
β—„filename_inputβ€”β–Ί
β—„prompt_textβ€”β–Ί

Why you'd reach for it

Every other save node in ComfyUI writes into ComfyUI/output with a timestamp prefix, and after a weekend of clip generation you're scrolling through ComfyUI_00042_.mp4 trying to work out which one was the good take. This node does the boring, specific thing: it takes the MP4 your Grok video node already downloaded and moves it to a folder you name, under a filename you name, numbered clip_000000, clip_000001, and so on. It never writes into the output folder. It never overwrites anything.

And here's the part that actually sold it for me - the MP4 is not re-encoded. The file that arrives in your folder is byte-for-byte what xAI delivered: same bitrate, same audio track, no generation loss from a second encoder pass. Most "save" nodes in the video corner of the ecosystem re-mux or re-encode and quietly cost you quality.

One mechanic worth understanding, because it's the sort of thing that scares people off: the node checks where the file came from. If the path is inside the Grok temp download folder, it moves the file (so no duplicate is left behind). If it's anywhere else, it copies. Re-running the graph therefore isn't destructive to a file you care about.

Inputs

video_path is required - connect the video_path output of Grok Imagine Video, Video Edit or Video Extend. It's a string input, not an IMAGE or VIDEO wire, which is exactly why it survives any graph rearrangement.

folder is your destination, D:/grok_videos by default. Forward slashes are fine on Windows, it's created if it doesn't exist, and an empty value is a hard error with a message telling you so. filename is the base name; a six-digit counter is always appended. The counter continues from the highest number already in that folder for that base name, so a rename or a fresh run never clobbers your earlier takes. Placeholders work in both folder-adjacent naming fields: %date% (2026-09-25), %time% (143012), and DateTime-style formats like %date:yyyy-MM-dd%. And filename_input overrides the filename widget when you connect a text node - handy when an upstream node generates the name.

Then three companion toggles, all on by default:

  • save_prompt_txt writes name_000000.txt from the prompt_text input.
  • save_workflow_json writes name_000000.json with the complete workflow. Open it later via Workflow β†’ Open, or drag it onto the canvas, and every setting comes back - including the ones you forgot.
  • save_base_image writes name_000000_base.jpg (JPEG q95) from base_image, so an image-to-video clip stays next to the picture that started it. For a batch, only the first image is saved.

Outputs, preview and buttons

The single output saved_path is a STRING with the full path, e.g. D:\Videos\clip_000003.mp4 - chainable into whatever you log with.

The node is also an output node with a preview and four buttons: πŸ“‚ Reveal in Explorer, β–Ά Open video, πŸ–Ό Save Last Frame (writes name_000000_last.jpg, video only, needs ffmpeg) and πŸ—‘ Delete this set (removes the file plus its companions, with a confirmation). Those buttons only ever act on files this node saved in the current ComfyUI session - the browser can't hand it an arbitrary path, which is the right call for anything offering a delete button.

Install

Manager, search Grok Imagine, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Slartibart23/comfyui-grok-imagine-video
..\..\python_embeded\python.exe -m pip install -r comfyui-grok-imagine-video\requirements.txt

Restart ComfyUI and hit Ctrl+F5 once - that loads the preview script, and without it the in-node player and buttons stay blank. imageio-ffmpeg in the requirements supplies ffmpeg for the status probe and last-frame export.

Where people get burned

The classic: save_prompt_txt is on but nothing is connected to prompt_text, so no .txt appears. Connect the prompt output of the Grok node and it writes itself. Second: the node moves files out of %TEMP%\grok_imagine, so if you go looking for that MP4 later it's in your destination folder by design - and the pack prints how much is still sitting unsaved on startup. Third, Save Last Frame needs ffmpeg; without it, the button reports the failure politely instead of doing nothing. Illegal filename characters are sanitised to underscores rather than erroring, so a filename you typed as my: clip? lands as my_ clip_. And if you're upgrading from 2.x, delete and re-add the video and save nodes once - the old Grok Save Video To Path is replaced by this node, and old instances won't grow the new widgets on their own.

CategoryGrok/Imagine

Inputs (9)

NameTypeDefaultDescription
video_pathSTRINGConnect the 'video_path' output of Grok Imagine Video / Video Edit / Video Extend. The file is MOVED here from the temp download folder, exactly as delivered by xAI - no re-encoding, sound kept.
folderSTRINGD:/grok_videosDestination folder on any drive, e.g. D:\Videos\grok. Created if it does not exist. This node never writes into the ComfyUI output folder.
filenameSTRINGclipBase name for the files. A six-digit counter is always appended: name_000000, name_000001, ... The counter continues from the highest number already in the folder, so nothing is ever overwritten. Placeholders: %date% (2026-09-25), %time% (143012), %date:yyyy-MM-dd%. Ignored when filename_input is connected.
save_prompt_txtBOOLEANtrueWrite name_000000.txt with the prompt (needs prompt_text connected).
save_workflow_jsonBOOLEANtrueWrite name_000000.json with the complete ComfyUI workflow. Load it later via Workflow > Open (or drag & drop) to restore every setting.
save_base_imageBOOLEANtrueWrite name_000000_base.jpg - the start image you fed into the video node (needs base_image connected). JPEG quality 95.
filename_inputoptSTRINGOptional: connect a text (e.g. from a Text node or the 'filename' output of a loader) to use it as the base name instead of the filename field above. The counter is still appended.
prompt_textoptSTRINGOptional: connect the 'prompt' output of the Grok node. It is written as name_000000.txt next to the file when save_prompt_txt is on.
base_imageoptIMAGEOptional: connect the same image you gave the video node as 'image' (image-to-video). Saved as name_000000_base.jpg so video and start image stay together. For a batch only the first image is saved.

Outputs (1)

NameTypeDescription
saved_pathSTRINGFull path of the saved MP4, e.g. D:\Videos\clip_000003.mp4.