Nodes/ComfyUI-Session-Memory/⭐ Session Feedback Editor
ComfyUI Node

⭐ Session Feedback Editor

Rate your own images and feed the verdict back into the workflow

By LatentnautΒ·Created 5 months agoΒ·Updated 5 months agoΒ· 0
⭐ Session Feedback Editor
  • thumbnail_images
    β—„session_iddefaultβ–Ί
    β—„modenon_blockingβ–Ί
    β—„num_prompts4β–Ί
    β—„batch_count1β–Ί
    β—„run_summaryβ€”β–Ί

    Here's the uncomfortable truth about the "LLM writes my prompts" workflows everyone's running now: the LLM is the only part of the loop that never learns from your opinion. You stare at the output, think "no, too cluttered, lose the second character," and then the next run asks the same model the same way and gets the same thing back. The Session Feedback Editor is the human-in-the-loop part of this pack that fixes exactly that - an in-node panel where you rate each prompt one to five stars, scribble a note, and the next run turns your verdict into instructions your prompt LLM actually reads.

    It's the only node in the pack with a real UI, and it's the reason the pack exists. The Reader gives the LLM memory; the Writer records runs; this one lets you say what you thought of them.

    How it works

    Placed at the end of the workflow, the Editor loads the latest run from the session file and fires a websocket event to ComfyUI's frontend. A small JS extension (web/session_feedback_editor.js) renders the panel right inside the node: a run navigator (← Run 3/5 β†’), a star row and a notes box per prompt, a thumbnail grid if you fed it images, and a Save Feedback button.

    Here's the part that makes it more than a glorified notepad. Ratings are converted into directives when the Reader builds the next run's context: 1–2 stars β†’ AVOID, 4–5 stars β†’ REPLICATE, and your notes get attached. A 3-star is treated as neutral and dropped entirely - it's not a signal, and the code says so. So the loop is: you rate, you save, next run the Reader injects SESSION_FEEDBACK: blocks like PROMPT 2 (β˜…β˜…β˜…β˜…β˜† - REPLICATE): "love the palette" straight into your LLM system prompt. Your taste becomes the prompt.

    If you wire thumbnail_images, the Editor downscales the sampler's batch to at most 1 megapixel (LANCZOS, JPEG quality 85) and files them under sessions/{session_id}/run_N/prompt_P/img_K.jpg. There's real thought in the dedup logic here - with batch_count > 1, ComfyUI re-executes the whole graph per pass, so the code counts what's already on disk and skips duplicates on re-runs.

    The inputs that matter

    Only a few, and two of them are about telling the truth:

    • session_id - must match the Writer/Reader.
    • mode - non_blocking finishes the run and lets you annotate at leisure; blocking pauses the workflow (up to 10 minutes) until you click Save. Blocking is nice for a tight loop; don't use it if you queue and walk away, because the whole queue waits on you.
    • num_prompts and batch_count - the count of prompts per run and sampling passes per prompt. These must match what your sampler actually produced, because thumbnails are distributed round-robin (image[i] β†’ prompt_{i % num_prompts}). Lie to these and your thumbnails land in the wrong folders.
    • run_summary (optional) - connect from the Writer's output to force the Editor to run after the Writer. This is the ordering trick; use it.
    • thumbnail_images (optional) - the sampler's IMAGE batch.

    There are no outputs - it's a pure output node. It exists to show you a panel and write feedback to the session JSON.

    Installing it

    Part of Latentnaut/ComfyUI-Session-Memory, so it installs with the Reader and Writer. No models, no requirements to babysit - the thumbnail code just uses numpy and Pillow, which ComfyUI already has.

    cd ComfyUI/custom_nodes
    git clone https://github.com/Latentnaut/ComfyUI-Session-Memory
    

    Restart, or install via ComfyUI Manager (search Session Memory). There's no extra server or API key involved - everything runs locally against the session file.

    Gotchas

    The Editor needs at least one run already written, or it just reports "no runs." Set num_prompts/batch_count to match reality or your review is reviewing shuffled images. Remember 3 stars vanishes into the void by design, and feedback only reaches the LLM on the next run through the Reader. And don't panic when blocking mode holds the graph - that's the feature, and it times out after ten minutes if you abandon it.

    Category🧠 Memory

    Inputs (6)

    NameTypeDefaultDescription
    session_idSTRINGdefaultSession identifier. Must match Reader/Writer.
    modeCOMBOnon_blockingblocking = pauses workflow until you save feedback. non_blocking = workflow finishes, annotate later.
    num_promptsINT41–20Number of prompts per run (e.g. 4).
    batch_countINT11–50Times each prompt was sampled. Total images = num_prompts Γ— batch_count.
    run_summaryoptSTRINGConnect from Writer to ensure execution order.
    thumbnail_imagesoptIMAGEBatch of images from sampler. Total = num_prompts Γ— batch_count.

    Outputs (0)

    No outputs