AI · 15 — Image (text → picture)
A prompt becomes a picture through the ◈-wired image model and is saved to ./ai-demo-image.png. Wired for LocalAI's Stable Diffusion on :8081 (docker run -p 8081:8080 -e MODELS=/aio/cpu/image-gen.yaml localai/localai:latest-aio-cpu). ⏳ CPU diffusion at 256×256 takes about a minute (512×512 ≈ 4–5 min) — watch the Console: a start marker fires immediately and THE PICTURE APPEARS RIGHT THERE when it finishes (also saved to ./ai-demo-image.png). Point the ◈ carrier at any OpenAI-compatible image endpoint (or a GPU box) for fast generations.
What’s inside
7 nodes — every type links to its full reference page.
| Step | Node | Type |
|---|---|---|
| Prompt | Inject | input.inject |
| Heads-up | Console | utility.console |
| Generate | AI Image | ai.image |
| LocalAI images | AI Model | ai.model |
| Show in Console | Show Image | output.image |
| Save png | Write File | storage.write-file |
| Done | Console | utility.console |
Import it
- Studio → Import — paste the JSON below (or the URL
/docs/templates/ai-15-image-text-picture.json). - Or ask the AI Copilot with the JSON pasted after the phrase:
import this workflow json into a new workflow named "AI · 15 — Image (text → picture)" - Any credentials the nodes need are
${credential.…}references — add them once in Admin → Credentials and the template picks them up. Nothing secret ships in a template.
The workflow document (flowdrome.workflow.v1, 6 node types)
{
"schemaVersion": "flowdrome.workflow.v1",
"id": "",
"name": "AI · 15 — Image (text → picture)",
"version": "0",
"status": "draft",
"nodes": [
{
"id": "seed",
"type": "input.inject",
"label": "Prompt",
"category": "trigger",
"config": {
"contentType": "application/json",
"payload": {
"prompt": "a watercolor painting of a fox reading a book under a lamp"
}
},
"position": {
"x": 0,
"y": 0
}
},
{
"id": "mark",
"type": "utility.console",
"label": "Heads-up",
"category": "utility",
"config": {
"message": "🎨 generating… CPU stable-diffusion at 256×256 takes ~1 minute — the run is alive, let it finish"
},
"position": {
"x": 530,
"y": 0
}
},
{
"id": "draw",
"type": "ai.image",
"label": "Generate",
"category": "ai",
"config": {
"baseUrl": "http://localhost:8081/v1",
"apiKey": "",
"model": "stablediffusion",
"promptField": "prompt",
"size": "256x256",
"timeoutMs": 600000
},
"position": {
"x": 1060,
"y": 0
},
"attachments": {
"model": "img"
}
},
{
"id": "img",
"type": "ai.model",
"label": "LocalAI images",
"category": "ai",
"config": {
"provider": "generic-url",
"baseUrl": "http://localhost:8081/v1",
"apiKey": "",
"model": "stablediffusion",
"models": [],
"temperature": 0.2,
"maxTokens": 512
},
"position": {
"x": 1060,
"y": 222
}
},
{
"id": "show",
"type": "output.image",
"label": "Show in Console",
"category": "output",
"config": {
"imageField": "",
"label": ""
},
"position": {
"x": 1590,
"y": 0
}
},
{
"id": "save",
"type": "storage.write-file",
"label": "Save png",
"category": "io",
"config": {
"path": "./ai-demo-image.png",
"contentMode": "base64",
"inputField": "image",
"append": false,
"createDirs": true,
"encoding": "utf8"
},
"position": {
"x": 2120,
"y": 0
}
},
{
"id": "out",
"type": "utility.console",
"label": "Done",
"category": "utility",
"config": {
"message": "Saved ./ai-demo-image.png ({{ $json.bytes }} bytes)"
},
"position": {
"x": 2650,
"y": 0
}
}
],
"edges": [
{
"id": "e0",
"sourceNodeId": "seed",
"sourcePort": "output",
"targetNodeId": "mark",
"targetPort": "input"
},
{
"id": "e1",
"sourceNodeId": "mark",
"sourcePort": "output",
"targetNodeId": "draw",
"targetPort": "input"
},
{
"id": "e2",
"sourceNodeId": "draw",
"sourcePort": "output",
"targetNodeId": "show",
"targetPort": "input"
},
{
"id": "e3",
"sourceNodeId": "show",
"sourcePort": "output",
"targetNodeId": "save",
"targetPort": "input"
},
{
"id": "e4",
"sourceNodeId": "save",
"sourcePort": "output",
"targetNodeId": "out",
"targetPort": "input"
}
],
"triggers": [
{
"id": "t0",
"nodeId": "seed"
}
],
"meta": {
"snippets": [],
"source": "template-gallery",
"description": "A prompt becomes a picture through the ◈-wired image model and is saved to ./ai-demo-image.png. Wired for LocalAI's Stable Diffusion on :8081 (docker run -p 8081:8080 -e MODELS=/aio/cpu/image-gen.yaml localai/localai:latest-aio-cpu). ⏳ CPU diffusion at 256×256 takes about a minute (512×512 ≈ 4–5 min) — watch the Console: a start marker fires immediately and THE PICTURE APPEARS RIGHT THERE when it finishes (also saved to ./ai-demo-image.png). Point the ◈ carrier at any OpenAI-compatible image endpoint (or a GPU box) for fast generations."
}
} Generated from the verified demo corpus — this exact document seeds and runs on a fresh Flowdrome. Raw JSON: ai-15-image-text-picture.json.