Instructions to use jzhang-POP/qwen-edit-segmented-figure-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use jzhang-POP/qwen-edit-segmented-figure-lora with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2511", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("jzhang-POP/qwen-edit-segmented-figure-lora") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2511", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("jzhang-POP/qwen-edit-segmented-figure-lora")
prompt = "Turn this cat into a dog"
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
image = pipe(image=input_image, prompt=prompt).images[0]Segmented figure LoRA β Qwen-Image-Edit-2511
A LoRA for flat vector-style characters built from stacked rounded segments, trained to correct two things an edit model gets wrong on that style: the outline comes out too thin, and the figure comes out too slim.
Use
Stack it after the speed LoRA, model-only:
LoraLoaderModelOnly(lora_name="bib_sil_v1.safetensors", strength_model=1.0)
Use strength 1.0. That is measured rather than assumed β see below.
Training
| base | Qwen-Image-Edit-2511 |
| arch | qwen_image_edit_plus |
| rank / alpha | 32 / 32 |
| steps | 1200 |
| lr | 1e-4 |
| batch | 1 |
| data | 35 reference images, silhouette β art |
Measured
12 poses, 8β12 samples each, fixed seeds, identical prompts across arms. "Outline" is the fraction of the figure that is outline; the target is the value measured off the reference artwork (0.2940). "Distance" sums the absolute error across outline, bulk and tint.
| strength | outline | vs target | distance | gap closed, per pose |
|---|---|---|---|---|
| 0.6 | 0.2765 | β0.0175 | 0.0562 | 15.6% |
| 0.8 | 0.2830 | β0.0110 | 0.0489 | 24.2% |
| 0.9 | 0.2866 | β0.0074 | 0.0445 | 29.0% |
| 1.0 | 0.2915 | β0.0025 | 0.0371 | 29.6% |
| 1.1 | 0.2929 | β0.0011 | 0.0363 | 26.3% |
| 1.2 | 0.2973 | +0.0033 | 0.0385 | 25.1% |
Untouched baseline: outline 0.2670, distance 0.0701.
Outline moves monotonically and crosses the target between 1.0 and 1.2. 1.1 has the closest outline of all and a nominally shorter distance, but by 0.0008 β smaller than the ~0.002 these figures move purely from changing the sample count, so it is noise. Per pose 1.0 wins by 3.3 points, which is outside that noise. Hence 1.0.
Direction is consistent: outline moves toward the target on 12 of 12 poses.
Two caveats on the numbers
The bulk measure misreads a crouch. It is body area over bounding-box height squared, so a crouched pose scores as far bulkier than an upright one however well it is drawn β 0.448 against 0.21β0.26 for upright poses. Compare configurations within a pose; do not compare a crouch against an upright target.
Aggregate closure flatters. Taking a median per attribute across poses first lets poses cancel, which gives 47.1% at strength 1.0. The median of per-pose closures is 29.6%. The per-pose figure is both the more honest answer to "what does one picture get" and the steadier one: going from 8 to 12 samples a pose moved the aggregate 2.8 points and the per-pose figure 1.0.
Contents
bib_sil_v1.safetensorsβ the weights referenced aboveconfig.yamlβ the training configoptimizer.ptβ optimizer state, for resumingbib_sil_v1_0000*.safetensorsβ intermediate checkpoints, every 200 steps
Checkpoints below 1200 steps are undertrained and were not evaluated.
- Downloads last month
- -
Model tree for jzhang-POP/qwen-edit-segmented-figure-lora
Base model
Qwen/Qwen-Image-Edit-2511
# Gated model: Login with a HF token with gated access permission hf auth login