Generate images via SiliconFlow Images API. Default model is Qwen/Qwen-Image-Edit-2509. Supports text-to-image.
Generate images using the SiliconFlow Images API.
Note: Image generation can take 10–60 seconds. Set a higher timeout when invoking via exec (e.g., exec timeout=120).
python3 {baseDir}/scripts/gen.py --prompt "your prompt here"
Useful flags:
# Default model (Qwen/Qwen-Image-Edit-2509), square output
python3 {baseDir}/scripts/gen.py --prompt "a futuristic city at dusk"
# Portrait / landscape sizes
python3 {baseDir}/scripts/gen.py --prompt "mountain lake" --image-size 720x1280
python3 {baseDir}/scripts/gen.py --prompt "mountain lake" --image-size 1280x720
# Use Kolors model (supports guidance/batch)
python3 {baseDir}/scripts/gen.py --prompt "flower field" --model "Kwai-Kolors/Kolors" --batch-size 3
# Save to specific directory
python3 {baseDir}/scripts/gen.py --prompt "sunset" --out-dir ./out/images
| Flag | Default | Description |
|---|---|---|
--prompt | required | Text description for the image |
--model | Qwen/Qwen-Image-Edit-2509 | Model ID |
--image-size | 1024x1024 | Resolution: 1024x1024, 960x1280, 768x1024, 720x1440, 720x1280 |
--batch-size | 1 | Number of images (1–4, Kolors only) |
--steps | 20 | Inference steps (1–100) |
--guidance | — | Guidance scale (Kolors only) |
--negative-prompt | — | What to avoid in the image |
--seed | — | Random seed for reproducibility |
--out-dir | ./tmp/sf-img-<ts> | Output directory |
*.png images named by indexprompts.json mapping index → prompt + URLindex.html thumbnail gallery| Variable | Description |
|---|---|
SILICONFLOW_API_KEY | Your SiliconFlow API key (required) |