qwen-edit — скилл для Claude Code: промпты для Qwen-Image
Паттерны промптов и настройки параметров для редактирования изображений через Qwen-Image. Пригодится, когда нужно сохранить лицо на фото или переодеть персонажа.
npx skills add digitalsamba/claude-code-video-toolkit --skill qwen-edit -a claude-codeЧто делает qwen-edit
Скилл оборачивает скрипт tools/image_edit.py, который ходит в облачные деплои Modal или RunPod. По умолчанию используется Qwen-Image-Edit-2511 с лицензией Apache-2.0, на Modal можно развернуть Qwen-Image-2.1 — но уже под некоммерческой лицензией Qwen Research License. Скрипт печатает модель и число шагов после каждого редактирования, так что видно, что именно отработало.
Внутри лежат три файла: prompting.md со структурой промптов, examples.md с удачными и провальными примерами, parameters.md с настройкой шагов, guidance и негативных промптов. Замеры делали на 2511, поэтому перед работой с 2.1 их стоит перепроверить.
Замена фона одним изображением даёт артефакты и ореолы, face swap не удерживает личность по референсу, а outpainting ненадёжно расширяет холст. Мультиизображения работают, если явно описать отличительные черты и поднять guidance примерно до 2.0. Из-за этого скилл подходит для портретов, стилизации и локальных правок, но не для точной замены лиц.
Какие задачи решает
- сохранить лицо при изменении позы или одежды
- перекадрировать фото, где обрезана голова
- применить стиль вроде киберпанка или масляной живописи
- вырезать предмет на прозрачный фон
- собрать композицию из нескольких изображений
Примеры запросов агенту
- отредактируй photo.jpg: добавь солнцезащитные очки
- перекадрируй снимок в портрет, чтобы голова была видна целиком, негативный промпт «blur, distortion, artifacts»
- перенеси человека с person.jpg в сцену с background.jpg, сохранив лицо и причёску
Как установить qwen-edit
1Через Skills CLI (Vercel)
npx skills add digitalsamba/claude-code-video-toolkit --skill qwen-edit -a claude-code2Вручную: положить файлы
~/.claude/skills/qwen-edit/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/qwen-edit/
1Через Skills CLI (Vercel)
npx skills add digitalsamba/claude-code-video-toolkit --skill qwen-edit -a codex2Вручную: положить файлы
.agents/skills/qwen-edit/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add digitalsamba/claude-code-video-toolkit --skill qwen-edit -a cursor2Вручную: положить файлы
.cursor/skills/qwen-edit/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install digitalsamba/claude-code-video-toolkit qwen-edit2Вручную: положить файлы
.github/skills/qwen-edit/SKILL.md1Через Skills CLI (Vercel)
npx skills add digitalsamba/claude-code-video-toolkit --skill qwen-edit -a gemini-cli2Командой платформы
gemini skills install https://github.com/digitalsamba/claude-code-video-toolkit --path .claude/skills/qwen-editВручную: положить файлы
.devin/skills/qwen-edit/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add digitalsamba/claude-code-video-toolkit --skill qwen-edit -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора8
Похожие
Рядом в теме «ИИ и ML»
Всё по теме «ИИ и ML» →Вопросы о qwen-edit
Как установить qwen-edit в Claude Code?
Выполните npx skills add digitalsamba/claude-code-video-toolkit --skill qwen-edit -a claude-code, затем откройте ~/.claude/skills/qwen-edit/SKILL.md.
Что делает qwen-edit?
Даёт агентам паттерны промптов и настройки параметров для Qwen-Image: сохранение лица, переодевание, смена позы, стилизация. Управляется через CLI-скрипт tools/image_edit.py.
Чем Qwen-Image-2.1 отличается от 2511 в этом скилле?
2.1 запускается на Modal как некоммерческий opt-in, идёт с 40 шагами по умолчанию и без Lightning LoRA. На 2511 дефолт — 8 шагов и guidance 1.0, и его можно гонять коммерчески.
Исходный текст
SKILL.md · MIT
---
name: qwen-edit
description: 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.
---
# Qwen-Image-Edit Skill
AI-powered image editing via `tools/image_edit.py`. The model depends on the deployment:
| Deployment | Model | License | Defaults | Max inputs |
|-----------|-------|---------|----------|------------|
| `--cloud modal` (default) | Qwen-Image-Edit-2511 | Apache-2.0, commercial OK | 8 steps, guidance 1.0 | 3 images |
| `--cloud modal`, app deployed with `IMAGE_EDIT_MODEL=qwen-image-2.1` | **Qwen-Image-2.1** (2026-09, unified gen+edit, 7B DiT, RGBA) | Qwen Research License -- **non-commercial** ("research or evaluation purposes only") | 40 steps, guidance 1.0 (no CFG) | 10 images |
| `--cloud runpod` | Qwen-Image-Edit-2511 + Lightning LoRA | Apache-2.0, commercial OK | 8 steps, guidance 1.0 | 3 images |
The tool prints `Model:` and `Steps:` after each edit, so you can tell which model the Modal app
runs and how many steps it took. Without `--steps`, each model runs its own default above.
Opt in with `IMAGE_EDIT_MODEL=qwen-image-2.1 uv run modal deploy docker/modal-image-edit/app.py`;
deploy again without it to switch back.
**Status:** Evolving - learnings being captured as we experiment. The prompt
patterns and parameter findings in `examples.md` / `parameters.md` were measured
on 2511; re-check them on 2.1 before relying on the exact numbers.
### Qwen-Image-2.1 specifics (Modal opt-in)
- **Not step-distilled** -- 40 steps is the model card default. The old 8-step
default was tuned for 2511's Lightning LoRA, which 2.1 doesn't have here, so expect
low step counts to cost quality (untested).
- **Sampled without guidance.** `--guidance 1.0` (default) is how the model is meant
to run. `>1` switches on true CFG (blank negative prompt if you pass none) and
doubles the cost of every step.
- **Multi-image:** the first `--input` is the image being edited ("image 1"); the
rest are references in order ("image 2", ...). Up to 10. Output size follows the
first image's aspect ratio at ~1MP.
- **Local edits:** draw a circle or paint an annotation on the image, or pass a
separate mask as an extra `--input`, and say what to change there
(e.g. "Remove the watch inside the red circle").
- **RGBA:** transparent PNG inputs keep their alpha. For a cut-out, prompt
`"This is an RGBA image with transparency. <subject>. The image has alpha channel
and the background is transparent."` -- the result comes back as an RGBA PNG only
when the model actually produced transparency.
## When to Use This Skill
Use when the user wants to:
- Edit/transform photos while preserving identity
- Reframe cropped images (fix cut-off heads, etc.)
- Change clothing, add accessories
- Change pose (arm positions, hand placement)
- Apply style transfers (cyberpunk, anime, oil painting)
- Adjust lighting/color grading
- Add/remove objects
- Character transformations (Bond, Neo, etc.)
## When NOT to Use
- **Background replacement (single image)** - creates cut-out artifacts, halos
- **Face swapping** - cannot preserve identity from reference
- **Outpainting** - can't extend canvas reliably
## Use With Care
- **Multi-image compositing** - CAN work with explicit identity anchors (see examples.md for prompt patterns). Requires describing distinctive features (hair texture/color, ethnicity, outfit) and using guidance ~2.0
- **Camera angle changes** - Inconsistent results. Vertical angles (low/high) work better than rotational (three-quarter view)
## Quick Reference
```bash
# Basic edit
uv run tools/image_edit.py --input photo.jpg --prompt "Add sunglasses"
# With negative prompt (recommended)
uv run tools/image_edit.py --input photo.jpg \
--prompt "Reframe as portrait with full head visible" \
--negative "blur, distortion, artifacts"
# Style transfer
uv run tools/image_edit.py --input photo.jpg --style cyberpunk
# Background (use cautiously - often fails)
uv run tools/image_edit.py --input photo.jpg --background office
# Higher quality (RunPod / 2511 -- on Modal / 2.1 the 40-step default already is)
uv run tools/image_edit.py --input photo.jpg --prompt "..." --steps 16 --guidance 3.0 --cloud runpod
# Extract the subject onto a transparent background (Modal / 2.1)
uv run tools/image_edit.py --input product.jpg --prompt "This is an RGBA image with transparency. The product from the photo. The image has alpha channel and the background is transparent." --output product_cutout.png
# Multi-image composite (identity-preserving) -- settings tuned on RunPod / 2511
uv run tools/image_edit.py --input person.jpg background.jpg \
--prompt "The [ethnicity] [gender] with [hair description] from first image is now in [scene] from second image. Same [features], [outfit]." \
--negative "different ethnicity, different hair color, different face shape, generic stock photo" \
--steps 16 --guidance 2.0 --cloud runpod
# Multi-image composite on Modal / 2.1 -- up to 10 references, defaults usually suffice
uv run tools/image_edit.py --input person.jpg outfit.jpg shoes.jpg background.jpg \
--prompt "The person from image 1 wearing the outfit from image 2 and the shoes from image 3, standing in the scene from image 4. Same face and hair."
```
## Key Files
- `prompting.md` - Prompt patterns and structure
- `examples.md` - Good/bad examples from experiments
- `parameters.md` - Tuning steps, guidance, negative prompts
## Tool Location
`tools/image_edit.py` - CLI wrapper for the Modal (`docker/modal-image-edit/`) and RunPod
(`docker/runpod-qwen-edit/`) endpoints
## Related Docs
- `docs/qwen-edit-patterns.md` - Character transformation patterns
- `.ai_dev/qwen-edit-research.md` - Research notes
© digitalsamba · MIT · digitalsamba/claude-code-video-toolkit