Skip to content

Instantly share code, notes, and snippets.

@sammykumar
sammykumar / final_string_widget_logic.md
Created August 30, 2025 13:55
Explanation of the logic for populating the final_string widget in ComfyUI.

The final_string widget is designed to display the output from the Gemini nodes after they execute. Here's a breakdown of how it should work:

Expected Logic for Populating final_string

  1. Node Execution: When a Gemini node (like GeminiUtilVideoDescribe or GeminiUtilImageDescribe) executes, it processes input data and generates output, including the final_string.

  2. Output Handling: Each node should have an onExecuted method that captures the output from the execution. This method is responsible for updating the UI components with the results.

  3. Updating the Widget: The onExecuted method should set the value of the final_string widget to the generated output. This is typically done by accessing the widget instance and assigning the output value to its value property.

  4. Display Logic: The UI should automatically refresh to display the updated value in the final_string widget once the node execution is complete.