viggle-image-swap-v0.1-lora.safetensors

更新:2026-11-09 17:45|发布时间:2026-11-09 17:45
0
0
1
viggle-image-swap-v0.1-lora.safetensors. --- license: other license name: qwen-research license link: LICENSE base model: Qwen/Qwen-Image-2.1 base model relation: adapter library n…
viggle-image-swap-v0.1-lora.safetensors - 2
viggle-image-swap-v0.1-lora.safetensors - 3
viggle-image-swap-v0.1-lora.safetensors - 4
viggle-image-swap-v0.1-lora.safetensors - 5
viggle-image-swap-v0.1-lora.safetensors - 6
头像
Gugugaga
类型
LoRA
基础模型
Qwen-Image
发布时间
2026-11-09 17:45
文件签名
3808de6b999e9552480c537c728d6f68951fafb7707c1f3d443d7625553984ec
viggle-image-swap-v0.1-lora.safetensors
1.27 GB

license: other license_name: qwen-research license_link: LICENSE base_model: Qwen/Qwen-Image-2.1 base_model_relation: adapter library_name: diffusers pipeline_tag: image-to-image tags:

  • diffusers
  • lora
  • image-to-image
  • image-editing
  • character-swap
  • few-step
  • qwen-image

Viggle Image Swap

Built with Qwen.

A LoRA adapter for Qwen/Qwen-Image-2.1. It replaces people in a picture with characters from character sheets. Each person is replaced whole: face, hair, body and clothes. The pose, expression, framing, background and lighting of the picture stay as they were. It samples in 6 steps without classifier-free guidance, or, with --turbo, in 2 steps handed over to Qwen-Image-2.1-Turbo for 6 more: sharper detail.

Two dancers recast as playing-card royals

Examples

Each row is: the character sheet(s), the source picture, the output. All are made with inference/swap.py at its defaults (seed 0, tone fix on); the only inputs are the sheets, the source and the short WHO text shown.

The top image replaces two people at once: --char queen.png woman --char king.png man --left 1 2.

Dancer recast as an astronaut One person, letterboxed source: --char astronaut.png dancer

Ballroom couple recast as flamingos Two people in close contact, both replaced: --char flavio.png man --char fleur.png woman --left 1 2

Selfie recast as a 1920s aviatrix A close-up selfie: --char odessa.png woman

Man recast as a pineapple mascot A full-body mascot costume; the prop in his hand stays: --char pete.png man

filewhat it is
viggle-image-swap-v0.1-lora.safetensorsthe LoRA (rank 256, alpha 256), bf16, diffusers key format
inference/swap.pycommand-line inference: builds the prompt, orders the images, samples, tone fix
requirements.txtthe tested package versions

Inputs

  • The source picture: any size and aspect. The output is 1 MP at the source's aspect, with sides multiples of 32.
  • One character sheet per person to replace: a 1536×1024 image. The left third is a portrait; the right two thirds is a full-body three-view (front, side, back) on a plain background. A photo reference can be used by pasting a face photo over the sheet's portrait cell (left third, rows 128–896, 512×768). A bare photo on its own is not supported.

Image order: the sheets first (image 1, 2, ...), the source last. Each image is shrunk to at most 1 MP.

Prompt

One sentence per character, then one sentence that names what to keep. With one sheet (image 1) and the source as image 2:

Replace the man in a green shirt in image 2 with the character from image 1. Keep everything else exactly as in image 2: the pose, expression, framing, background and lighting.

With two people in the picture and only one replaced, say where the person is and that the other stays:

Replace the woman on the left in image 2 with the character from image 1. Keep everything else exactly as in image 2: the pose, expression, framing, background and lighting, and leave the other person unchanged.

Positions are on the left / on the right, in the middle (three people), or 2nd from the left and so on. inference/swap.py writes these prompts for you (--left, --kept).

Install

pip install -U torch torchvision "transformers==5.17.0" accelerate safetensors "peft==0.18.0" pillow numpy
pip install "git+https://github.com/huggingface/diffusers.git@80c7ed262aeffbeb43ef13ae04baeb9b84515a69"

QwenImage21Pipeline is pinned to that diffusers commit, which is what this adapter was tested on.

Usage

Command line:

See the full description on the original page

作品

暂无作品