You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

D-4966 texture-fix LoRA (private)

Edit LoRAs for Qwen-Image-2.1 that restore the real D-4966 upholstery (dense short-pile ochre plush) on a generated sofa image, leaving shape, seams, tufting, lighting and the room unchanged. They are pass 2 of the D-4966 pipeline: clay render -> Qwen pass 1 -> upscale to 3840 -> tiled, masked fix with this LoRA.

Licence. v1 to v4 are LoRAs for Qwen-Image-2.1 (Qwen Research License: R&D and evaluation only): not for client deliverables without a commercial licence from Qwen. e2511/ is the licence-clean version on Qwen-Image-Edit-2511 (Apache-2.0), trained without any Qwen-2.1 output (legal sign-off still pending).

Versions

Folder Rank Steps Training data Recommended checkpoint
v1/ 32 3,000 base-model regenerations + blur/JPEG/colour drift d4966_texfix_v1.safetensors (3000)
v2/ 64 4,000 + no colour drift, identity pairs, joint relighting d4966_texfix_v2.safetensors (4000)
v3/ 64 4,000 + wrong-fabric and CG-smooth inputs d4966_texfix_v3_000002500.safetensors
v4/ 64 4,000 + Qwen's own plush ("self" pairs) d4966_texfix_v4_000002500.safetensors

Every saved checkpoint is included (every 250 or 500 steps); the file without a step number is the final step. Do not use v4 final (4000): on unseen views it redraws the tufting.

Use v4 step 2500 (v4/d4966_texfix_v4_000002500.safetensors).

Held-out score (share of the texture gap between pass 1 and the real photo that the LoRA closes, 40 crops, higher is better): v1 36%, v2 36%, v3 75%, v4 step 2500 78%. It also keeps the geometry (tufts and seams in place) and, on real pass-1 images from camera views never used in training, keeps colour and shading better than v3 (v3 adds a lighter, golden, patchy cast).

e2511: Qwen-Image-Edit-2511 (Apache-2.0)

Folder Base Rank Steps Recommended checkpoint
e2511/ Qwen/Qwen-Image-Edit-2511 64 3,000 d4966_texfix_e2511_000002500.safetensors

Trained with ai-toolkit (arch: qwen_image_edit_plus) on photo-only pairs (CG-smooth, blur/JPEG, identity) plus wrong-fabric and own-plush inputs generated by 2511 itself (with the Apache-2.0 Lightning LoRA), so no Qwen-2.1 output is in its training data. Same prompt as v2 to v4. Held-out score: 75% of the texture gap closed (v3 75%, v4 78%); 2511 without the LoRA closes 43% and turns the fabric olive. Colour error dE 1.8 to 5.5, geometry kept (0.94 to 1.00). Scores and sheets: e2511/eval/. Evaluated at true CFG 3, 30 steps, full strength, masked; ~1 MP input. Files are 1.18 GB (rank 64 on the 20B model). Not yet tested on real pass-1 frames.

Prompt (one fixed instruction, must match training)

  • v1: d4966: restore the sofa upholstery to the real fabric, a dense short-pile ochre plush with a soft, slightly curly nap and a gentle sheen. Keep the shape, seams, tufting, lighting, colours and everything outside the upholstery unchanged.
  • v2, v3, v4: same without slightly curly (it pulled the model toward bouclé): d4966: restore the sofa upholstery to the real fabric, a dense short-pile ochre plush with a soft nap and a gentle sheen. Keep the shape, seams, tufting, lighting, colours and everything outside the upholstery unchanged.

Settings used

Full strength (regenerate from noise), true CFG 3 with negative prompt " ", 30 steps, ~1 MP tiles (1024 px, 256 px overlap) at the final resolution, masked denoising (latents outside the dilated sofa mask pinned to the input), composite inside the mask, decode with madebyollin/texture-fix-vae-for-qwen-image-2.1. Adaptive mode skips tiles whose fabric is already sharp (detail ratio >= 0.48).

ComfyUI example workflows (comfyui/)

Drag a .json into ComfyUI (needs a recent ComfyUI with the Qwen-Image-2.1 nodes, Oct 2026). The LoRA files load as they are with LoraLoaderModelOnly. *_api.json = the same graphs in API format; build_*.py regenerate them.

Workflow Model Input
d4966_texfix_qwen21.json Qwen-Image-2.1 base + v4, 30 steps, CFG 3 one ~1 MP tile + sofa mask
d4966_texfix_qwen21_turbo.json Qwen-Image-2.1 Turbo + v4, 8 steps, CFG 1 (LoRA trained on base: untested on Turbo) one tile
d4966_texfix_qwen21_tiled_turbo.json same as Turbo, full frame: 3840x2176, 15 tiles, each tile its own edit reference frame + sofa mask
d4966_texfix_e2511_tile.json Qwen-Image-Edit-2511 + e2511, 30 steps, CFG 3 one tile
d4966_texfix_e2511_tiled.json same, full frame, 15 tiles frame + sofa mask

All of them: the training prompt, masked denoising inside the grown sofa mask, paste back inside the mask; the 2.1 workflows decode with the texture-fix VAE. Example inputs in comfyui/example_inputs/ (put them in ComfyUI/input/d4966/): a pass-1 tile and full frame with masks, and a held-out crop with its real photo for comparison. Built and node-checked against ComfyUI 0.39; not yet run end to end.

Loading in diffusers

Trained with ai-toolkit (arch: qwen_image_2), which saves the image MLP as one fused img_mlp.gate_up LoRA. Diffusers has two separate Linears and silently skips the fused keys, so split them first (both halves share lora_A; lora_B is cut in half along its rows into img_mlp.gate_layer and img_mlp.proj). The project's 04_infer.py has split_fused_gate_up() and check_lora_coverage() for this.

ComfyUI loads the files as they are with the stock LoraLoaderModelOnly node: all 192 layers the LoRA targets match the key names of Comfy-Org/Qwen-Image-2.1 (qwen_image_2.1_bf16.safetensors), fused gate_up included. Use ~1 MP tiles (1024 px), the exact training prompt, CFG 3, 30 steps, denoise 1.0, a grown sofa mask as latent noise mask, and the texture-fix VAE (texture_fix_vae_for_qwen_image_2.1_bf16.safetensors) for decoding.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for jzhang-POP/d4966-texfix-lora

Adapter
(162)
this model