Yumil Batch Save
A save node that writes a whole little project folder in one shot
- image_0
- image_1
- image_2
- image_3
- image_4
- image_5
Most ComfyUI save nodes write one image to a directory. This one writes an entire batch of related files into a single named subfolder - up to six images plus a text file - all under one filename prefix. It exists because the pack's regional-prompt and mask workflows need to hand Yumil MPM a tidy, self-contained bundle: the generated masks, the pose images, and the prompt text that goes with them, all in one place with one project name.
Think of it as "save this run as a project." Give it a parent folder, a project name, wire in whatever images and text you've got, and it creates parent_folder/project_name/ and fills it. The naming is what keeps it organized: for folder_name = my_project, you get my_project.txt, my_project_0.jpg, my_project_1.jpg, and so on.
How it works
Plain and honest file writing. It os.makedirs the folder (creating parents if needed), writes the optional text input to {folder_name}.txt as UTF-8, then saves each connected image_0 through image_5 as JPEG at quality 95. Two details matter:
- JPEG only, quality 95. There's no PNG mode and no format choice. Fine for masks and references that another tool will consume; if you need lossless or want the ComfyUI graph embedded, this isn't your node.
- It saves only the first frame of each IMAGE tensor (
image_tensor[0]). An IMAGE input that holds a batch of 4 frames becomes just frame 0 on disk. If you're feeding this from a batch of references, split the batch first or you'll silently lose everything but the first image.
It's an output node, and its IS_CHANGED returns NaN, so it runs on every execution - that's what you want from a saver (you don't want the cache deciding a save can be skipped).
Inputs at a glance
Only two are required:
parent_folder- where the project folder goes. The tooltip example isC:/output/masks. Must be non-empty or the node raises aValueError.folder_name- the subfolder to create and the filename prefix. Also required, alsoValueErroron empty.
Optional: text (saved as {folder_name}.txt) and image_0 … image_5 (saved as {folder_name}_N.jpg). Anything left unconnected is simply skipped - it doesn't write empty files for unused slots.
Installing and when to reach for it
Pack install, same as its siblings:
cd ComfyUI/custom_nodes
git clone https://github.com/maigonia/comfyui-yumil-mpm.git
cd comfyui-yumil-mpm
pip install -r requirements.txt
or ComfyUI Manager → search comfyui-yumil-mpm → restart. It does depend on Pillow, but ComfyUI ships that already; requests is the only extra declared dependency.
Honest advice on when to use it: reach for this when you're building data - masks, pose renders, reference sets that another tool (MPM, a training script, a game asset pipeline) will consume from disk as JPEGs. Don't reach for it as your primary output saver. JPEG re-encoding drops the ComfyUI graph metadata entirely, and the default Save Image's PNG with embedded workflow is what lets you drag an image back into ComfyUI to recover the setup. If you post to CivitAI or care about workflow-included sharing, keep this node for the machine-consumable side of your output and let the core Save Image handle the human-facing copy.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| parent_folder | STRING | Parent folder path (e.g. C:/output/masks) | |
| folder_name | STRING | Folder name to create. Also used as file name prefix (e.g. 'my_project' -> my_project.txt, my_project_0.jpg) | |
| textopt | STRING | Text to save as text.txt | |
| image_0opt | IMAGE | Saved as image_0.jpg | |
| image_1opt | IMAGE | Saved as image_1.jpg | |
| image_2opt | IMAGE | Saved as image_2.jpg | |
| image_3opt | IMAGE | Saved as image_3.jpg | |
| image_4opt | IMAGE | Saved as image_4.jpg | |
| image_5opt | IMAGE | Saved as image_5.jpg |
Outputs (0)
No outputs