Text-to-Image Processor
Overview
The Text-to-Image Processor (text_to_image) generates a brand-new PNG image from a text prompt. It supports:
-
Multiple model backends, including:
- SDXL (
sdxl) - Flux Schnell (
flux) - Flux v1.1 Pro (
flux2) - Recraft v3 (
recraft) - Imagen (
imagen,imagen-fast,imagen-ultra)
- SDXL (
-
Positive (
prompt) and negative (negative_prompt) guidance -
Fixed sizing (
widthandheightin pixels) -
Free-form overrides via
options_json—all values are sanitized and clamped before calling the model
Example Usage
- processor:
processor: "text_to_image"
params:
prompt: "A samurai standing under cherry blossoms"
negative_prompt: "blurry"
model: "sdxl"
seed: 42
width: 800
height: 600
options_json: |
{
"num_inference_steps": 28,
"guidance_scale": 3.5,
"aspect_ratio": "4:3"
}
outputs:
target: "mem/samurai.png"
Inputs
This processor does not require a source image.
| Key | Required | Description |
|---|---|---|
| — | — | N/A |
Params
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| prompt | string |
Yes | — | Positive text describing the desired image. |
| negative_prompt | string |
No | "" |
Text to steer the model away from unwanted content. |
| model | string |
No | "sdxl" |
Model code (e.g. "flux", "flux2", "sdxl", "recraft", "imagen", "imagen-fast", "imagen-ultra"). |
| seed | int |
No | (rand) | Random seed for reproducibility. |
| width | int |
Yes | — | Output width in pixels. |
| height | int |
Yes | — | Output height in pixels. |
| options_json | string |
No | "{}" |
JSON string of additional model-specific inputs; allowed keys vary by model and are safely filtered. |
Outputs
| Key | Required | Description |
|---|---|---|
| target | Yes | Path where the PNG is written. |