mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-15 04:52:31 +08:00
fix unclosed file handle when opening mask image in /upload/mask
This commit is contained in:
parent
8cc746a864
commit
4b97d167f1
@ -485,7 +485,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')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user