Commit Graph

2 Commits

Author SHA1 Message Date
christian-byrne
76cc69a2af Split the alpha off by image layout, not by model channel count
Keying the split off upscale_model.input_channels was wrong for any model
that does not take 3 channels: a single channel model fed a plain RGB image
took only the red channel and returned 1 - green as the alpha mask, where it
used to fail loudly. Alpha is channel 3 of an RGBA image, nothing else.
2026-08-10 13:56:57 -07:00
christian-byrne
1e881c08ea Add an alpha mask output to ImageUpscaleWithModel
Upscale models take input_channels channels, so an RGBA image was handed
straight to a 3 channel model and failed. Split the alpha off, upscale it
to match the result and return it as a MASK using the LoadImage polarity.
2026-08-10 13:56:57 -07:00