fix: preserve alpha when upscaling RGBA images with ESRGAN (#2029)

This commit is contained in:
leejet authored and GitHub committed 2026-09-23 02:23:10 +08:00
1 parent 28b454bda1
commit c92d73c408
2 files changed
+24 -2

No files matched your search

+2
View File
@@ -2,6 +2,8 @@
You can use ESRGAN—such as the model [RealESRGAN_x4plus_anime_6B.pth](https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth)—to upscale the generated images and improve their overall resolution and clarity.
RGBA images, including Qwen Image 2.1 output, keep their alpha channel during model upscaling and hires fix. ESRGAN processes the RGB channels; the alpha channel is resized with bilinear interpolation and recombined with the upscaled image.
- Specify the model path using the `--upscale-model PATH` parameter. example:
```bash