Generate image
generate_imageCreate images from text prompts offline with Qwen-Image 2.1. Returns the saved PNG path.
Instructions
Generate an image from a text prompt with the local Qwen-Image 2.1 model. Dimensions are chosen automatically (aspect ratio can be inferred from the prompt, e.g. '16:9 hero image') unless width/height or aspect_ratio are given. Returns the absolute path of the saved PNG. Runs fully offline; typically 45 sā4 min.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for reproducible results; omit or -1 for random | |
| width | No | Output width in pixels (needs height too). Omit to choose automatically. | |
| height | No | Output height in pixels (needs width too). | |
| prompt | Yes | What to generate, in natural language | |
| quality | No | All run Qwen-Image 2.1 Turbo (8 steps): fast = ~1 MP (the default, fastest); balanced = ~1.5K; quality = native 2K (slowest; edits share 2K with their references) | |
| output_path | No | Optional destination (absolute, or relative to the project). Must be inside the project or the app output folder. Existing files are never overwritten; a numbered name is used instead. | |
| aspect_ratio | No | Aspect ratio such as 1:1, 4:3, 3:4, 16:9, 9:16, or auto (inferred from the prompt) | |
| include_preview | No | Also return a small JPEG preview in the tool result. Default false: images stay local and are not sent to the model. |