Spaces:
Running on Zero
Running on Zero
Crop aspect-mismatch reflection bands from HDR output
#3
by linoyts HF Staff - opened
HDRICLoraPipeline's resize_and_reflect_pad adds bottom/right reflection when source-video aspect != target output aspect. The pipeline's built-in crop (_decode_video's out[:, :crop_size[1], :crop_size[0], :]) only undoes the 64-divisor alignment padding β crop_size is set from align_resolution, not from the aspect fit β so aspect-mismatch reflection bands pass through into the final output.
Fix: after pipeline() returns, apply the same top-left slice with content dims computed from the source aspect ratio. Matches the pipeline's existing crop convention since resize_and_reflect_pad also pads bottom/right one-sidedly.
No UI changes. If source and target aspects match exactly, this is a no-op.
linoyts changed pull request status to merged