Filename Generator
Stop naming your Wan renders like a monster — let the workflow do it
- filename
Wan 2.2 is a two-pass model: a high-noise pass that sets motion and composition, and a low-noise pass that refines detail. That means your save folder ends up full of clips that only differ by a sampler here and a CFG there - and if you're naming them by hand, you will absolutely lose track of which one is which. Filename Generator solves the boring part of the problem: it builds a structured filename from the exact parameters in your workflow, so every render names itself.
The inputs are the values you already have floating around your graph. scheduler comes in as a forced input (wire it from your Wan scheduler selector or equivalent - it gets cleaned to lowercase and spaces become underscores), plus shift, total_steps, shift_step, high_cfg, and low_cfg as numbers. On top of the parameters there's base_filename (default base, no extension), subdirectory_prefix (e.g. a project name, prepended to the folder), and add_date_subdirectory (a YYYY-MM-DD folder, on by default). It returns one STRING output, filename, which you feed straight into your save node's filename field.
Mechanically it's a string builder, nothing clever. Floats get formatted to two decimals with the dot swapped for an underscore, so high_cfg of 3.0 becomes highCFG_3_00, and the final path looks something like project/2026-08-16/base_scheduler_wan2_2_shift_12_00_total_steps_40_shift_step_25_highCFG_3_00_lowCFG_4_00. Ugly? Sure. But it's deterministic, sortable, and grep-able - try finding "the one with shift 14" in a folder of output_001.mp4.
The two-stage fields are where the Wan-ness shows: high_cfg/low_cfg and the shift_step (the step where the two passes hand off) are the parameters you actually tune in a 2.2 workflow, so they're baked into the name. If you're on a single-stage model, just set the two CFG values the same and move on.
Installing
Part of Swiss Army Knife:
- ComfyUI Manager: search "Swiss Army Knife", install, restart.
- Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/sammykumar/ComfyUI-SwissArmyKnife.git
cd ComfyUI-SwissArmyKnife
pip install -e .
Gotchas
- It doesn't add an extension. The output is
base_..._lowCFG_4_00, not.mp4. Your save node supplies the extension - if you wire the filename into a video save node that appends its own, great; if not, you'll get extension-less files. - The path is relative. It returns
subdir/date/name; whether that lands underoutput/depends on how the downstream save node treats it. - Decimal munging means no dot in filenames, which is deliberate (dots confuse some tools and shells).
12.0becomes12_00. - It's not an output node, so nothing displays in the UI - you just get the string on the wire.
Is it glamorous? No. But it's the difference between a folder you can navigate and a graveyard of final_v2_REAL.mp4. For anyone running repeated Wan 2.2 experiments, this is the quiet workhorse that keeps your output directory sane.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| scheduler | STRING | Scheduler input from WanVideo Scheduler Selector or other scheduler nodes | |
| shift | FLOAT | 12.000–100 | Shift value |
| total_steps | INT | 401–10000 | Total number of steps |
| shift_step | INT | 251–10000 | Shift step value |
| high_cfg | FLOAT | 3.000–30 | High CFG value |
| low_cfg | FLOAT | 4.000–30 | Low CFG value |
| base_filename | STRING | base | Base filename (without extension) |
| subdirectory_prefix | STRING | Optional subdirectory prefix (e.g., 'project_name'). Will be added before date subdirectory. | |
| add_date_subdirectory | BOOLEAN | true | Add date subdirectory (YYYY-MM-DD format) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| filename | STRING | — |