Nodes/MD Nodes/MD: Enhanced Seed Saver
ComfyUI Node

MD: Enhanced Seed Saver

A seed bank for the ones you want to keep

By MDMAchine·Created about a year ago·Updated 3 months ago· 15
MD: Enhanced Seed Saver
    • seed_output
    • seed_output_str
    • status_info
    operation_modeManual Input (Direct Entry)
    seed_input0
    manual_seed0
    quick_action(None)
    action(None)
    seed_name_input
    seed_to_load_name(None)
    subdirectory
    search_pattern*
    description
    tags
    target_subdirectory
    debug_mode0 - Silent

    Every serious generator has the same ritual: you hit a killer seed, and then you either scribble it on a sticky note or hope the workflow JSON remembers it forever. EnhancedSeedSaver is the drawer you file seeds in. Name them, tag them, save them to disk as JSON, and reload them months later without rebuilding the workflow.

    The clever bit is that it's not just a save node - it's a small seed management system bolted onto the graph. It saves, loads, deletes, backs up, exports, favorites, and keeps statistics on the seeds you've collected. If you farm seeds for a character or a style, this is the node that makes the farm reproducible instead of a memory exercise.

    The modes

    There are three operation_modes and the tooltip is worth reading twice because it controls caching:

    • Pass-through (External Seed) - take a seed from another node's INT wire, cache it.
    • Manual Input (Direct Entry) - the recommended default; type the seed yourself.
    • Execute Action (Dynamic) - never caches, always runs, because it's the mode that actually touches the filesystem.

    The reason for the split is ComfyUI's caching. Save and load operations must re-run every queue, while a plain seed pass-through shouldn't waste cycles. Leave it in Manual unless you're doing I/O.

    Inputs worth knowing

    manual_seed is the one to trust. It's a STRING input, and that's a deliberate design choice: big seeds pushed through a JS INTEGER widget can suffer precision rounding. Type 1234567890123 as text (hex like 0x1A2B also works) and it round-trips exactly. The seed_input INT is there for when a random seed comes from elsewhere in the graph.

    quick_action applies instant math to the active seed - increment, decrement, randomize, reset, or pull back the last-used seed - without changing modes. action is where the file I/O lives: SAVE_CURRENT_SEED, LOAD_SELECTED_SEED, LOAD_LATEST_SAVED_SEED, LOAD_RANDOM_SEED, COPY_TO_SUBDIRECTORY, TOGGLE_FAVORITE, SHOW_STATISTICS, and more. If you save several seeds and the dropdown looks stale, the tooltip points at the fix: run REFRESH_LISTS.

    You can organize with subdirectory (forward slashes, e.g. project/tests), filter the dropdown with search_pattern (which also constrains the random-load pool), and attach description and comma-separated tags that get embedded in the saved JSON - so a seed file can carry "the good cosmic horror one" right next to the number.

    Outputs

    Three: seed_output (INT, wire into KSampler), seed_output_str (STRING, same value as text for metadata), and status_info (STRING, tells you what just happened - saved, loaded, which file).

    Installing it

    Same pack as everything here: MD Nodes (MDMAchine/ComfyUI_MD_Nodes). ComfyUI Manager → search MD_Nodes → Install, or:

    cd path/to/ComfyUI/custom_nodes
    git clone https://github.com/MDMAchine/ComfyUI_MD_Nodes.git
    cd ComfyUI_MD_Nodes
    pip install -r requirements.txt
    

    Restart ComfyUI. Standard pack story: Python 3.10+, GPL v3, pure Python.

    Common issues

    Two things to keep in mind. First, actions only execute in Execute Action mode - set action to something while sitting in Manual mode and nothing will happen, which reads as "broken" until you remember the mode gate. Second, if you change the seed by typing in manual_seed, ComfyUI's caching can occasionally hold onto an old value; the node's caching design is intentional, but if a value looks stale, tweak any input to force a re-run. And if you share workflows, remember the saved JSON lives in the pack's output directory on your machine - it travels with the workflow only if you copy the file too.

    CategoryMD_Nodes/Save

    Inputs (13)

    NameTypeDefaultDescription
    operation_modeCOMBOManual Input (Direct Entry)OPERATION MODE • Purpose: Determines caching and base behavior. • Pass-through: Caches. Uses seed from external connected input. • Manual: Caches. Uses manual string input directly. • Execute Action: Never caches. Performs I/O operations (Save, Load). ⭐ Recommended: 'Manual Input' for standard workflow reproducibility.
    seed_inputoptINT00–9007199254740991EXTERNAL SEED INPUT • Purpose: Connect a seed value generated by another node. • Note: Ignored if using 'Manual Input' mode.
    manual_seedoptSTRING0MANUAL SEED VALUE • Purpose: Enter a seed directly as text (avoids JS precision rounding). • Range: 0 to 9,007,199,254,740,991 (JS Safe Max). • Format: Accepts decimal or hex (e.g., 0x1A2B). ⭐ Recommended: Use this instead of INT inputs for total safety.
    quick_actionoptCOMBO(None)QUICK ACTION • Purpose: Apply instant math to the active seed without changing modes. • Options: Increment, Decrement, Randomize, Reset. ⭐ Note: Applies AFTER mode selection but BEFORE execute actions.
    actionoptCOMBO(None)EXECUTE ACTION • Purpose: Perform file I/O operations (Requires Execute Action mode). • Operations: Save, Load, Delete, Backup, Export, Statistics. ⭐ Note: Will force the node to re-run on every queue.
    seed_name_inputoptSTRINGSAVE NAME • Purpose: Filename for the SAVE_CURRENT_SEED action. • Note: Invalid characters are automatically stripped. Leaves blank for auto-timestamp.
    seed_to_load_nameoptCOMBO(None)SELECT SEED • Purpose: Target seed for Load, Delete, Copy, Move, or Stats actions. • Tip: Run 'REFRESH_LISTS' action if new files don't appear.
    subdirectoryoptSTRINGSUBDIRECTORY • Purpose: Target specific folders within the main 'seeds' output directory. • Format: Use forward slashes (e.g., 'project/tests').
    search_patternoptSTRING*SEARCH PATTERN • Purpose: Filters the dropdown list using substring matching. • Note: Also restrains the 'LOAD_RANDOM_SEED' pool.
    descriptionoptSTRINGDESCRIPTION • Purpose: Text notes embedded into the saved JSON file.
    tagsoptSTRINGTAGS • Purpose: Comma-separated tags embedded into the saved JSON file.
    target_subdirectoryoptSTRINGTARGET SUBDIRECTORY • Purpose: Destination folder for COPY or MOVE actions.
    debug_modeoptCOMBO0 - SilentLOGGING VERBOSITY • Controls console output and I/O profiling.

    Outputs (3)

    NameTypeDescription
    seed_outputINT
    seed_output_strSTRING
    status_infoSTRING