Nodes/KIE.ai Nodes Next/KIE • Load Generation Recipe
ComfyUI Node

KIE • Load Generation Recipe

Read back the exact prompt behind that paid render

By felipederosilva·Created 2 months ago·Updated 3 days ago· 3
KIE • Load Generation Recipe
    • model
    • prompt
    • task_id
    • recipe_json
    ◄recipe_id▾►

    What it is

    The read half of the pack's receipt system. KIE • Save Generation Recipe writes an immutable record of one paid generation - model, exact prompt, camera plan, references, task ID, result URLs, confirmed spend. This node lists those records and reads one back into the graph.

    Six weeks later, "what prompt produced that take, and what did it cost" is otherwise a scroll through your history and a guess. That's the gap this closes.

    How it works

    Recipes are JSON files in your ComfyUI user data area, under the pack's recipes folder. The dropdown is built by globbing that folder, so entry names are the recipe IDs: task-<slug of the KIE task id> when the record has a task ID, or draft-<20 hex chars> when it doesn't. The hex is the first 20 characters of the SHA-256 of the record content, which means two records with identical content share an ID - and that's fine, because identical content is the same recipe.

    On load it does one thing beyond reading the file: it re-computes the content hash over schema_version, model, prompt, task_id, credits_consumed, camera_plan, references, result_urls and compares it to the stored content_sha256. If someone edited the file by hand, you get "Saved recipe content has changed since creation" instead of quietly loading altered data. Nice touch for anything you'd call an audit trail.

    Inputs and outputs

    One required input: recipe_id, chosen from the dropdown. Nothing else.

    Four outputs:

    • model - the exact model identifier that ran.
    • prompt - the text you sent, verbatim.
    • task_id - the KIE task ID.
    • recipe_json - the whole record, pretty-printed, including camera plan, references, result URLs, spend and timestamp.

    The reads you'll actually use: wire prompt into a prompt widget to re-run a shot with a tweak; render recipe_json through KIE • Review Text so it's visible inside the graph and persists; and take task_id into KIE • Reuse Completed Video (convert the widget to an input) to re-download the original result rather than paying for a new generation.

    Loading is a file read. It does not generate anything and cannot spend credits.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
    python -m pip install -r ComfyUI-KIE-Nodes-Next/requirements.txt
    

    Same node pack, same one-time key setup in Settings → KIE.ai Nodes Next → Connection - though this node needs no key at all, since it never talks to KIE.

    Where people get burned

    • The dropdown is stale. It's built when the node registers. Save a recipe and the node already on your canvas won't list it. Re-add the node or refresh the definitions. Same story as the other dropdown nodes in this pack.
    • "Recipe not found." The file was moved, renamed, or lives in a different user-data directory than the one ComfyUI is using now. Recipes are per-profile, not per-workflow.
    • Nothing is saved automatically. The README is blunt about this: record creation is explicit, not automatic for every generator. If you never connect a Save Generation Recipe node, you have no receipts. Wire task_id, prompt and credits_consumed straight off a generation node's outputs.
    • Recipe IDs are not human-friendly. task-1a2b… is not something you'll recognise from memory. Add a note node, or keep a naming habit, or you'll be opening JSON files to find the one you meant.
    CategoryKIE Next/Studio/Production

    Inputs (1)

    NameTypeDefaultDescription
    recipe_idCOMBO1 options: (no saved recipes)

    Outputs (4)

    NameTypeDescription
    modelSTRING—
    promptSTRING—
    task_idSTRING—
    recipe_jsonSTRING—