mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-08 16:57:05 +08:00
fix transparency not working
This commit is contained in:
parent
54661031d9
commit
a25c2f2e2a
@ -53,7 +53,7 @@ def validate_and_cast_response (response):
|
|||||||
raise Exception("Failed to download the image")
|
raise Exception("Failed to download the image")
|
||||||
img = Image.open(io.BytesIO(img_response.content))
|
img = Image.open(io.BytesIO(img_response.content))
|
||||||
|
|
||||||
img = img.convert("RGB") # Ensure RGB format
|
img = img.convert("RGBA")
|
||||||
|
|
||||||
# Convert to numpy array, normalize to float32 between 0 and 1
|
# Convert to numpy array, normalize to float32 between 0 and 1
|
||||||
img_array = np.array(img).astype(np.float32) / 255.0
|
img_array = np.array(img).astype(np.float32) / 255.0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user