2.5 KiB
2.5 KiB
Final String Widget Demo Workflow
This shows how to set up a workflow to test the final_string widget functionality:
┌─────────────┐ ┌─────────────────────────┐
│ Load Image │ │ Gemini Image Describe │
│ │────▶│ │
│ [Load your │ │ - API Key: [your key] │
│ test image]│ │ - Model: gemini-2.5- │
│ │ │ flash │
└─────────────┘ │ - System Prompt: [...] │
│ - User Prompt: [...] │
│ │
│ ┌─────────────────────┐ │
│ │ final_string widget │ │ ← This widget auto-
│ │ (will auto-update) │ │ populates after
│ └─────────────────────┘ │ execution!
└─────────────────────────┘
│
▼
(Optional) connect `final_string`
to any built-in ComfyUI text display node
if you want it rendered outside the Gemini node.
Step-by-step Instructions:
-
Import the workflow:
- Copy the contents of
example_workflow.json - In ComfyUI, go to "Load" → "Load (from file)" or drag the JSON file
- Copy the contents of
-
Set up the nodes:
- Load Image: Choose any test image
- Gemini Image Describe: Enter your valid Gemini API key
- (Optional) add a built-in ComfyUI text output node (e.g.,
Text/Note) and wire it tofinal_stringif you want the caption outside of the Gemini panel
-
Execute the workflow:
- Click "Queue Prompt" to run the workflow
- Wait for the Gemini API to process the image
-
Check the results:
- The
final_stringwidget on the Gemini node should populate with generated text - Optional downstream text nodes should mirror the same string
- Browser console should show "Updated final_string widget with:" message
- The
What was fixed:
- ❌ Before: final_string widget showed placeholder text
- ✅ After: final_string widget shows actual generated description
The widget update happens automatically when the node execution completes!