mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-23 05:26:59 +08:00
Fix issue with how PIL loads small PNG files nodes.py
Added flag to prevent ValueError: Decompressed Data Too Large when loading PNG images with large meta data such as large embedded color profiles
This commit is contained in:
parent
4ee9aad6ca
commit
ef29c127f8
5
nodes.py
5
nodes.py
@ -10,8 +10,11 @@ import time
|
|||||||
import random
|
import random
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PIL import Image, ImageOps, ImageSequence
|
from PIL import Image, ImageOps, ImageSequence, ImageFile
|
||||||
from PIL.PngImagePlugin import PngInfo
|
from PIL.PngImagePlugin import PngInfo
|
||||||
|
|
||||||
|
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import safetensors.torch
|
import safetensors.torch
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user