Nodes/ComfyUI-Gemini-Conversation-Canvas/πŸ’Ύ Gemini Session (Save)
ComfyUI Node

πŸ’Ύ Gemini Session (Save)

The checkpoint node that makes your edit history survive a restart

By jeremieLouvaertΒ·Created 5 months agoΒ·Updated 15 days agoΒ· 2
πŸ’Ύ Gemini Session (Save)
  • session
  • session

Gemini conversations live in memory until you do something about it. πŸ’Ύ Gemini Session (Save) is that something - it writes the whole conversation to disk so you can come back to it later, from a different workflow, or after ComfyUI itself has been restarted. In the ComfyUI-Gemini-Conversation-Canvas pack this is the "commit" node, and it's the difference between a fun demo and something you can actually resume.

How it works

The node takes a session and persists it to your ComfyUI output directory:

output/gemini_sessions/{session_name}/session.json
output/gemini_sessions/{session_name}/turn_000.png
output/gemini_sessions/{session_name}/turn_001.png
...

Every turn image is already written to disk as a PNG the moment it's generated - the Save node's real job is serializing the conversation metadata (model, full chat history, turn count, per-turn text) into session.json, using a file lock and an atomic write so a save mid-run doesn't corrupt a session you're also loading elsewhere. All the heavy lifting happens here, and it's the only node in the pack that's flagged as an output node - it lands in the queue results.

One deliberate detail worth knowing: the node strips your API key before writing to disk, so session.json never contains your secret. The flip side is that loading the session later requires you to supply the key again, via the Load node's api_key field, the GEMINI_API_KEY env var, or the gemini_api_key.txt file. Annoying? Mildly. Correct security call? Yes.

Inputs and outputs

Just one input - session - and one output: the same session, passed through untouched. That pass-through matters: you can drop Save mid-chain to checkpoint progress without breaking the flow into the next Edit Turn, or put it at the end of a workflow to archive the finished conversation.

Install and gotchas

Same pack, same install - ComfyUI Manager (search "Gemini Conversation Canvas") or:

cd ComfyUI/custom_nodes/
git clone https://github.com/jeremieLouvaert/ComfyUI-Gemini-Conversation-Canvas
pip install -r ComfyUI-Gemini-Conversation-Canvas/requirements.txt

Restart, and you're done - google-genai, filelock, and Pillow, no model downloads.

The one gotcha is the session name. The save folder is derived from the session_name that was set on Session Start, and non-alphanumeric characters get mangled to underscores. If you can't find a session, check the actual folder under output/gemini_sessions/ - the name on the Load node has to match that folder exactly, spaces and all. Save often; a good rule of thumb is after every edit you'd hate to redo.

CategoryGemini Conversation Canvas

Inputs (1)

NameTypeDefaultDescription
session*Gemini session to save

Outputs (1)

NameTypeDescription
session*β€”