Batch Text-to-Image
Batch generate brand new images from multiple text prompts. Supports both directory scan mode and config file mode, suitable for large-scale content generation.
meitu batch text-to-image
Note: Batch processing is available from meitu-cli v2.1.1 onward. Please upgrade if you're on an older version.
Usage Examples
# Scenario 1: Directory scan mode (simple batch generation)
meitu batch text-to-image \
--input-dir ./prompts \
--output-dir ./generated \
--size 2K \
--ratio 16:9 \
--json
# Scenario 2: Config file mode (customized parameters)
meitu batch text-to-image \
--config ./batch.text-to-image.yaml \
--output-dir ./generated \
--json
# Scenario 3: High-concurrency batch generation
meitu batch text-to-image \
--input-dir ./prompts \
--output-dir ./generated \
--model praline_pro \
--concurrency 5 \
--max-retries 2 \
--skip-exist \
--json-output ./result.jsonConfig File Example
version: 1
defaults:
outputDir: ./generated
size: 2K
ratio: 16:9
model: gummy
items:
- prompt: an orange cat sitting on a windowsill, simple illustration style
- prompt: futuristic city skyline, cyberpunk style
size: 4K
model: praline_pro
- prompt: alpine lake at sunrise, photorealistic style
ratio: 4:3Parameter Reference
| Parameter | Required | Description |
|---|---|---|
--input-dir | No | Input directory, scans text files (one prompt per line) |
--output-dir | Yes | Output directory |
--config | No | Path to YAML/JSON config file |
--concurrency | No | Type: number; Default: 3; Number of parallel tasks |
--max-retries | No | Type: number; Default: 0; Number of retries on failure |
--skip-exist | No | Skip existing output files |
--dry-run | No | Preview the plan without execution |
--no-progress | No | Disable per-task progress logging |
--json | No | Output results in JSON format |
--json-output | No | Write results to a specified JSON file |
--skill-name | No | Skill name for server-side attribution |
--size | No | Type: string; Options: 1K / 2K / 4K; Output resolution |
--ratio | No | Type: string; Aspect ratio |
--model | No | Type: string; Default: auto; Options: auto / gummy / praline_pro |