diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 591e64028..f5c8f2a93 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -140,7 +140,7 @@ class ExtraNetworksPage: continue try: img = Image.open(f) - if img.width > 1024 or img.height > 1024: + if img.width > 1024 or img.height > 1024 or os.path.getsize(f) > 70000: img = img.convert('RGB') img.thumbnail((512, 512), Image.HAMMING) img.save(fn)