Downloads · 30 days
0
ML-Intern-lab/Qwen-Image-2.1-viewpoint-orbit-LoRA
Qwen-Image-2.1-viewpoint-orbit-LoRA is a machine learning model from ML-Intern-lab. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
An RGBA viewpoint-orbit LoRA for Qwen/Qwen-Image-2.1. Give it ONE transparent (RGBA) image of an object and a relative camera instruction; it returns the same object from the requested viewpoint — also as a transparen…
Downloads · 30 days
0
Access
Public
Updated Sep 25, 2026
Repo size
1.1 GB
Likes
34
Public
Click a slice to open those files.
.safetensors1.1 GB · 100%
From the Hugging Face model README
An RGBA viewpoint-orbit LoRA for Qwen/Qwen-Image-2.1. Give it ONE transparent (RGBA) image of an object and a relative camera instruction; it returns the same object from the requested viewpoint — also as a transparent RGBA image.
qwen_image_2, rgba: trueTry it in the Space: ML-Intern-lab/Qwen-Image-2.1-viewpoint-orbit-LoRA.
This exact path was run end-to-end during evaluation (verify_diffusers_lora.py on the pinned diffusers commit; loads with zero dropped-key warnings, output is RGBA):
import torch
from huggingface_hub import hf_hub_download
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained("Qwen/Qwen-Image-2.1", torch_dtype=torch.bfloat16).to("cuda")
lora = hf_hub_download("ML-Intern-lab/Qwen-Image-2.1-viewpoint-orbit-LoRA",
"checkpoints/steps2000res768/orbit_alpha_lora_gate_up_split.safetensors")
pipe.load_lora_weights(lora) # diffusers-keyed file: zero dropped keys
src = ... # your source image, 768x768 RGBA PIL.Image
out = pipe(image=src, width=768, height=768, num_inference_steps=40, true_cfg_scale=1.0,
prompt="<orbit> rotate the camera 90 degrees to the right, eye level. "
"The image has alpha channel and the background is transparent.").images[0]
out.save("orbit.png") # out.mode == "RGBA" — transparency is preserved
Notes:
true_cfg_scale=1.0 (no CFG) is how the model was evaluated and how it is meant to be run here.orbit_alpha_lora_gate_up_split.safetensors is the diffusers-keyed adapter. The original trainer output (checkpoints/steps2000res768/orbit_alpha_lora/orbit_alpha_lora.safetensors) uses ComfyUI-style keys and mostly loads in diffusers, but silently drops the img_mlp.gate_up branch (a fused SwiGLU projection diffusers stores as two separate linears). Use the _gate_up_split file; both are verified to give matching metrics.diffusers @ commit 0121a91f9d419ff7234c8a5923f82c244e6f1914 with transformers>=5.17, peft, torch 2.13+.Azimuth is relative to the source view (scanned objects — and user uploads — have no canonical front); elevation is absolute. Every instruction starts with <orbit>. The full training set is exactly these 23 instructions (80–81 pairs each, 1,844 pairs total):
| low angle | eye level | elevated | |
|---|---|---|---|
| rotate 45° left | ✓ | ✓ | ✓ |
| rotate 90° left | ✓ | ✓ | ✓ |
| rotate 135° left | ✓ | ✓ | ✓ |
| rotate 45° right | ✓ | ✓ | ✓ |
| rotate 90° right | ✓ | ✓ | ✓ |
| rotate 135° right | ✓ | ✓ | ✓ |
| rotate 180 degrees (no left/right) | ✓ | ✓ | ✓ |
| keep the camera angle (elevation only) | ✓ (low angle) | — | ✓ (elevated) |
Verbatim forms:
<orbit> rotate the camera {45|90|135|180} degrees to the {left|right}, {low angle|eye level|elevated} (180 omits left/right: <orbit> rotate the camera 180 degrees, eye level)<orbit> keep the camera angle, {low angle|elevated} (20% of training pairs)At inference we append The image has alpha channel and the background is transparent. — chosen by an A/B on the base model (alpha IoU 0.830 with the suffix vs 0.798 without, on 10 pairs).
160 held-out edits (40 real-scanned objects × 4 targets), 40 inference steps, 768 px, fixed per-pair seeds, metrics against the true renders (LPIPS/PSNR composited on mid-gray):
| config | alpha IoU ↑ | LPIPS ↓ | PSNR ↑ | DINOv2 sim ↑ |
|---|---|---|---|---|
| base model, plain grammar ("rotate the camera 90 degrees to the right") | 0.727 | 0.097 | 21.74 | 0.714 |
base model, <orbit> grammar | 0.731 | 0.099 | 21.74 | 0.713 |
| this LoRA (step-2000 checkpoint) | 0.794 | 0.090 | 22.34 | 0.734 |
By rotation size (alpha IoU): 45° 0.835, 90° 0.773 (base: ~0.67 — the hard bucket, where hidden sides must be invented), 180° 0.835. The step-2000 checkpoint was chosen by best LPIPS with no alpha-IoU loss over {500, 1000, 1500, 2000} on a fixed 48-edit subset; it won on every metric, so no trade-off arose.
Per-edit records: eval/final/, eval/ckpt_select/, eval/baseline/ in ML-Intern-lab/gso-orbit-rgba.
12 text-to-image-generated transparent subjects (cartoon mascot, sneaker, armchair, robot toy, potted plant, game character, perfume bottle, backpack, headphones, coffee mug, desk lamp, rubber duck), orbited 7 views each at eye level by chaining 45° moves — every edit sourced from the original image, never from a generated one. Contact sheets and ping-pong turntable GIFs:
eval/ood/turntable_*.gif in ML-Intern-lab/gso-orbit-rgba — e.g. turntable_sneaker.gif, turntable_robot_toy.gif, turntable_cartoon_mascot.gif.
Where it breaks, honestly:
sd_trainer, control_path editing, rgba: true, match_target_res default, bf16 unquantized (Qwen/Qwen-Image-2.1), adamw8bit, gradient checkpointing, cached text embeddings, timestep_type: weighted, lr 1e-4, batch 1, 2,000 steps, checkpoints every 500.checkpoints/steps2000res768/loss_log.jsonl in this repo (2,000 steps, ~0.01–0.2, no divergence).This adapter is a derivative of Qwen-Image-2.1 and is distributed under the Qwen RESEARCH LICENSE AGREEMENT — non-commercial use only. The verbatim license text is included in this repo as LICENSE.
Change notice (per license §3b): this repo adds only new LoRA adapter weight files (safetensors) trained on top of Qwen/Qwen-Image-2.1; no base-model files are modified or redistributed.
Built with Qwen. "Qwen is licensed under the Qwen RESEARCH LICENSE AGREEMENT, Copyright (c) 2026 Hangzhou Tongyi Laboratory Technology Co., Ltd. All Rights Reserved."
The repo name uses "Qwen-Image-2.1" descriptively, as a fine-tune of Qwen-Image-2.1, which license §4c permits; the adapter itself is called Orbit Alpha (file names keep the orbit_alpha_lora prefix).
QwenImage21Pipeline for inference/eval, LPIPS + DINOv2 for metrics.