Nodes/ComfyUI-Prompt-Manager/Recipe Extractor
ComfyUI Node

Recipe Extractor

Turn an old image back into a full recipe

By FranckyB·Created 10 months ago·Updated 8 days ago· 147
Recipe Extractor
    • recipe_data
    • image
    source_folderinput
    image
    frame_position0.00

    Recipe Extractor (class RecipeExtractor) is the on-ramp to the recipe pipeline: it reads the generation metadata embedded in an image, video, or JSON workflow file and normalizes it into a RECIPE_DATA payload - the structured format the whole recipe toolset runs on. It's the "I found this image I made three months ago and want to reproduce it, tweaked" node, and it's deliberately simpler than the pack's Prompt Extractor: no separate prompt/LoRA outputs, just the full recipe in one wire.

    How it works

    You pick a source_folder (input or output), choose an image from the dropdown, and the node parses the embedded workflow metadata - ComfyUI, A1111, and Forge formats, plus WebP and JSON workflow files. For videos it grabs a frame using frame_position (0.0–1.0, default 0) and reads the generation data from there. Then it normalizes everything into a recipe: prompts, model slot(s), LoRA stacks, sampler settings, resolution, seed.

    Two outputs:

    • recipe_data - the full recipe payload, ready for Recipe Builder (to edit), Recipe Renderer (to run), or Recipe Manager (to save).
    • image - the source file as an IMAGE tensor, so it doubles as a loader if you want the original image in your pipeline (say, for img2img or comparison).

    The "normalize" part is the point. Raw metadata is a mess of app-specific formats; this node converts it into the pack's v2 recipe structure - versioned, with named model blocks - so that Builder and Renderer can consume it without knowing which app made the original.

    Where it fits

    The author's suggested flow is extract → build → render: pull a recipe out of an existing image, load it into Recipe Builder to adjust settings, then render the new version. That's the fastest way to iterate on a look you've already produced - you're starting from a known-good configuration instead of reconstructing it node by node. If you want the individual pieces (just the prompt, just the LoRAs) rather than the whole recipe, Prompt Extractor is the sibling for that.

    Installing

    It's in the ComfyUI-Prompt-Manager pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/FranckyB/ComfyUI-Prompt-Manager.git
    cd ComfyUI-Prompt-Manager
    pip install -r requirements.txt
    

    Or ComfyUI Manager → search "Prompt Manager", then restart.

    Gotchas

    The usual metadata caveats apply: screenshots and re-encoded files have no embedded workflow, and the recipe comes out with empty slots - the renderer will then run with defaults, which is rarely what you wanted, so check the output before rendering. Also, extraction is only as complete as the source file's metadata: if the original was generated in a tool that didn't record sampler settings or LoRAs, those parts of the recipe will be missing, and it's up to you to fill them in Builder. And remember, recipe_data is a recipe-specific type - nothing in standard ComfyUI reads it, so this node only earns its place if you're committed to the recipe workflow.

    CategoryPrompt Manager

    Inputs (3)

    NameTypeDefaultDescription
    source_folderCOMBOinputBrowse files from the input or output folder
    imageCOMBO2 options: (none), example.png
    frame_positionFLOAT0.000–1

    Outputs (2)

    NameTypeDescription
    recipe_dataRECIPE_DATA
    imageIMAGE