Extensions/Quality of life Suit:V2
ComfyUI Extension

Quality of life Suit:V2

openAI suite, String suite, Latent Tools, Image Tools: These custom nodes provide expanded functionality for image and string processing, latent processing, as well as the ability to interface with models such as ChatGPT/DallE-2. NOTE: Currently, this extension does not support the new OpenAI API, leading to compatibility issues.

By omar92·Created 3 years ago·Updated 5 months ago· 181
omar92/ComfyUI-QualityOfLifeSuit_Omar92
Nodes51
On cloudLocal install
CategoryO/OpenAI/Advanced/ChatGPT, O/deprecated/OpenAI/Advanced/ChatGPT
Stars181
Updated5 months ago

Nodes (51)

Chat completion _O

The payoff node of the advanced ChatGPT chain

O/OpenAI/Advanced/ChatGPT
Chat_Completion _O

The deprecated ChatGPT endpoint — and what to use instead

O/deprecated/OpenAI/Advanced/ChatGPT
ChatGPT compact _O

ChatGPT with your own system message

O/OpenAI
ChatGPT _O

The old OpenAI loader — read the key from a file

O/OpenAI/Advanced
ChatGPT Simple _O

The flagship 'make my prompt better' node

O/OpenAI
Chat_Message_fromString _O

The deprecated message node that wants a STR

O/deprecated/OpenAI/Advanced/ChatGPT
Chat_Message _O

The building block of the advanced ChatGPT chain

O/OpenAI/Advanced/ChatGPT
CLIPStringEncode _O

A CLIP Text Encode from 2023 that you probably shouldn't use (but might already have)

O/deprecated/string
combine_chat_messages _O

The glue node that turns your ChatGPT calls from one-shot into a real conversation

O/OpenAI/Advanced/ChatGPT
compine_chat_messages _O

A deprecated chat-message combiner that only exists for old workflows

O/deprecated/OpenAI/Advanced/ChatGPT
ConcatRandomNSP_O

Append a random term to your prompt mid-graph

O/text/NSP
concat Strings _O

A two-string concat from the pack's prehistory (and why it's stuck on the old STR type)

O/deprecated/string/operations
Concat Text _O

Glue a prompt together without a dozen add nodes

O/text/operations
create image _O

Why this node ignores its own 'number' input (and 3 other quirks)

O/OpenAI/Advanced/Image
create_image _O

The deprecated DALL-E node that can't talk to modern OpenAI anymore

O/deprecated/OpenAI/Advanced/Image
debug Completeion _O

See the whole ChatGPT response object, warts and all, right in your terminal

O/debug/OpenAI/Advanced/ChatGPT
debug messages_O

See what you're actually sending to ChatGPT

O/debug/OpenAI/Advanced/ChatGPT
Debug String _O

Debug String _O is a trap — use Debug Text _O instead

O/deprecated/string
Debug Text _O

The lazy way to see what your strings actually contain

O/debug/text
Debug Text route _O

Spy on a string without cutting the wire

O/debug/text
Equation1param _O

A tiny calculator hiding in your graph

O/numbers
Equation2params _O

Two variables, two formulas, one node

O/numbers
float _O

The boring pass-through node you'll wire up anyway

O/utils
floatToInt _O

The conversion nobody reads the docs for

O/numbers
floatToText _O

Get a number into your prompt string

O/numbers
GetImage_(Width&Height) _O

Read an image's real dimensions as numbers

O/numbers
GetLatent_(Width&Height) _O

Read latent dimensions without decoding

O/numbers
ImageScaleFactor _O

Scale an image by a factor, not by pixels

O/image
ImageScaleFactorSimple _O

The one-knob version of factor scaling

O/image
int _O

One integer, reused everywhere

O/utils
intToFloat _O

When a node demands a float and you have an int

O/numbers
LatentUpscaleFactor _O

Scale latents by multiplier, not pixel math

O/latent
LatentUpscaleFactorSimple _O

One knob, both dimensions

O/latent
LatentUpscaleMultiply

The deprecated ancestor of the pack's latent scaler

O/deprecated/latent
load_openAI _O

The honest guide to this pack's OpenAI client

O/OpenAI/Advanced
Note _O

Your workflow's margin notes, minus the margin

O/utils
QOL Split String

Unpack a tag list into separate wires

O/text/operations
RandomNSP _O

Instant wildcard flavour from the Noodle Soup pantry

O/text/NSP
replace String advanced _O

The fully-wired version of a node you shouldn't use

O/deprecated/string/operations
replace String _O

Find-and-replace for the old string suite

O/deprecated/string/operations
Replace Text _O

Find-and-replace for your prompts

O/text/operations
saveTextToFile _O

Log strings to disk without leaving ComfyUI

O/text
seed _O

A seed you can actually route around the graph

O/utils
selectLatentFromBatch _O

Pick one latent out of a batch

O/latent
string2Image _O

Render text to an image, the old way

O/deprecated/string
String _O

The String _O Node Is a Ghost — Meet Its Replacement Instead

O/deprecated/string
Text2Image _O

Render real text into an image for ControlNet

O/text
Text _O

The text box every workflow secretly needs

O/utils
trim String _O

A One-Line Node That Lives in a Dead Dialect

O/deprecated/string/operations
Trim Text _O

The whitespace cleanup nobody wants to do by hand

O/text/operations
variation_image _O

DALL-E 2 Variations, Still Alive in ComfyUI — Barely

O/OpenAI/Advanced/Image
Readme

ComfyUI Quality of Life Suite — Omar92

Thank you to all the valuable contributors. Kindly submit any pull requests to the development branch instead of the main branch. Your efforts are greatly appreciated.

A feature-rich ComfyUI extension providing 50+ quality-of-life nodes including OpenAI (ChatGPT & DALL-E 2) integration, text processing, image/latent scaling, math utilities, and more.


Table of Contents


Features

  • 🤖 OpenAI Integration — ChatGPT (GPT-3.5 / GPT-4) prompt generation and DALL-E 2 image creation
  • 📝 String Suite — Concatenate, trim, replace, split, and save text; convert text to an image
  • 🎲 NSP (Noodle Soup Prompts) — Random prompt term generation from categorised terminology
  • 🖼️ Image Tools — Scale images using multiplication factors instead of fixed pixel dimensions
  • 🔲 Latent Tools — Upscale latents by factor and select individual latents from a batch
  • 🔢 Number / Math Tools — Evaluate equations, convert between types, read image/latent dimensions
  • 🛠️ Utility Nodes — Thin wrappers for text, integer, float, and seed inputs
  • 🐛 Debug Nodes — Write intermediate values to the console, optionally passing them through

All nodes appear in the ComfyUI menu under the O/ top-level category.


Installation

Option A — Manual (zip)

  1. Download the repository as a zip file.
  2. Extract the folder into <ComfyUI root>/custom_nodes/.
  3. The resulting path should look like custom_nodes/ComfyUI-QualityOfLifeSuit_Omar92/.
  4. Restart ComfyUI (a browser reload is not sufficient).

Option B — Git clone

cd <ComfyUI root>/custom_nodes
git clone https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92.git

Then restart ComfyUI.

After installation you will find all nodes grouped under O/… in the node search / right-click menu.

Tip: See how directory should look like.png at the repository root for the expected folder structure.


Configuration

On the first run ComfyUI will automatically create a config.json file inside the extension folder:

{
  "autoUpdate": true,
  "branch": "main",
  "openAI_API_Key": "sk-#################################"
}

| Key | Default | Description | |-----|---------|-------------| | autoUpdate | true | Pull the latest changes from GitHub every time ComfyUI starts. Set to false to disable. | | branch | "main" | Git branch to pull updates from. Use "dev" for the latest development changes. | | openAI_API_Key | placeholder | Your OpenAI API key. Required for all ChatGPT and DALL-E nodes. Get yours at platform.openai.com/api-keys. |

Security note: The API key is stored in config.json and is never embedded in generated images.


Node Reference

OpenAI Suite

Located under O/OpenAI and O/OpenAI/Advanced/….

Simple ChatGPT

ChatGPT Simple _OO/OpenAI

The quickest way to use ChatGPT. Provide a short prompt and the node returns a fully formed Stable Diffusion prompt or a detailed image description.

| Input | Type | Description | |-------|------|-------------| | prompt | STRING | Your input text / subject | | model | dropdown | OpenAI model to use (e.g. gpt-3.5-turbo) | | behaviour | dropdown | tags — returns SD-style comma-separated tags; description — returns a natural language description | | seed | INT | Controls randomness; same seed ≈ same output |

| Output | Type | |--------|------| | result | STRING |

ChatGPT compact _OO/OpenAI

Mid-complexity ChatGPT node with a customisable system initialisation message.

| Input | Type | Description | |-------|------|-------------| | prompt | STRING | User message | | initMsg | STRING | System message that shapes the AI's behaviour | | model | dropdown | OpenAI model | | seed | INT | Randomness seed |


Advanced OpenAI

load_openAI _OO/OpenAI/Advanced

Loads the OpenAI client. Required by all Advanced nodes.

| Input | Type | Description | |-------|------|-------------| | base_url | STRING | API endpoint (defaults to OpenAI; change for compatible providers) | | api_key | STRING | Your OpenAI API key |

| Output | Type | |--------|------| | client | CLIENT |

Chat_Message _OO/OpenAI/Advanced/ChatGPT

Creates a single chat message.

| Input | Type | Description | |-------|------|-------------| | role | dropdown | user, assistant, or system | | content | STRING | Message text |

| Output | Type | |--------|------| | messages | OPENAI_CHAT_MESSAGES |

combine_chat_messages _OO/OpenAI/Advanced/ChatGPT

Merges two message lists into one, allowing you to chain multi-turn conversations.

Chat completion _OO/OpenAI/Advanced/ChatGPT

Sends a message list to the API and returns the model's reply.

| Input | Type | Description | |-------|------|-------------| | client | CLIENT | From load_openAI _O | | model | dropdown | OpenAI model | | messages | OPENAI_CHAT_MESSAGES | Built with Chat_Message / combine_chat_messages | | seed | INT | Randomness seed |

| Output | Type | |--------|------| | text | STRING | | completion | OPENAI_CHAT_COMPLETION |


DALL-E 2

create image _OO/OpenAI/Advanced/Image

Generates images from a text prompt using DALL-E 2.

| Input | Type | Description | |-------|------|-------------| | client | CLIENT | From load_openAI _O | | prompt | STRING | Image description | | number | INT (1–10) | How many images to generate | | size | dropdown | 256x256, 512x512, or 1024x1024 |

| Output | Type | |--------|------| | IMAGE | IMAGE | | MASK | MASK |

variation_image _OO/OpenAI/Advanced/Image

Creates variations of an existing image using DALL-E 2.

| Input | Type | Description | |-------|------|-------------| | client | CLIENT | From load_openAI _O | | image | IMAGE | Source image | | number | INT (1–10) | Number of variations | | size | dropdown | Output resolution |


String Suite

Located under O/text and O/text/operations.

Text _OO/utils Simple pass-through text input node.

Concat Text _OO/text/operations Concatenates up to 13 strings with a configurable separator (default: , ).

Trim Text _OO/text/operations Removes leading and trailing whitespace from a string.

Replace Text _OO/text/operations Replaces all occurrences of a substring with another string.

| Input | Description | |-------|-------------| | text | Input string | | old | Substring to find | | new | Replacement string |

QOL Split StringO/text/operations Splits a string by a delimiter and exposes up to 13 individual outputs.

| Input | Description | |-------|-------------| | text | Input string | | delimiter | Character(s) to split on |

saveTextToFile _OO/text Saves text to a file inside the ComfyUI /output folder. A timestamp is appended to the filename to avoid overwriting.

| Input | Description | |-------|-------------| | text | Content to save | | filename | Base filename | | append | If true, appends to an existing file instead of creating a new one |


Text-to-Image

Text2Image _OO/text

Renders text onto a canvas and outputs it as an IMAGE. Useful with ControlNet to place styled text into a generated image.

| Input | Type | Description | |-------|------|-------------| | text | STRING | Text to render | | font | dropdown | Font selected from the fonts/ directory | | size | INT (0–255) | Font size in points | | font_R/G/B/A | INT (0–255) | Font colour (RGBA) | | background_R/G/B/A | INT (0–255) | Background colour (RGBA) | | width / height | INT | Canvas size in pixels | | expand | bool | Auto-expand canvas to fit the text | | x / y | INT | Text position on canvas |

Custom fonts: Add any .ttf, .otf, or .ttc file to the fonts/ folder and restart ComfyUI — it will appear in the font dropdown automatically.


NSP (Noodle Soup Prompts)

Located under O/text/NSP.

NSP is a community-maintained collection of categorised prompt terms. The extension downloads the list automatically on first use.

RandomNSP _O Returns a random term from the chosen category.

| Input | Description | |-------|-------------| | terminology | Category (e.g. artist, style, subject, …) | | seed | Randomness seed |

ConcatRandomNSP_O Appends a random NSP term to an existing string — handy as an in-route modifier.

| Input | Description | |-------|-------------| | text | Existing string | | terminology | NSP category | | separator | String inserted between text and the NSP term (default , ) | | seed | Randomness seed |


Latent Tools

Located under O/latent.

LatentUpscaleFactor _O Upscales a latent tensor using separate width and height multiplication factors.

| Input | Description | |-------|-------------| | samples | Input LATENT | | upscale_method | Interpolation method | | WidthFactor | Multiplier for width (e.g. 2 doubles the width) | | HeightFactor | Multiplier for height | | crop | Whether to crop after upscaling |

Example: 512×512 latent with WidthFactor=2, HeightFactor=2 → 1024×1024. Use factors < 1 to downscale (e.g. 0.5 → 256×256).

LatentUpscaleFactorSimple _O Same as above but uses a single factor applied to both dimensions.

selectLatentFromBatch _O Picks a single latent from a batch by index. Useful when you generate multiple images and want to apply further processing to just one of them.

| Input | Description | |-------|-------------| | samples | Batch LATENT | | index | Zero-based index of the latent to select |


Image Tools

Located under O/image.

ImageScaleFactor _O Scales an IMAGE tensor using separate width and height multiplication factors.

| Input | Description | |-------|-------------| | image | Input IMAGE | | upscale_method | Interpolation method | | WidthFactor | Width multiplier | | HeightFactor | Height multiplier | | MulOf46 | When enabled, rounds output dimensions to the nearest multiple of 8 — required by most Stable Diffusion models (enabled by default) | | crop | Whether to crop after scaling |

ImageScaleFactorSimple _O Same as above but with a single uniform scale factor.

GetImage_(Width&Height) _OO/numbers Reads the pixel dimensions of an IMAGE and outputs them as separate INT values.


Number / Math Tools

Located under O/numbers.

Equation1param _O Evaluates a Python math expression with one variable x.

| Input | Description | |-------|-------------| | x | FLOAT value for x | | equation | Expression string, e.g. x * 2 + 1 |

Outputs: FLOAT, INT

Equation2params _O Evaluates two expressions with variables x and y.

| Input | Description | |-------|-------------| | x | First FLOAT | | y | Second FLOAT | | equation | First expression, e.g. x + y | | equation_2 | Second expression, e.g. x * y |

Outputs: FLOAT, INT, FLOAT, INT (one pair per equation)

floatToInt _O — Convert FLOAT → INT

intToFloat _O — Convert INT → FLOAT

floatToText _O — Convert FLOAT → STRING

seed2String _O — Convert a SEED value → STRING

GetLatent_(Width&Height) _O — Read width and height from a LATENT tensor as INTs


Utility Nodes

Located under O/utils.

| Node | Output | Description | |------|--------|-------------| | Text _O | STRING | Text input widget | | seed _O | INT | Seed input widget | | int _O | INT | Integer input widget | | float _O | FLOAT | Float input widget | | Note _O | (none) | Read-only sticky note for annotating workflows |


Debug Nodes

Located under O/debug/….

| Node | Description | |------|-------------| | Debug Text _O | Prints [prefix] text to the console. No output — terminal only. | | Debug Text route _O | Same as above but also passes the string through, so it can be inserted mid-route. | | Debug OpenAI Chat Messages _O | Prints the full message list to the console. | | Debug OpenAI Chat Completion _O | Prints the full completion object to the console. |


Example Workflows

The Workflows/ directory contains ready-to-use workflow files and screenshots:

| File | Description | |------|-------------| | All nodes Workdflow .json | Master workflow demonstrating every node | | ChatGPT.png | Simple ChatGPT-to-prompt workflow | | ChatGPT_Advanced.png | Advanced multi-message ChatGPT workflow | | string_o.png | String manipulation node examples |

To load a workflow from an image, drag the PNG file onto the ComfyUI canvas.

Simple ChatGPT Workflow

Simple ChatGPT workflow

  1. Add a ChatGPT Simple _O node.
  2. Type your subject in the prompt field (e.g. "a futuristic cityscape at night").
  3. Choose tags behaviour to get Stable Diffusion prompt tags, or description for a natural language description.
  4. Connect the output STRING to your KSampler positive conditioning.

Advanced ChatGPT Workflow

Advanced ChatGPT workflow

  1. Add load_openAI _O and enter your API key (or rely on config.json).
  2. Create a Chat_Message _O with role = system to set the AI's behaviour.
  3. Create another Chat_Message _O with role = user for your actual prompt.
  4. Use combine_chat_messages _O to merge both messages.
  5. Feed the result into Chat completion _O to get the AI's reply as a STRING.

Fonts

The fonts/ folder ships with several built-in fonts:

| File | Font | |------|------| | Alkatra.ttf | Alkatra | | CALIBRI.TTF | Calibri | | COMIC.TTF | Comic Sans | | COMICI.TTF | Comic Sans Italic | | COMICZ.TTF | Comic Sans Bold |

To add a custom font, copy any .ttf, .otf, or .ttc file into the fonts/ directory and restart ComfyUI. The font will appear automatically in the dropdown of the Text2Image _O node.


Auto-Update

The extension automatically checks for updates every time ComfyUI starts (when autoUpdate is true in config.json). It uses pygit2 to pull the latest commits from the configured branch.

To disable auto-update, open config.json and set:

"autoUpdate": false

To switch to the development branch for the latest (potentially unstable) features:

"branch": "dev"

Thanks for reading, and I hope my tools will help you!

Contact