Spaces:
Running on Zero
Running on Zero
Commit History
24 days ago
-
fix companion reference image resolution
6bb8992 -
stop clothing requests falling through to a whole-person regeneration
Logs from the failing runs showed edit_region=(none) and mask_used=false. Those two together mean has_reference was false, but the far more common cause was a garment the outfit matcher had simply never heard of: is_outfit_request('wear a saree') -> False edit_region_for_request(...) -> 'subject' 'saree' was absent from the noun list (it knew gown, dress, bikini, but not saree), so 'wear a saree' was not recognised as a clothing request at all and the region fell through to SUBJECT - which makes the face, body, hair and background editable. That is the 'newly generated person' outcome: Qwen is asked to repaint the whole subject rather than to change a garment. Two additions, both narrow: * the missing garments (saree, kimono, lehenga, kurta, ...), and * the structural frame - wear/put on/change into/dress in <anything> - so a garment no list has ever heard of is still a clothing change. Both err toward matching on purpose: a false positive costs a too-conserva…816710a -
let a clothing edit cover the whole outfit, not just its top
Qwen-Image-Edit-2511 was rendering the replacement correctly and then having it partly pasted back over: restore_unmasked_pixels restores every pixel the mask leaves black, so a mask that stops short does not risk a partial edit, it guarantees one. The clothing band was clamped against fixed fractions of the whole frame - top 25%, bottom 15%, sides 12% - which pinned the editable area to the middle of the picture. Anything below 85% of the frame height was frozen, so hips, legs and the rest of a garment could never be replaced. The band is now expressed purely in the subject's own proportions: it runs from below the face (still 30% down the subject's own box, so the head stays frozen) to the subject's bottom, with a narrower side inset. The stand-in silhouette used when the border colour cannot describe a background is now a head-and-torso shape instead of a rectangle - a box made the background beside the person editable too, which is what left a visible seam around the edit. Verifi…ab65ba2 -
test that a lost reference refuses the render instead of inventing a face
b456fa9