# **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 (e.g. “flux-dev”, “sdxl-lightning”, “flux-1.1-pro”) - Positive (`prompt`) and negative (`negative_prompt`) guidance - Fixed sizing (`width` and `height` in pixels) - Free-form overrides via `options_json`—all values are sanitized and clamped before calling the model --- ## Example Usage ```yaml - processor: processor: "text_to_image" params: prompt: "A samurai standing under cherry blossoms" negative_prompt: "blurry" model: "sdxl" # one of your supported model codes seed: 42 # reproducible randomness width: 800 # absolute pixels height: 600 # absolute pixels options_json: | { "num_inference_steps": 28, "guidance": 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"`). | | 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 any additional model inputs; keys **must** be whitelisted and are clamped per model rules. | --- ## Outputs | Key | Required | Description | | ------ | :------: | ------------------------------ | | target | Yes | Path where the PNG is written. | ---