Compare commits

...

2 Commits

Author SHA1 Message Date
eason
918d9ac058
Merge 4b97d167f1 into 3fe9f5fecb 2026-07-04 14:10:54 +08:00
easonysliu
4b97d167f1 fix unclosed file handle when opening mask image in /upload/mask 2026-04-09 14:19:31 +08:00

View File

@ -500,7 +500,8 @@ class PromptServer():
for key in original_pil.text:
metadata.add_text(key, original_pil.text[key])
original_pil = original_pil.convert('RGBA')
mask_pil = Image.open(image.file).convert('RGBA')
with Image.open(image.file) as mask_pil_raw:
mask_pil = mask_pil_raw.convert('RGBA')
# alpha copy
new_alpha = mask_pil.getchannel('A')