Place all workflow JSON files in your Next.js public/ folder:
your-project/
public/
comfyui-workflow.json → displays as "Workflow"
comfyui-anime-style.json → displays as "Anime Style"
comfyui-line-art.json → displays as "Line Art"
comfyui-portrait.json → displays as "Portrait"
comfyui- or contain workflowcomfyui- prefix is stripped automaticallycomfyui-anime-style.json → "Anime Style" in the dropdownThe adapter finds nodes by their title (the _meta.title field in the JSON).
To set a node's title in ComfyUI: right-click the node → Title → type the name.
| Node Title | Recommended Type | Purpose |
|---|---|---|
Input Prompt |
PrimitiveStringMultiline |
The image description from OpenMAIC is injected here |
| Node Title | Recommended Type | Purpose |
|---|---|---|
Width |
PrimitiveInt |
Output width in pixels — set from the requested aspect ratio |
Height |
PrimitiveInt |
Output height in pixels — set from the requested aspect ratio |
KSampler |
KSampler |
Seed is randomised on every generation for varied outputs |
Enable prompt enhancement? |
PrimitiveBoolean |
Set to false to skip LLM prompt enhancement (recommended for speed) |
If Width and Height nodes are not found, the adapter automatically falls
back to patching the Empty Flux 2 Latent node's width and height inputs
directly — so existing workflows without dedicated dimension nodes still work.
Both Width and Height must be present for the explicit node approach to
activate — if only one is found the adapter falls back to the latent node method
and logs a warning.
If Input Prompt is not found, the adapter falls back to a node titled
String (Multiline - Prompt) — so existing workflows still work without
renaming anything.
Connect the output of the Input Prompt node to wherever your prompt text
enters the pipeline — typically the text input of a CLIPTextEncode node,
or a StringReplace node if you use prompt templating.
Connect the output of each node to the corresponding width and height
inputs of your Empty Flux 2 Latent (or equivalent empty latent) node.
Example wiring:
[Input Prompt] ──→ CLIPTextEncode (text)
[Width] ──→ EmptyLatentImage (width)
[Height] ──→ EmptyLatentImage (height)
The workflow JSON must be in ComfyUI API format (not the default save format).
public/ folder⚠️ The regular Save button produces a different format that will not work.
http://localhost:8188)If no workflow is explicitly selected — for example on the autonomous
classroom-media generation path, or before you've clicked a workflow in
Settings — the adapter falls back to the first workflow file discovered in
public/ (alphabetically by display name). It does not rely on any
hard-coded filename, so you don't need a file called comfyui-workflow.json;
any single comfyui-*.json you ship will be used as the default. If public/
contains no workflow files at all, generation fails with a clear error
asking you to add one.
The default Base URL http://localhost:8188 assumes OpenMAIC and ComfyUI run
on the same host (the typical local / self-hosted setup).
When OpenMAIC runs with NODE_ENV=production, a client-supplied Base URL
(x-base-url) that points at localhost, 127.0.0.1, or a private/internal IP
range is rejected with HTTP 403 by the SSRF guard (validateUrlForSSRF). This
is deliberate and matches the behaviour of the other local providers — it stops
a browser client from steering server-side requests at internal services.
Practical implications:
localhost:8188 default
is fine when OpenMAIC and ComfyUI share a host.localhost/private URL sent from the browser
in production will be refused.NODE_ENV ≠ production): the SSRF check is skipped,
so localhost works normally.false. Enhancement can add 3–5 minutes
per image. The prompts generated by OpenMAIC are already descriptive enough.maxResolution set in image-providers.ts (default 1920×1920).