Index of every page on this site: llms.txt
All skills
Run it yourself

AI image editing prompting patterns for Qwen-Image (Qwen-Image-Edit-2511 by default, Qwen-Image-2.1 as a non-commercial Modal opt-in). Use when editing photos while preserving identity, reframing cropped images, changing clothing or accessories, adjusting poses, applying style transfers, or character transformations. Provides prompt patterns, parameter tuning, and examples.

Use this Skill: https://skilld.dev/gh/digitalsamba/claude-code-video-toolkit/qwen-edit

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

parameters.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Qwen-Edit Parameters

Which model? Modal runs Qwen-Image-Edit-2511 unless the app was deployed with IMAGE_EDIT_MODEL=qwen-image-2.1; --cloud runpod runs Qwen-Image-Edit-2511 + Lightning LoRA. The tables below the first one were measured on 2511. See "Qwen-Image-2.1 (Modal opt-in)" at the end for how 2.1 differs.

Available Parameters

Parameter CLI Flag Default Range Notes
num_inference_steps --steps 8 (Qwen-Image-Edit-2511, Modal and RunPod); 40 only on a Modal app deployed with IMAGE_EDIT_MODEL=qwen-image-2.1 4-50 More = higher quality, slower
guidance_scale --guidance 1.0 1.0-7.0 Higher = follows prompt more strictly. On 2.1 this is true CFG, off at 1.0
negative_prompt --negative "" text Things to avoid
seed --seed random int For reproducibility

Steps (--steps)

Controls number of denoising passes. (2511 / RunPod figures -- 2.1 defaults to 40.)

Value Use Case Inference Time
4 Quick preview, Lightning LoRA ~10s
8 Default, good balance ~18s
16 Higher quality, finer detail ~34s
25+ Diminishing returns 45s+

Recommendation: Start with 8. Use 16 for final renders if detail matters.

Guidance Scale (--guidance)

Controls how strictly the model follows your prompt.

Value Behavior
1.0 Default, more creative freedom
3.0 Stronger adherence, more dramatic
4-5 Recommended max for Qwen-Edit
7.0+ Risk of artifacts, over-saturation

Note: Qwen-Edit uses lower guidance than typical diffusion models. Don't go above 5-6.

Recommendation: Start with 1.0. Try 3.0 for more literal interpretation.

Negative Prompt (--negative)

Critical for avoiding artifacts. Always consider using one.

Common Negative Prompts

For portraits/reframing:

blur, blurry, ghostly, distortion, abstract, haze, fog, out of focus

For zoom/scale changes:

black borders, letterbox, vignette, dark edges, frames, cropped

For viewpoint changes:

silhouette, dark figure, no face, shadow, faceless, artifacts, distortion, black

General quality:

deformed, disfigured, bad anatomy, extra limbs, blurry, low quality

Seed (--seed)

Use for reproducibility when iterating on prompts.

# First attempt
uv run tools/image_edit.py --input photo.jpg --prompt "..." --seed 12345

# Same seed, different prompt - compare results
uv run tools/image_edit.py --input photo.jpg --prompt "..." --seed 12345

Cost vs Quality Tradeoffs

Profile Steps Guidance Time Cost
Quick preview 4 1.0 ~10s ~$0.001
Default 8 1.0 ~18s ~$0.002
Quality 16 1.0 ~34s ~$0.004
Dramatic 8 3.0 ~18s ~$0.002
Best 16 3.0 ~34s ~$0.004

(Costs based on L4 GPU @ $0.34/hr)

Experimental Parameters

These are supported by the handler but not yet exposed in the CLI:

Parameter Default Notes
use_fp8 true FP8 quantization (false = BF16 full quality)
auto_resize true Auto-resize input for optimal processing
true_cfg_scale 4.0 Internal CFG scale

To expose these, edit tools/image_edit.py.

Qwen-Image-2.1 (Modal opt-in)

Parameter Default Notes
--steps 40 Model card default, used whenever --steps is not given. 2.1 is not step-distilled and there is no Lightning LoRA for it here, so low step counts degrade faster than on 2511
--guidance 1.0 Maps to the pipeline's true_cfg_scale. 2.1 is meant to be sampled without guidance; >1 enables true CFG (the endpoint supplies a blank negative prompt if --negative is missing) and doubles per-step cost
--negative none Only used when --guidance > 1
inputs 1-10 First is edited, the rest are references or masks

Endpoint-only extras (not exposed in the CLI): output_resolution (default 1024, output area ~= its square; the model is native up to 2K) and explicit width/height.

Measured on the Modal A100-80GB ($0.000694/s), 640x640 input -> 1024x1024 output: 27s inference at 40 steps (~$0.02 warm). A cold call took 111s end to end (~85s of it loading ~33GB of weights), plus the 60s scaledown window -- ~$0.12 for a one-off edit.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

2 warnings2d5 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    This skill provides documentation and prompt engineering patterns for using the Qwen-Image-Edit model. It includes guides for reframing images, style transfers, and identity-preserving composites, as well as deployment instructions for Modal and RunPod. No security issues were detected.

  • Socket2d

    No alerts

  • Snyk2d

    Risk: MEDIUM · 1 issue

  • Runlayer9mo

    4/4 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at b3437fc. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 22 minutes ago.

Activeupdated 4 days ago

README badge

README badge for digitalsamba/claude-code-video-toolkit/qwen-edit