Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-ThoughtBubble

ComfyUI Extension: ComfyUI-ThoughtBubble

Repo Name

ComfyUI-ThoughtBubble

Author
matthewfriedrichs (Account age: 3701 days)
Nodes
View all nodes(1)
Latest Updated
2026-08-27
Github Stars
0.02K

How to Install ComfyUI-ThoughtBubble

Install this extension via the ComfyUI Manager by searching for ComfyUI-ThoughtBubble
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-ThoughtBubble in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ComfyUI-ThoughtBubble Description

ComfyUI-ThoughtBubble is a visual prompt-building node that combines reusable text bubbles into image prompts, with random or sequential variations, conditional text, negative prompts, and area controls.

ComfyUI-ThoughtBubble Introduction

ComfyUI-ThoughtBubble is a custom ComfyUI node that gives you a visual workspace for building image prompts. Instead of keeping every idea in one long text box, you can place text in separate “thought bubbles” on a canvas, arrange them by theme, and bring them together into a final prompt.

This is useful when you want to explore variations without repeatedly rewriting your prompt. For example, you can keep your subject, setting, and style in separate boxes, then use commands to combine them. You can also cycle through choices across generations, draw random options from lists, add negative-prompt text, and set up rules that react to words already in the prompt.

ThoughtBubble canvas

How ComfyUI-ThoughtBubble Works

Think of the canvas as a whiteboard for your prompt. Each box holds an idea or a piece of text. By default, the box titled output is the starting point for the final prompt. You can reference other boxes from it, so your ideas stay separate and easy to edit. You can also maximize another box to use its content as the prompt source instead.

ThoughtBubble reads the commands you type into text boxes when generating the prompt. A command can pull in another box, choose one item from a list, load text from a file, or make a decision based on words that appear earlier in the prompt.

For example, you might put a portrait of a traveler in one box and warm evening light in another. In the output box, you can reference both boxes to assemble the prompt. Later, changing the lighting box updates the assembled prompt without requiring you to rewrite the subject.

The node has a seed for repeatable random choices and a main iterator for moving through lists across runs. If you need different parts of the prompt to change independently, you can create variables in a Controls box and link commands to those variables.

ComfyUI-ThoughtBubble Features

The visual canvas

Add the ThoughtBubble node from ComfyUI’s Workflow Efficiency category. Its canvas lets you organize prompt pieces spatially:

  • Create a box: Left-click and drag on empty canvas space, or double-click to open the creation menu.
  • Move a box: Drag its header.
  • Resize a box: Drag its bottom-right corner.
  • Move around the canvas: Middle-click (or click the scroll wheel) and drag.
  • Zoom: Use the scroll wheel.

The canvas is useful for keeping related ideas together—for instance, grouping character descriptions in one area and scene details in another.

Reusing text with v(...) and o(...)

Use v(...) to define a reusable piece of text or bring another box or variable into your prompt:

What you want to doCommand
Define a variable`v(variable_name
Reference a box or variablev(name)
Combine boxesv(box1 + box2)

Use o(filename_without_extension) to load a reusable .txt snippet from ComfyUI/user/textfiles. As you type, the editor suggests available text-file names. This can help when you reuse a long style description across several prompts.

Negative prompts and LoRAs

Write -(text to make negative) to move text into the negative prompt. For example, beautiful painting -(ugly, deformed) keeps the painting description positive while placing ugly, deformed in the negative prompt.

Use lora(lora_name:strength) to apply a LoRA, or lora(lora_name:model_strength:clip_strength) when you want separate model and CLIP strengths. The editor suggests LoRA names as you type. The LoRA you choose can change the generated result; the command makes it easier to include that choice in your prompt setup.

Random choices with w(...) and r(...)

Use w(...) when you want a different option selected from a list:

  • Write choices directly: w(forest | city | seaside)
  • Read choices from a file: w(filename_without_extension) selects a line from a file in ComfyUI/user/wildcards.

By default, wildcard randomness follows the node’s seed, so the same seed can repeat random selections. You can instead link w(...) to a variable in a Controls box. A Randomize variable generates a new random seed for that command on each run; Fixed, Increment, and Decrement variables can select list items by index.

Use r(max) or r(min|max) to generate a random number within a range. For example, A stack of r(10) books can vary the number in the description.

Sequential choices with i(...)

Use i(...) to move through options in order rather than choosing at random. With i(cat|dog|bird), successive iterator values select cat, dog, and bird, then loop back to cat. You can also use i(filename_without_extension) to step through items in a file.

By default, i(...) uses the node’s main iterator, which is designed to change on each run. This is helpful for making a planned set of prompt variations or “prompt traveling.” If you want more than one sequence, link an i(...) command to a variable from a Controls box. Each linked variable can have its own behavior, such as incrementing, decrementing, or staying fixed.

ThoughtBubble also supports combinations of lists and templates. For example:

i( (a cat|a dog) | with (green|orange) fur )

This cycles through a cat, with green fur; a cat, with orange fur; a dog, with green fur; and a dog, with orange fur before returning to the start.

Example of sequential prompt variations

The example image uses a two-dimensional array to cycle through nine possible prompts. Conditional commands then inspect the selected text to further control the output.

Controls boxes

A Controls box holds named variables that can control commands across generations. To set one up:

  1. Double-click the canvas and create a Controls box.
  2. Select + Add Variable.
  3. Give the variable a unique name, choose its behavior—Increment, Decrement, Randomize, or Fixed—and set a starting value.
  4. Type i( or w( in a text box and use the dropdown to link the command to your variable.

For example, you could let one variable advance through subjects while another stays fixed on a particular background. This gives you more control than changing every choice with the main iterator or seed.

Area conditioning with a(...)

Special area boxes let you apply prompt text to a specific region of the image. Reference an area box with a(title_of_area_box). This is useful when you want different parts of a composition to have different descriptions, rather than treating the entire image as one undivided scene.

Conditional text with ?(...) and ??(...)

Use a conditional when part of your prompt should depend on text that appears before the command.

?(keywords|text_if_true|text_if_false) checks for keywords and adds their weights together. If the total is 1.0 or more, it outputs the true text; otherwise, it outputs the false text. Keywords without a stated weight count as 1.0. Weights can be decimals, such as 0.5, or integer percentages, such as 50 for 0.5.

For example:

?(pointy ears:0.5, whiskers:0.5 | It's probably a cat | Not a cat)

If both pointy ears and whiskers appear earlier, their weights total 1.0, so the command outputs It's probably a cat. If only one appears, it outputs Not a cat.

Use ??(...) for several possible checks. It tests weighted keyword groups in order and outputs the text for the first group whose weight reaches 1.0:

??(key1:w1,key2:w2:output_if_true | key3:w3:another_output | ...)

Advanced text commands

  • h(text) — Hidden text: Processes commands inside the parentheses without showing that text in the final output.
  • c(text) — Clean text: Cleans a text string, including redundant parentheses and certain special characters.
  • f(...) — Conditional replacement: Supports more complex text replacement using fuzzy matching and conditions. For example, f((cat:80) & (animal) | dog) replaces cat with dog only when animal is also present and the match meets the 80 similarity threshold.

Troubleshooting ComfyUI-ThoughtBubble

If a prompt does not change as you expect, check the part of the canvas that supplies its text:

  • Your edits are not appearing in the prompt: Check the box titled output, which is the default prompt source. If you intended to use a different box, maximize that box to make it the source.
  • A list is changing randomly instead of in order: Use i(...) for sequential selection. w(...) selects from a list randomly by default.
  • A list is not advancing between generations: Check the node’s main iterator value. If the command is linked to a Controls variable, check that variable’s behavior and starting value instead.
  • A random choice keeps repeating: Check whether the same seed is being used. For independent changes on each run, you can link w(...) to a Randomize variable.
  • A conditional chooses the unexpected branch: Make sure the keywords appear before ?(...) in the assembled prompt. Then check the weights: the true branch requires a combined total of at least 1.0.
  • A file or LoRA name is not suggested: For o(...), check that the snippet is a .txt file in ComfyUI/user/textfiles. For w(...), check the file in ComfyUI/user/wildcards. Type the file name without its extension. LoRA suggestions appear as you type lora(...); check the name you are entering against your available LoRAs.

Frequently asked questions

What is the difference between the seed and the iterator?
The seed makes random choices repeatable. The iterator selects successive entries from lists used by i(...).

Can two parts of my prompt advance at different rates?
You can give them separate variables in a Controls box and link each i(...) command to the variable you want it to follow.

Do I have to put my entire prompt in the output box?
No. You can keep ideas in separate boxes and reference them from output with v(...).

Can I reuse choices stored outside the canvas?
Yes. o(...) loads a text snippet from user/textfiles, while w(...) and i(...) can use text files as sources for choices.

ComfyUI-ThoughtBubble Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

ComfyUI-ThoughtBubble detailed guide | ComfyUI