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:
shawnington 2024-04-21 10:14:39 -07:00 committed by GitHub
parent 4ee9aad6ca
commit ef29c127f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,8 +10,11 @@ import time
import random
import logging
from PIL import Image, ImageOps, ImageSequence
from PIL import Image, ImageOps, ImageSequence, ImageFile
from PIL.PngImagePlugin import PngInfo
ImageFile.LOAD_TRUNCATED_IMAGES = True
import numpy as np
import safetensors.torch