From 823caeaa265f11727a181b63cda46325ca7ca611 Mon Sep 17 00:00:00 2001 From: Yondon Fu Date: Fri, 2 Feb 2024 21:18:30 +0000 Subject: [PATCH] runner: Load truncated images --- runner/app/pipelines/image_to_image.py | 4 ++++ runner/app/pipelines/image_to_video.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/runner/app/pipelines/image_to_image.py b/runner/app/pipelines/image_to_image.py index 4c1bfd8e4..04b93481f 100644 --- a/runner/app/pipelines/image_to_image.py +++ b/runner/app/pipelines/image_to_image.py @@ -8,6 +8,10 @@ from typing import List import logging +from PIL import ImageFile + +ImageFile.LOAD_TRUNCATED_IMAGES = True + logger = logging.getLogger(__name__) diff --git a/runner/app/pipelines/image_to_video.py b/runner/app/pipelines/image_to_video.py index 36992d230..08a67311c 100644 --- a/runner/app/pipelines/image_to_video.py +++ b/runner/app/pipelines/image_to_video.py @@ -8,6 +8,10 @@ from typing import List import logging +from PIL import ImageFile + +ImageFile.LOAD_TRUNCATED_IMAGES = True + logger = logging.getLogger(__name__)