generate_image
Create images from text prompts on a local SDXL backend, returning an inline preview, exact parameters, and optional full-res PNG base64 for saving.
Instructions
Generate an image (txt2img) on the local SDXL box. Returns an inline preview + (in the text block) the exact params and the full-res PNG base64 to save in your repo.
Args:
prompt: the positive prompt, sent VERBATIM (attention weights like `(grey eyes:1.3)` work).
shot: aspect/framing shortcut — `portrait` (832x1216, default, face-focus), `full-figure`,
`establishing` (1216x832 scene), `square` (1024). Raw width/height override this.
model: checkpoint (default DreamShaperXL_Turbo_SFW). Switched only if different from loaded.
seed: -1 = random (the resolved seed is returned so you can lock it); set it to reproduce.
steps: default 8 (Turbo). cfg: default 2 (Turbo). sampler/scheduler: DPM++ SDE / Karras (Turbo).
negative: extra negative text (combined with the profile; the NSFW block is always appended).
negative_profile: named profile(s), e.g. "sfw-strict" (default), "mature", "candid+sfw-strict".
style: optional positive preset, e.g. "photoreal".
width/height: raw size, must be a VRAM-safe bucket (832x1216, 1216x832, 1024x1024).
include_full: include the full-res PNG base64 in the result (default True; False = preview only,
lighter for rapid iteration — re-run with the echoed seed to get the full-res of a keeper).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cfg | No | ||
| seed | No | ||
| shot | No | portrait | |
| model | No | ||
| steps | No | ||
| style | No | ||
| width | No | ||
| height | No | ||
| prompt | Yes | ||
| sampler | No | DPM++ SDE | |
| negative | No | ||
| scheduler | No | Karras | |
| include_full | No | ||
| negative_profile | No | sfw-strict |