Skip to content

synthetic

Generate synthetic variations of images using image editing models.

Usage

bash
datasety synthetic --input ./images --output ./synthetic --prompt "add a winter hat"

Supported Models

Model FamilyExample Model IDKey Params
FLUX.2 klein FP8 (default)black-forest-labs/FLUX.2-klein-4b-fp8--strength, steps=4, ~5 GB
FLUX.2 klein 9B FP8black-forest-labs/FLUX.2-klein-9b-fp8Better face fidelity, ~10 GB
FLUX.2 klein BF16black-forest-labs/FLUX.2-klein-4B--strength, steps=4
FLUX.2 klein 9B KVblack-forest-labs/FLUX.2-klein-9b-kvKV-cache pipeline, no guidance, ~29 GB
FLUX.2 devblack-forest-labs/FLUX.2-dev--strength, steps=28
QwenQwen/Qwen-Image-Edit-2511--true-cfg-scale, steps=40
FireRedFireRedTeam/FireRed-Image-Edit-1.0--true-cfg-scale, steps=40
FLUX Kontextblack-forest-labs/FLUX.1-Kontext-devsteps=28
LongCatmeituan-longcat/LongCat-Image-Edit-Turbosteps=50
SDXLstabilityai/stable-diffusion-xl-*--strength, steps=30
HunyuanImagetencent/HunyuanImage-3.0steps=50

Cloud API models (--image-api)

When using --image-api, pass any OpenRouter (or OpenAI-compatible) image-generation model via --model:

Model IDTypeNotes
google/gemini-2.5-flash-imagetext+image outputSupports i2i; use --api-aspect-ratio
black-forest-labs/flux.2-fleximage outputt2i and i2i
black-forest-labs/flux.2-proimage outputt2i
sourceful/riverflow-v2-fastimage outputi2i with super-resolution references

Options

OptionDescriptionDefault
--input, -iInput directory(required*)
--output, -oOutput directory(required*)
--input-imageSingle input image
--output-imageSingle output image
--prompt, -pEdit prompt(required)
--modelModel (auto-detects family or API model)black-forest-labs/FLUX.2-klein-4b-fp8
--image-apiUse OpenAI-compatible API for generationfalse
--api-aspect-ratioAspect ratio for --image-api (e.g. 16:9, 1:1, 9:16)auto
--api-image-sizeResolution for --image-api: 0.5K, 1K, 2K, 4K1K
--weightsFine-tuned weights(none)
--loraLoRA adapter (repeatable, :WEIGHT)(none)
--deviceauto, cpu, cuda, or mpsauto
--cpu-offloadForce CPU offloadfalse
--stepsInference steps4
--cfg-scaleGuidance scale2.5
--true-cfg-scaleTrue CFG (Qwen only)4.0
--negative-promptNegative prompt" "
--num-imagesImages per input1
--seedRandom seed(random)
--ggufGGUF path/URL for quantized loading(none)
--strengthImg2img strength (0.0-1.0)0.7
--recursive, -RSearch input directory recursivelyfalse
--output-formatpng, jpg, webppng
--skip-existingSkip images with existing outputfalse
--batch-sizeFlush GPU memory every N images0 (off)
--progressShow tqdm progress barfalse
--dry-runPreview without loading modelsfalse

Examples

bash
# FLUX.2 klein (fast, 8 GB VRAM)
datasety synthetic -i ./dataset -o ./synthetic \
    --prompt "add a winter hat" --steps 4 --cfg-scale 2.5

# Single image
datasety synthetic --input-image photo.jpg --output-image edited.png \
    --prompt "add sunglasses" --steps 4

# Cloud API — FLUX.2-flex image-to-image
OPENAI_API_KEY=sk-... OPENAI_BASE_URL=https://openrouter.ai/api/v1 \
  datasety synthetic -i ./images -o ./synthetic \
  --prompt "add a winter hat" --image-api --model black-forest-labs/flux.2-flex \
  --api-aspect-ratio 1:1

# Cloud API — Gemini 2.5 Flash (text+image, supports image-to-image)
OPENAI_API_KEY=sk-... OPENAI_BASE_URL=https://openrouter.ai/api/v1 \
  datasety synthetic -i ./images -o ./synthetic \
  --prompt "transform into oil painting style" \
  --model google/gemini-2.5-flash-image --image-api \
  --api-aspect-ratio 3:4 --api-image-size 2K

# Qwen with LoRA
datasety synthetic -i ./dataset -o ./synthetic \
    --model "Qwen/Qwen-Image-Edit-2511" \
    --lora "adapter.safetensors:0.8" \
    --prompt "add a winter hat" --steps 40

# FLUX.2-klein-9b-kv (KV-cache pipeline, ~29 GB VRAM, no guidance_scale)
datasety synthetic -i ./dataset -o ./synthetic \
    --model "black-forest-labs/FLUX.2-klein-9b-kv" \
    --prompt "add sunglasses" --steps 4

# GGUF quantized model
datasety synthetic -i ./dataset -o ./synthetic \
    --model "black-forest-labs/FLUX.1-Kontext-dev" \
    --gguf "path/to/model.gguf" \
    --prompt "add a winter hat" --cpu-offload

# Dry run (preview without processing)
datasety synthetic -i ./images -o ./synthetic --prompt "add a hat" --dry-run

Released under the MIT License.