Generators & UtilitiesEnglish

ComfyUI Image Generation

ComfyUI Image Generation (menu title ComfyUI Image Generation...) is a native, dockable Dragonfly panel plugin: it generates images with a local or remote ComfyUI server directly inside Dragonfly, supporting both text-to

Updated 2026-07-04User manual

ComfyUI Image Generation - User Manual

Dragonfly Prototype Apps · ComfyUI Image Generation...

Version 1.0 · 2026-07-04


English Manual

Contents

1. Overview

2. Use Cases

3. Installation and Enabling

4. Runtime Environment and First-Time Setup

5. User Interface

6. Step-by-Step Usage

7. Parameter Reference

8. Outputs

9. FAQ and Troubleshooting

10. Notes and Known Limitations

11. References

1. Overview

ComfyUI Image Generation (menu title ComfyUI Image Generation...) is a native, dockable Dragonfly panel plugin: it generates images with a local or remote ComfyUI server directly inside Dragonfly, supporting both text-to-image (txt2img) and image-to-image (img2img) - with no browser, no web server, and no access token.

Because the panel runs inside the Dragonfly process, it can do two things a web page cannot do directly: first, the img2img init image can be the current Dragonfly view, captured in-process via ReportHelper.captureSnapshot; second, any generated result can be imported into Dragonfly as a published Channel with one click (via createChannelFromNumpyArray + publish).

The underlying engine is ComfyUI - an independent, open-source node-based Stable Diffusion front end. The plugin contains and bundles none of ComfyUI's code; it only talks to it over its standard HTTP API (submit a workflow, poll the history, download results). The protocol lives in the shared comfyui_client.py module (pure Python standard library, the same single implementation used by the web-based ComfyUI panel). The built-in generation workflows are the standard ComfyUI txt2img / img2img graphs (sampler euler, scheduler normal, one image per run).

Licensing: the plugin is only a ComfyUI client. ComfyUI itself and each checkpoint model you load are governed by their own open-source / model licenses - please verify them before deployment; the plugin distributes no models.

2. Use Cases

  • A user sitting at Dragonfly: generate images without a browser or web server and pull results straight into Dragonfly for further analysis (segmentation, measurement, synthetic data, etc.).
  • Capture the current 3D render or slice view as a reference image for an img2img restyle / variation, using the Denoise slider to control how close to stay to the source.
  • Quickly produce imagery for algorithm demos, report figures, or synthetic test data; once imported as a Channel it works with Dragonfly's full toolchain.
  • Complements the web-based ComfyUI panel: the web version targets remote browser users (needs the Prototype Labs Server, a web page, and a token); this plugin targets the local Dragonfly user (needs just Dragonfly).

3. Installation and Enabling

1. Download the Prototype Apps online package from ImageFly and extract it. Close Dragonfly, run install_prototype_apps.exe and select the Dragonfly version to install into.

2. Start Dragonfly, open Prototype Apps ▸ App Store and search for ComfyUI Image Generation. If an Enable button is shown, click it and follow the sign-in, download or installation prompts.

3. Restart Dragonfly when prompted, then open ComfyUI Image Generation from the Prototype Apps menu. Return to App Store to enable or disable it later.

This plugin also requires the separately installed Prototype Labs embedded core, which provides comfyui_client.py. Install the embedded core for the same Dragonfly version, then restart Dragonfly.

To uninstall all Prototype Apps, close Dragonfly and run uninstall_prototype_apps.exe from the online package.

This plugin uses the embedded Prototype Labs core’s comfyui_client.py. Keep the core installed.

4. Runtime Environment and First-Time Setup

This plugin has no Setup Environment button and builds no venv: it runs directly in Dragonfly's own Python (the view snapshot and Channel import use its bundled numpy / Pillow). The plugin itself needs no internet, no GPU, and no WSL. What you actually have to prepare is a reachable ComfyUI server with at least one checkpoint model:

Open Prototype Apps > Server Management. The "ComfyUI Server" group offers two ways to start ComfyUI, both serving the same port (default 8188) - run only one at a time:

  • Start ComfyUI Desktop - launches the installed official ComfyUI Desktop (Electron) app. It manages its own backend and may auto-update, so its API can take a while to come up / may need its window open.
  • Start Git ComfyUI (headless) - the first click auto-installs a self-contained git checkout of ComfyUI (creates a venv and downloads PyTorch plus requirements, about 10-30 minutes, internet required, installed to %LOCALAPPDATA%\DragonflyPrototypeLabs\ComfyUI by default), then runs it windowless on port 8188 - reliable, no auto-update.
  • Either way, ComfyUI keeps running after you close Dragonfly; stop it with the group's Stop button.

After starting, ComfyUI also needs at least one checkpoint model (placed in that ComfyUI's checkpoints model folder). Generation speed depends on the hardware of the machine running ComfyUI: much faster with a CUDA GPU, CPU-only also works but is slow - this is a ComfyUI-side requirement, not a requirement of this plugin.

4.2 Option B: connect to an existing local / remote ComfyUI

If a ComfyUI is already running on this machine or on your network, simply set the ComfyUI URL at the top of the panel to its address (e.g. http://192.168.1.10:8188) and click Connect / Refresh. The URL field's default comes from the environment variables COMFYUI_URL (or COMFYUI_HOST / COMFYUI_PORT, plus the matching DF_PROTOTYPE_LABS_COMFYUI_* variables), otherwise http://127.0.0.1:8188.

4.3 Dependency: the Prototype Labs embedded package

This plugin also requires the separately installed Prototype Labs embedded core, which provides comfyui_client.py. Install the embedded core for the same Dragonfly version, then restart Dragonfly.

5. User Interface

The menu opens a panel titled ComfyUI Image Generation (floating by default; it can be freely docked / moved / floated, and the layout can be saved with the session). From top to bottom:

5.1 Server row

  • ComfyUI URL text field - the ComfyUI server address, default http://127.0.0.1:8188 (see the environment variables in 4.2).
  • Connect / Refresh button - tests reachability (queries /system_stats with a 4-second timeout) and refreshes the checkpoint list; on success the status bar shows "ComfyUI connected — N checkpoint(s).", on failure a red hint points you to Server Management or the URL field.

5.2 Mode and model row

  • Mode combo box - two options: Text → Image (txt2img) (default) and Image → Image (img2img). The init-image area below only appears in img2img mode.
  • Checkpoint combo box (editable) - lists the checkpoint models on the server; you can also type a name directly. If left empty, generation automatically uses the first checkpoint on the server.

5.3 Prompt area

  • Prompt multi-line field - the positive prompt, placeholder "Describe the image to generate". Required for generation.
  • Negative prompt multi-line field - the negative prompt, placeholder example "low quality, blurry"; may be left empty.

5.4 Numeric parameter row

One row of five numeric fields: Width, Height, Steps, CFG, Seed (ranges and defaults in the parameter table, Chapter 7).

5.5 Init image area (img2img mode only)

  • Use current Dragonfly view button - captures the current Dragonfly view in-process as the init image; the snapshot size is the current Width × Height; a thumbnail preview appears on success.
  • Load file… button - pick an image from disk (*.png *.jpg *.jpeg *.bmp *.webp) as the init image.
  • Preview label - shows "(no init image)" until set, then a thumbnail (about 160 px high).
  • Denoise slider + value - range 0.10-1.00, default 0.60; lower stays closer to the init image, higher deviates more freely.

5.6 Generate buttons and status bar

  • Generate button - submits one generation with the current parameters; it runs on a background thread so the UI stays responsive, the button is temporarily disabled, and the status bar shows "Generating… (this can take a while)". A single generation waits at most 15 minutes (900 seconds).
  • Generate samples button - one click runs 6 built-in sample prompts (txt2img, random seed, built-in negative prompt); results stream into the gallery below as each finishes, and hovering a card shows its prompt. No prompt writing needed - handy for quickly validating connectivity and the model.
  • Status bar - small gray text with progress and result info; turns red with an error summary on failure.

5.7 Results area

  • Import as RGB (3 channels) checkbox - unticked by default (grayscale import as 1 Channel); when ticked, the image is split into R/G/B and imported as 3 Channels.
  • Result gallery (scrollable) - one card per generated image: a thumbnail on the left and an Import as Channel button on the right for one-click import into Dragonfly.

6. Step-by-Step Usage

6.1 Text-to-image (txt2img)

1. Make sure a ComfyUI is reachable (Chapter 4), confirm the ComfyUI URL at the top of the panel, click Connect / Refresh, and wait for "ComfyUI connected — N checkpoint(s)." in the status bar.

2. Keep Mode at Text → Image (txt2img) and pick (or type) a model in Checkpoint; if left empty, the first checkpoint on the server is used automatically.

3. Describe the desired image in Prompt and optionally fill in Negative prompt.

4. Adjust Width / Height / Steps / CFG / Seed as needed (Seed -1 means random each time).

5. Click Generate. The status bar shows progress; on completion it reports "Generated N image(s) with <model> (seed <seed>)." and the results appear in the gallery below.

6.2 Image-to-image (img2img)

1. Switch Mode to Image → Image (img2img); the "Init image (img2img)" area appears in the middle of the panel.

2. Set the init image: click Use current Dragonfly view to capture the current view (arrange the Dragonfly view first; the snapshot uses Width × Height), or click Load file… to pick a local image. A preview thumbnail confirms success.

3. Adjust the Denoise slider: lower (e.g. 0.30-0.50) to keep the source composition, higher (e.g. above 0.70) for a heavy repaint.

4. Fill in Prompt (the desired style / content - required) and the other parameters, then click Generate.

5. Note: in img2img mode the output size is determined by the init image (the workflow VAE-encodes the init pixels); Width / Height only affect the size of the "Use current Dragonfly view" snapshot.

6.3 One-click samples (Generate samples)

1. Once connected, simply click Generate samples - no prompt needed.

2. The panel generates 6 built-in samples one after another (the status bar shows "Generated sample i/6…"); each finished image is appended to the gallery, and hovering a card shows the prompt it used.

6.4 Importing results into Dragonfly

1. Choose the import mode: grayscale by default (1 Channel), or tick Import as RGB (3 channels) to keep the colour information.

2. Click Import as Channel on the desired result card.

3. The status bar shows "Imported into Dragonfly as a Channel (<GUID>)." - the new Channel is published into the current session and appears in the object list (named ComfyUI <filename>; in RGB mode you get 3 Channels suffixed (R) (G) (B)), ready to be viewed and processed like any dataset.

7. Parameter Reference

Parameter

Default

Description

ComfyUI URL

http://127.0.0.1:8188

ComfyUI server address; the default can be overridden by the COMFYUI_URL / COMFYUI_HOST / COMFYUI_PORT environment variables.

Mode

Text → Image (txt2img)

Generation mode: txt2img (from text only) or img2img (repaint based on an init image).

Checkpoint

(first server entry)

The checkpoint model to use; pick from the list or type a name; if empty, the first checkpoint on the server is used, and an error is raised if the server has none.

Prompt

(empty)

Positive prompt describing the desired image; required - an empty prompt fails with "Prompt is required.".

Negative prompt

(empty)

Negative prompt describing what to avoid; may be left empty.

Width

512

Output width in pixels, range 64-2048, step 64; in img2img mode it only sets the view-snapshot size (output size follows the init image).

Height

512

Output height in pixels, range 64-2048, step 64; same img2img note as Width.

Steps

20

Sampling steps, range 1-150; more steps mean finer detail but slower generation.

CFG

7.0

Prompt adherence (classifier-free guidance), range 0.0-30.0, step 0.5; higher follows the prompt more closely.

Seed

-1

Random seed, range -1 to 2,000,000,000; -1 means random each run; a fixed value reproduces results (the seed actually used is reported in the completion status).

Denoise (img2img only)

0.60

Denoising strength, slider range 0.10-1.00; lower stays closer to the init image, higher deviates more.

Import as RGB (3 channels)

unticked

Import mode: unticked = convert to grayscale and import as 1 Channel; ticked = split into R/G/B and import as 3 Channels.

The built-in workflows always use the euler sampler with the normal scheduler and generate 1 image per run; a single generation waits at most 900 seconds.

8. Outputs

The plugin produces two kinds of output:

  • The in-panel result gallery - every Generate / Generate samples run shows its images as thumbnail cards in the Results area (Generate clears the gallery first; samples append one by one).
  • Dragonfly Channels (after clicking Import as Channel) - grayscale mode: the image is converted to luminance and imported as one single-slice 2D Channel (named ComfyUI <filename>) which is automatically published; RGB mode: the image is split into R/G/B and published as 3 Channels (names suffixed (R) (G) (B)). This is because a Dragonfly Channel is a scalar field - a single Channel cannot hold colour. Published Channels appear in the object list, can be dragged into views, and participate in any downstream processing; the status bar reports the new object's GUID.

In addition, the ComfyUI server itself saves the finished images in its own output folder as usual (file-name prefix DragonflyPrototypeLabs) - look there if you need the original PNG files.

9. FAQ and Troubleshooting

Q: The status bar shows "ComfyUI not reachable..." in red - what now?

A: No ComfyUI is answering at the given URL. For local use, start ComfyUI first in Prototype Apps > Server Management (Desktop or Git headless - one of the two); ComfyUI Desktop may need extra time after launch before its API is up, and the Git version's first start must complete its 10-30-minute auto-install. For remote use, verify the remote ComfyUI is running, the URL (including the port, default 8188) is correct, and the firewall allows it - then click Connect / Refresh again.

Q: The Checkpoint list is empty, or generation fails with "No ComfyUI checkpoint was found"?

A: The ComfyUI server has no checkpoint models installed. Put at least one model file into that ComfyUI's checkpoints model folder, then click Connect / Refresh to reload the list; you can also type the model name directly into the editable Checkpoint box.

Q: The panel opens with "Could not find comfyui_client.py"?

A: This plugin also requires the separately installed Prototype Labs embedded core, which provides comfyui_client.py. Install the embedded core for the same Dragonfly version, then restart Dragonfly.

Q: Generate complains "img2img needs an init image"?

A: img2img mode requires an init image first - click Use current Dragonfly view to capture the current view, or Load file… to pick an image; generate only after the preview thumbnail appears.

Q: "Use current Dragonfly view" fails with "Could not capture the view"?

A: A current Dragonfly view must exist. Click into a view in the main window first (making it the active view), then capture again; if it still fails, use Load file… with a manually taken screenshot instead.

Q: The imported image is gray in Dragonfly?

A: The default import converts colour images to grayscale (a Dragonfly Channel is a scalar field). To keep the colour, tick Import as RGB (3 channels) before clicking Import as Channel - you get three Channels, R/G/B.

Q: Generation is very slow or times out?

A: Speed depends entirely on the hardware of the machine running ComfyUI (CUDA GPU or not), the model size, and the step count. The first generation with a checkpoint also loads the model into memory on the server. Try smaller Width/Height or fewer Steps; a single generation waits at most 900 seconds - a timeout raises an error but the panel remains usable.

10. Notes and Known Limitations

  • This plugin targets the local Dragonfly user; the panel itself offers no remote access. For remote-browser image generation use the web-based ComfyUI panel (Prototype Labs Server + web page).
  • Each Generate produces one image (batch_size = 1); the built-in workflows are the fixed standard txt2img / img2img graphs (euler + normal) - loading custom ComfyUI workflows is not supported.
  • The img2img output size is determined by the init image; Width / Height do not change the img2img output size (they only set the view-snapshot size).
  • Imported Channels are single-slice 2D data (1 × height × width); colour can only be preserved as 3 scalar Channels.
  • Clicking Generate clears the previous result gallery - import images you want to keep as Channels first (or fetch the files from the ComfyUI output folder).
  • Keep the ComfyUI server running during generation. A ComfyUI started from Server Management keeps running after you close Dragonfly - remember to Stop it when unused to free GPU memory.
  • The Denoise slider's minimum is 0.10; the Seed field's maximum is 2,000,000,000 (with -1, the actual random seed may exceed this display range - the seed reported in the completion status is authoritative).
  • The plugin itself needs no internet; however, the first-time auto-install of the Git ComfyUI in Server Management does need internet to download PyTorch and the requirements.

11. References

  • ComfyUI open-source project (the engine itself, with documentation and model-folder layout): https://github.com/comfyanonymous/ComfyUI
  • Full Package install / enable / uninstall details: the bilingual README inside the installer package.
  • Starting and stopping a local ComfyUI server: the explanatory text inside the Prototype Apps > Server Management panel.
You’ve reached the end of this manual.Explore the library →

PROTOTYPE APPS

Manual assistant

Find an app, understand a parameter, or follow a workflow. Answers include links to the manuals.

Questions and answers are saved long-term to your account. You and site administrators can view them; they may be reviewed to improve the product. Do not submit passwords or confidential data.

All models share a daily allowance. Larger models use more. Chat pauses at the daily protection limit; manual search remains available.

Search the manuals

Cloudflare AI receives your question, recent conversation and relevant public manual excerpts. Records are stored privately in Cloudflare R2 without automatic expiry. Check the cited manual before acting on an answer.