💾 Conditional Save Image:
ConditionalSaveImage passes generated images through your workflow and saves them only when the enabled switch is turned on. This makes it useful when you want to preview or process images without writing files every time, then enable saving for selected runs. When saving is enabled, the node uses ComfyUI-Lora-Manager's save implementation when that extension is installed, which supports PNG, JPEG, WebP, metadata handling, filename patterns, LoRA information, counters, and recipe saving. Without LoraManager, the node falls back to ComfyUI's standard PNG image saver, so JPEG, WebP, recipe saving, LoRA prompt additions, and transferred image metadata require LoraManager. The node always forwards the original image batch to downstream nodes, whether saving is enabled or disabled, and saving is treated as a side effect rather than a reusable cached result.
💾 Conditional Save Image Input Parameters:
images
This IMAGE input contains the image or batch of images that the node should save and pass onward. When enabled is True, each image is sent to the configured saving system using the selected filename, format, quality, and metadata settings. When enabled is False, no files are created, but the images are still returned unchanged so the rest of your workflow can continue. This input has no default, minimum, maximum, or option list because it must be supplied by another image-producing node.
metadata
This optional METADATA input can provide complete or empty image-generation metadata, such as parameters transferred by an Image Metadata Extractor. When recognized metadata is supplied and saving is enabled, the node can use it as the saved image's metadata through LoraManager. Transferred metadata cannot be combined with save_as_recipe=True; doing so produces an error because these are two different ways of describing the generation. If metadata is needed while saving is enabled, the node requests this input lazily, so it does not need to be calculated when saving is disabled. This input has no default, minimum, maximum, or option list.
enabled
This BOOLEAN switch controls whether files are written. The default is True. Set it to True to save images, or set it to False to skip saving while still passing the original images through the node. This is useful for testing workflows, inspecting intermediate results, or using a single workflow with optional output recording.
filename_prefix
This STRING value sets the base name and location prefix for saved files, with a default of ComfyUI. The exact filename behavior depends on the available saving implementation. With LoraManager installed, filename patterns such as %seed% and date patterns such as %date:...% are supported. Choose a descriptive prefix or folder path to keep output files organized. The source does not define a minimum or maximum length for this value.
file_format
This COMBO selects the image file format. The available options are png, jpeg, and webp, and the default is png. PNG is generally suitable when you want lossless output and broad compatibility. JPEG is useful for smaller photographic files but uses lossy compression. WebP can provide smaller files with either lossy or lossless compression depending on lossless_webp. JPEG and WebP require ComfyUI-Lora-Manager; without it, selecting either format causes an error and only PNG is available.
lossless_webp
This BOOLEAN controls whether WebP files use lossless compression when file_format is webp. The default is False, which allows lossy WebP compression and may produce smaller files. Set it to True when preserving image details exactly is more important than minimizing file size. This setting has no effect when PNG or JPEG is selected, and WebP saving requires ComfyUI-Lora-Manager.
quality
This INT value controls the quality level used by formats that support quality-based compression, especially JPEG and lossy WebP. The allowed range is 1 to 100, and the default is 100. Higher values generally preserve more visual detail while creating larger files, while lower values can reduce file size at the cost of visible compression artifacts. For PNG or lossless WebP, this setting may have little or no practical effect depending on the installed saver.
webp_method
This INT value controls the WebP compression method. The allowed range is 0 to 6, and the default is 6. Higher method values generally allow the encoder to spend more effort optimizing compression, which can reduce file size but may take longer to save. Lower values can favor faster saving. This setting is used for WebP output and has no meaningful effect when PNG or JPEG is selected.
jpeg_subsampling
This INT value selects the chroma subsampling mode used for JPEG output. The allowed range is 0 to 2, and the default is 0. Subsampling changes how much color information is reduced during JPEG compression: lower reduction generally preserves color detail better, while greater reduction can reduce file size and may be acceptable for ordinary photographic images. This setting applies to JPEG saving and has no meaningful effect for PNG or WebP. The exact interpretation of each numeric mode is handled by the installed save implementation.
embed_workflow
This BOOLEAN controls whether workflow information is embedded in the saved image when supported. The default is False. Set it to True when you want the saved file to retain ComfyUI workflow information for later inspection or reuse. With the fallback core PNG saver, this controls whether the workflow's extra PNG information is included. The setting is passed to LoraManager when that saver is installed.
save_with_metadata
This BOOLEAN controls whether generation metadata is included in the saved image when the selected saving implementation supports it. The default is True. Keeping it enabled can preserve useful generation information, while disabling it can create cleaner files or avoid embedding metadata. With the fallback PNG saver, this determines whether the hidden prompt information is supplied to the saver; workflow embedding is controlled separately by embed_workflow.
add_loras_to_prompt
This BOOLEAN controls whether LoraManager adds LoRA information to the saved prompt metadata. The default in the node schema is True. Enable it when you want saved metadata to record the LoRAs used during generation. This option requires ComfyUI-Lora-Manager; without that extension, setting it to True causes an error. It is also only relevant when metadata is being saved through the supported saving implementation.
add_counter_to_filename
This BOOLEAN controls whether the saving implementation adds a counter to filenames to help prevent overwriting previous files. The default is True. Keeping it enabled is useful for repeated generations with the same filename prefix because each saved image can receive a distinct numbered name. This option is passed to LoraManager and is not available as a configurable feature in the fallback core PNG saver.
save_as_recipe
This BOOLEAN controls whether LoraManager saves the result as a recipe. The default is False. Enable it when you specifically need LoraManager's recipe-saving behavior rather than an ordinary image file. This option requires ComfyUI-Lora-Manager and cannot be used together with transferred complete or empty image-generation metadata from the metadata input. Without LoraManager, enabling this option causes an error.
💾 Conditional Save Image Output Parameters:
images
This IMAGE output contains the original input image batch, unchanged. It is available whether saving is enabled or disabled, so you can place ConditionalSaveImage in the middle of a workflow without interrupting downstream image processing. When saving succeeds, the output remains the original input batch rather than a potentially normalized image list returned internally by LoraManager. When saving is disabled, the output is still produced and no files are written.
💾 Conditional Save Image Usage Tips:
- Leave
enabledset toTruefor final renders and switch it toFalsewhile testing prompts, samplers, or intermediate workflow changes to avoid creating unwanted files. - Keep
file_formatset topngwhen you need broad compatibility, lossless output, or when ComfyUI-Lora-Manager is not installed. - Install and enable ComfyUI-Lora-Manager when you need JPEG or WebP output, filename patterns such as
%seed%, LoRA information in prompts, recipe saving, or transferred image-generation metadata. - Use a descriptive
filename_prefixto organize output sets, such as a project name or a project folder followed by a descriptive base filename. - Keep
add_counter_to_filenameenabled for batch generation or repeated runs with the same prefix so previous files are less likely to be overwritten. - Use
qualityvalues near100when preserving detail is important. Use lower values when smaller JPEG or lossy WebP files are more important than maximum image fidelity. - Select
lossless_webp=Truewhen you want WebP storage without lossy image compression. For ordinary previews or large collections where storage matters more, lossy WebP with an appropriatequalityvalue can be more compact. - Set
embed_workflow=Truewhen you want to inspect or reproduce the workflow from the saved image later. Keep it disabled when workflow information should not be included. - Keep
save_with_metadata=Truewhen generation prompts and related information are useful for cataloging or reproducibility. Disable it when you intentionally want files with less embedded generation information. - Do not enable
save_as_recipewhen themetadatainput contains transferred image-generation metadata. Choose either transferred metadata or recipe saving for that run. - Remember that the node does not cache its save operation. Re-running the workflow can save another file even when the image inputs appear unchanged, so use
enabled=Falsewhen you do not want another file written.
💾 Conditional Save Image Common Errors and Solutions:
💾 Conditional Save Image: jpeg/webp requires ComfyUI-Lora-Manager; only png is available without it.
- Explanation: JPEG or WebP was selected, but ComfyUI-Lora-Manager is not installed or its save node is not available in ComfyUI's node registry.
- Solution: Install or enable ComfyUI-Lora-Manager, or change
file_formattopng.
💾 Conditional Save Image: save_as_recipe/add_loras_to_prompt require ComfyUI-Lora-Manager.
- Explanation:
save_as_recipeoradd_loras_to_promptwas enabled while the node could not find LoraManager's save implementation. - Solution: Install or enable ComfyUI-Lora-Manager, or set both options to
Falseand use the fallback PNG saver.
💾 Conditional Save Image: complete or empty metadata transfer requires ComfyUI-Lora-Manager.
- Explanation: The
metadatainput contains recognized image-generation metadata, but LoraManager is unavailable. The fallback ComfyUI PNG saver cannot apply this transferred metadata. - Solution: Install or enable ComfyUI-Lora-Manager, or disconnect the transferred metadata and save the image without metadata transfer.
💾 Conditional Save Image: transferred image metadata cannot be combined with save_as_recipe; disable recipe saving.
- Explanation: Recognized metadata was supplied through
metadatawhilesave_as_recipewas set toTrue. The node does not allow these two saving modes together. - Solution: Set
save_as_recipetoFalsewhen using transferred metadata, or remove the transferred metadata when recipe saving is required.
💾 Conditional Save Image: the installed ComfyUI-Lora-Manager does not expose the required format_metadata() capability; update Lora Manager.
- Explanation: LoraManager was found, but the installed version does not provide the metadata-formatting capability required to save transferred metadata.
- Solution: Update ComfyUI-Lora-Manager to a version that supports the required metadata formatting functionality, then restart ComfyUI.
💾 Conditional Save Image: the installed ComfyUI-Lora-Manager has an incompatible format_metadata() signature; update Lora Manager.
- Explanation: The installed LoraManager provides a method with a parameter format that is incompatible with ConditionalSaveImage's metadata handling.
- Solution: Update ComfyUI-Lora-Manager and restart ComfyUI so the node can use a compatible save implementation.
enabled is False and no image file is created
- Explanation: This is the expected behavior when the conditional switch is turned off. The node still forwards the images, but it intentionally skips saving.
- Solution: Set
enabledtoTruewhen you want files to be written. No workflow repair is needed if skipping the save was intentional.
Images pass through, but the saved image does not contain workflow or prompt information
- Explanation: Workflow embedding and generation metadata are controlled independently.
embed_workflowmay beFalse,save_with_metadatamay beFalse, or the selected saver may not support the requested metadata behavior. - Solution: Set
embed_workflow=Trueto include workflow information and keepsave_with_metadata=Trueto preserve supported generation metadata. Verify that LoraManager is installed when using its extended metadata features.
