Original title: Viggle/Viggle-Image-Swap
The Qwen-Image-2.1 LoRA (rank 256) released by Viggle: Completely replaces the person in a photo with the character from the reference sheet, changing the face, hair, body, and clothing while preserving the original pose, expression, composition, background, and lighting. Each person to be replaced requires a 1536×1024 reference sheet (the left third is a portrait, and the right two-thirds are front, side, and back views); you can also paste a real-life face photo into the portrait section, but a single standalone photo is not supported. The default setting uses 6 steps without CFG; when adding --turbo, the first 2 steps use the LoRA to define the character, and the subsequent 6 steps are handled by Qwen-Image-2.1-Turbo to refine details. The output is approximately 1 MP. Official tests on a single B200 measured approximately 2.2 seconds per image with peak VRAM usage of 46 GB, while turbo mode takes about 4.1 seconds and uses 55 GB.
Why it matters No need for reshoots when doing character insertion, advertising, or still adaptation; two people can be replaced in a single photo simultaneously, with default output generated in six steps
Rising score 47 · Likes 49 · Downloads 2004
Reasons
- Can replace multiple people at once and specify which one to keep; swap.py automatically writes prompts based on person position (left, right, nth person)
- Includes color correction: adjusts overall brightness back to the original image based on unchanged background pixels
Usage
- Install specified versions of transformers, peft, and a pinned commit of diffusers as per the README
- python inference/swap.py --src scene.png --char sheet.png "man in a green shirt" --out out.png; for multiple people, use multiple --char flags with --left to specify position and --kept to specify the person to retain
- Add --turbo for sharper details (this will additionally load Qwen-Image-2.1-Turbo)
Risks
- Licensed under Qwen Research License, restricted to research and evaluation only; commercial use requires separate application to the Qwen team; models loaded via --turbo are subject to the same restrictions
- Limitations listed by the author: new characters sometimes retain the original person's clothing, and pose/composition may drift; --turbo occasionally brings back the original person's accessories, clothing, or even the entire person
- Can be used to replace real-person likenesses; obtain authorization before using others' portraits and note AI generation when publishing
- High VRAM requirements; this entry has not been run, so refer to the model card for actual performance