Repository: stable-diffusion-webui
Issue: [Bug]: PNG Info loads forever when loading a too large file into it.
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

When loading any of my generated images into the PNG info it will load the info within a second. This includes 10 MB 4K images.
However - when I upscale to 8K and get a 45 MB file and try to load that into PNG info it will just keep counting seconds forever and never finish - I will then have to restart Automatic1111 in order to get it working again. Earlier today this also happened while I had a job running, after which I could no longer use PNG info at all, even after restarting the PC - deleting the venv folder and redownloading files fixed the issue - but it's still not possible to read PNG info from 8K 45MB files.

### Steps to reproduce the problem

1. Upscale an image to 8K (Ultimate SD required)
2. Try to load the 8K Png file into PNG info
3. It will count forever and you will need to restart Automatic 1111


### What should have happened?

It should either manage to give the PNG info, or in worst case give an error message telling you the file is too large. But with the option to create this large files I think we should also be able to read the PNG info from them.

### Commit where the problem happens

22bcc7be

### What platforms do you use to access the UI ?

Windows

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
--xformers --api --skip-torch-cuda-test --vae-path "C:\Users\camax\Documents\stable-diffusion-webui\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors"
```


### List of extensions

auto-sd-paint-ext
canvas-zoom
diffusers
sd-webui-additional-networks
sd-webui-aspect-ratio-helper
sd-webui-controlnet
sd-webui-llul
stable-diffusion-webui-conditioning-highres-fix
ultimate-upscale-for-automatic1111
LDSR
Lora
ScuNET
SwinIR
prompt-bracket-checker

### Console logs

```Shell
Error loading script: change_naming_configs_and_checkpoints.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\change_naming_configs_and_checkpoints.py", line 24, in <module>
    from diffusers import UNet2DConditionModel, UNet2DModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: conversion_ldm_uncond.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\conversion_ldm_uncond.py", line 3, in <module>
    import OmegaConf
ModuleNotFoundError: No module named 'OmegaConf'

Error loading script: convert_dance_diffusion_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_dance_diffusion_to_diffusers.py", line 8, in <module>
    from audio_diffusion.models import DiffusionAttnUnet1D
ModuleNotFoundError: No module named 'audio_diffusion'

Error loading script: convert_ddpm_original_checkpoint_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_ddpm_original_checkpoint_to_diffusers.py", line 6, in <module>
    from diffusers import AutoencoderKL, DDPMPipeline, DDPMScheduler, UNet2DModel, VQModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_dit_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_dit_to_diffusers.py", line 7, in <module>
    from diffusers import AutoencoderKL, DDIMScheduler, DiTPipeline, Transformer2DModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_k_upscaler_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_k_upscaler_to_diffusers.py", line 7, in <module>
    from diffusers import UNet2DConditionModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_kakao_brain_unclip_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_kakao_brain_unclip_to_diffusers.py", line 8, in <module>
    from diffusers import UnCLIPPipeline, UNet2DConditionModel, UNet2DModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_ldm_original_checkpoint_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_ldm_original_checkpoint_to_diffusers.py", line 22, in <module>
    from diffusers import DDPMScheduler, LDMPipeline, UNet2DModel, VQModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_lora_safetensor_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_lora_safetensor_to_diffusers.py", line 23, in <module>
    from diffusers import StableDiffusionPipeline
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_models_diffuser_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_models_diffuser_to_diffusers.py", line 6, in <module>
    from diffusers import UNet1DModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_ms_text_to_video_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_ms_text_to_video_to_diffusers.py", line 21, in <module>
    from diffusers import UNet3DConditionModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_music_spectrogram_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_music_spectrogram_to_diffusers.py", line 5, in <module>
    import jax as jnp
ModuleNotFoundError: No module named 'jax'

Error loading script: convert_ncsnpp_original_checkpoint_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_ncsnpp_original_checkpoint_to_diffusers.py", line 22, in <module>
    from diffusers import ScoreSdeVePipeline, ScoreSdeVeScheduler, UNet2DModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_original_audioldm_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_original_audioldm_to_diffusers.py", line 21, in <module>
    from transformers import (
ImportError: cannot import name 'ClapTextConfig' from 'transformers' (C:\Users\camax\Documents\stable-diffusion-webui\venv\lib\site-packages\transformers\__init__.py)

Error loading script: convert_original_controlnet_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_original_controlnet_to_diffusers.py", line 19, in <module>
    from diffusers.pipelines.stable_diffusion.convert_from_ckpt import download_controlnet_from_original_ckpt
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_original_stable_diffusion_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_original_stable_diffusion_to_diffusers.py", line 21, in <module>
    from diffusers.pipelines.stable_diffusion.convert_from_ckpt import download_from_original_stable_diffusion_ckpt
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_stable_diffusion_checkpoint_to_onnx.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_stable_diffusion_checkpoint_to_onnx.py", line 20, in <module>
    import onnx
ModuleNotFoundError: No module named 'onnx'

Error loading script: convert_unclip_txt2img_to_image_variation.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_unclip_txt2img_to_image_variation.py", line 5, in <module>
    from diffusers import UnCLIPImageVariationPipeline, UnCLIPPipeline
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_vae_diff_to_onnx.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_vae_diff_to_onnx.py", line 22, in <module>
    from diffusers import AutoencoderKL
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_vae_pt_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_vae_pt_to_diffusers.py", line 8, in <module>
    from diffusers import AutoencoderKL
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_versatile_diffusion_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_versatile_diffusion_to_diffusers.py", line 28, in <module>
    from diffusers import (
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_vq_diffusion_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\convert_vq_diffusion_to_diffusers.py", line 44, in <module>
    from diffusers import Transformer2DModel, VQDiffusionPipeline, VQDiffusionScheduler, VQModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: generate_logits.py
Traceback (most recent call last):
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\camax\Documents\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\camax\Documents\stable-diffusion-webui\extensions\diffusers\scripts\generate_logits.py", line 6, in <module>
    from diffusers import UNet2DModel
ModuleNotFoundError: No module named 'diffusers'

[AddNet] Updating model hashes...
0it [00:00, ?it/s]
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
auto-sd-paint-ext:INFO: Add --listen to COMMANDLINE_ARGS to enable usage as a remote backend.
auto-sd-paint-ext:INFO: Add --listen to COMMANDLINE_ARGS to enable usage as a remote backend.
auto-sd-paint-ext:INFO: Add --listen to COMMANDLINE_ARGS to enable usage as a remote backend.
auto-sd-paint-ext:INFO: Add --listen to COMMANDLINE_ARGS to enable usage as a remote backend.
Startup time: 5.6s (load scripts: 0.3s, create ui: 5.0s, gradio launch: 0.1s).
```


### Additional information

There is always the chance that it's the U SD upscaler that somehow corrupts the files png info when they get too big - I would not know as I have no other ways to check the PNG info that the PNG info tab