Save nodes for Audio (mp3), Video & Frames, and Images.
Installation
- Go to the
custom_nodes/directory in ComfyUI. - Clone or copy the
comfyui-dehypnotic-save-nodesfolder:git clone https://github.com/Dehypnotic/comfyui-dehypnotic-save-nodes.git
- Restart ComfyUI.
- By default, saving is allowed under ComfyUI’s
output/directory. - To allow external locations (e.g., other drives), create a local JSON file next to this node named
dehypnotic_save_allowed_paths.jsonwith:{ "allowed_roots": ["D:/AudioExports", "E:/TeamShare/Audio"] }
Alternatively (advanced): you can set the environment variable SAVE_MP3_ALLOWED_PATHS to point to the JSON file. This is optional — for most users it’s enough to place the JSON file next to the node or in one of the global ComfyUI locations listed below.
- You can also place the file globally under your ComfyUI root:
<ComfyUI>/dehypnotic_save_allowed_paths.json<ComfyUI>/config/dehypnotic_save_allowed_paths.json<ComfyUI>/user/dehypnotic_save_allowed_paths.json<ComfyUI>/user/config/dehypnotic_save_allowed_paths.json
- The node refuses writes outside
output/unless the path is under one of the whitelisted roots. Edit this file offline and restart ComfyUI.
Whitelist behavior and safety
- Recommended location under ComfyUI root (e.g.,
ComfyUI/config/) so it survives node updates. - Loader lookup order: env var → global ComfyUI locations → node folder.
- A node‑local file is used only if it defines at least one allowed root; empty example files are ignored.
- Lines starting with
#are treated as comments in the JSON file. - An allowed root permits saving in that folder and all subfolders; whitelist a deeper path to restrict more tightly.
Path and filename templates
Placeholders supported in file_path and filename_prefix:
[time(%Y-%m-%d)]→ formatted time (strftime)[date]→YYYY-MM-DD[datetime]→YYYY-MM-DD_HH-MM-SS[unix]→ epoch seconds[guid]/[uuid]→ random UUID4 hex[model]→ triesextra_pnginfokeys:model,checkpoint,ckpt_name,model_name; elseunknown[env(NAME)]→ environment variableNAME
Examples
audio/[time(%Y-%m-%d)]runs/[model]/[datetime]D:/Exports/[env(USERNAME)]/[guid]
Simple, flexible MP3 saver with bitrate options and handy path/filename templates.
Features
- Audio input: accepts common formats used by audio nodes
- Bitrate mode: variable, constant, average
- Quality: low, medium, high (mapped per mode)
- Outputs:
AUDIOandSTRING(bitrate info summary), output node compatible (can terminate a graph)
Paths & placeholders
file_pathanddate_subfolder_patternwith placeholder system ([date],[time(...)],[guid],[env(NAME)], etc.)- Leave
file_pathempty to use ComfyUI’s defaultoutput/directory date_subfolder_patterndefaults to%Y-%m-%d; clear the field to disable dated folders
Optional backends (no system install required)
- Auto-download ffmpeg:
pip install imageio-ffmpeg(first run caches a static ffmpeg) - Drop-in ffmpeg: place
ffmpeg/ffmpeg.exein abin/folder next to the node - Or install
lameenc:pip install lameenc - If neither ffmpeg nor lameenc is available, the node raises an error with install hints.
Backend preference: uses ffmpeg when available; otherwise falls back to lameenc.
Bitrate/quality mapping
- Variable (VBR): high →
-q:a 0(~245 kbps), medium →-q:a 4(~165 kbps), low →-q:a 7(~100 kbps) - Constant (CBR): high →
320k, medium →192k, low →128k - Average (ABR): high →
256k, medium →192k, low →160k(uses-abr 1)
Multi-format image saver with sequential naming, workflow embedding, and thumbnail support.
Features
- Image input: batches supported (returns original tensor passthrough)
- Formats: PNG, JPG/JPEG, WEBP, GIF, BMP, TIFF via Pillow
- Filename control: prefix + delimiter + padded counter (
number_start/number_padding) - Optional metadata: embed workflow JSON (PNG/WEBP) and PNG thumbnail preview block
- Quality controls: JPEG/WebP quality slider, PNG optimization toggle, lossless WebP, DPI setting
- Outputs:
IMAGEpassthrough (for chaining) andSTRINGwith newline-separated saved paths
Paths & placeholders
file_pathanddate_subfolder_patternshare the same placeholder system the other nodes ([date],[time(...)],[guid],[env(NAME)], etc.)- Leave
file_pathempty to use ComfyUI’s defaultoutput/directory date_subfolder_patterndefaults to%Y-%m-%d; clear the field to disable dated folders
Workflow tip
- Enable
embed_workflowto inject the current workflow JSON into PNG/WEBP outputs
Flexible video encoder that can also export selected frames, with automatic audio looping and preview thumbnails.
Features
- Save modes:
video,frames, orvideo & frames - Containers: MP4, MKV, WEBM, MOV (auto-adjusted codec compatibility)
- Codecs: H.264, H.265/HEVC, VP9, AV1, ProRes 422 HQ, DNxHR HQ
- Audio: optional track input; single still frames can loop to match audio duration
- Encoding controls: FPS, CRF, preset (ultrafast → veryslow), container-specific extras
- Frame export: choose index list (
0,5,10), sentinel values (-1all,-2last), or skip entirely - Preview: optional temp-image sequence surfaced in the ComfyUI UI result
- Outputs:
IMAGEpassthrough andSTRINGpointing to the saved video (or frame folder)
Paths & placeholders
file_path,date_subfolder_pattern, andframes_diraccept the same placeholders as the other nodes ([date],[time(...)],[guid],[env(NAME)], etc.)- Default date pattern
%Y-%m-%d; clear to keep everything in the root folder - When
frames_diris relative it resolves under the chosen video directory
Dependencies
- Requires Python packages
imageioandimageio-ffmpeg(pip install imageio imageio-ffmpeg) - Uses the static ffmpeg binary bundled by
imageio-ffmpeg; no system-wide ffmpeg needed - Gracefully reports missing dependencies at node load/run time with install guidance
Best practices
- Keep
show_progresson during setup to see ffmpeg command info - For WebM/V9 or AV1 targets, expect longer encode times at higher quality
- Use
loop_still_to_audio=Trueto turn a single frame + audio into a slideshow-style export