Fix ImageUpscaleWithModel crashing on RGBA images (#16500) · code/app-python-comfyui@557597f · GitHub
Skip to content

Commit 557597f

Browse files
authored
Fix ImageUpscaleWithModel crashing on RGBA images (Comfy-Org#16500)
Upscale models loaded via Spandrel expect exactly 3 input channels, so a 4-channel IMAGE crashed in the model's first conv. Split off the alpha channel before upscaling, then resize it to the output resolution and concatenate it back so transparency survives the upscale. Fixes Comfy-Org#16499
1 parent 2255709 commit 557597f

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

‎comfy_extras/nodes_upscale_model.py‎

Lines changed: 10 additions & 0 deletions
Lines changed: 58 additions & 0 deletions

0 commit comments

Comments
 (0)