Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error loading specific Upscalers: "RuntimeError: PytorchStreamReader failed locating file constants.pkl: file not found" #15640

Open
4 of 6 tasks
Soulreaver90 opened this issue Apr 27, 2024 · 2 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@Soulreaver90
Copy link

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

I receive a terminal error when trying to use specific upscalers. This is specifically through the Extra tab, I have not tried hires fix. I have no issues running 4x Ultrasharp, 4x NMKD, etc, however I cannot seem to run upscalers such as https://civitai.com/models/142699/8xnmkd-faces160000g-upscaler, https://civitai.com/models/292030/8xnmkd-superscale150000g?modelVersionId=328284 or https://civitai.com/models/318385/4xrealisticrescaler100000g?modelVersionId=357054

Steps to reproduce the problem

Copy any of the following to ESRGAN and try to upscale via Extra tab
https://civitai.com/models/142699/8xnmkd-faces160000g-upscaler, https://civitai.com/models/292030/8xnmkd-superscale150000g?modelVersionId=328284 or https://civitai.com/models/318385/4xrealisticrescaler100000g?modelVersionId=357054

What should have happened?

Uspcale normally without error

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

sysinfo-2024-04-27-09-46.json

Console logs

*** Unable to load ESRGAN model /home/linux/stable-diffusion-webui/models/ESRGAN/4xRealisticrescaler_100000G.pt
    Traceback (most recent call last):
      File "/home/linux/stable-diffusion-webui/modules/esrgan_model.py", line 31, in do_upscale
        model = self.load_model(selected_model)
      File "/home/linux/stable-diffusion-webui/modules/esrgan_model.py", line 49, in load_model
        return modelloader.load_spandrel_model(
      File "/home/linux/stable-diffusion-webui/modules/modelloader.py", line 150, in load_spandrel_model
        model_descriptor = spandrel.ModelLoader(device=device).load_from_file(str(path))
      File "/home/linux/stable-diffusion-webui/venv/lib/python3.10/site-packages/spandrel/__helpers/loader.py", line 41, in load_from_file
        state_dict = self.load_state_dict_from_file(path)
      File "/home/linux/stable-diffusion-webui/venv/lib/python3.10/site-packages/spandrel/__helpers/loader.py", line 58, in load_state_dict_from_file
        state_dict = self._load_torchscript(path)
      File "/home/linux/stable-diffusion-webui/venv/lib/python3.10/site-packages/spandrel/__helpers/loader.py", line 89, in _load_torchscript
        return torch.jit.load(  # type: ignore
      File "/home/linux/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/jit/_serialization.py", line 159, in load
        cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files, _restore_shapes)  # type: ignore[call-arg]
    RuntimeError: PytorchStreamReader failed locating file constants.pkl: file not found

Additional information

No response

@Soulreaver90 Soulreaver90 added the bug-report Report of a bug, yet to be confirmed label Apr 27, 2024
@AlexysLovesLexxie
Copy link

Same issue here, but with 4xUltrasharp_4xUltrasharpV10.pt
My install is managed by StabilityMatrix, hence the odd paths.

*** Unable to load ESRGAN model D:\SM\Data\Packages\A1111_v1.9.3\models\ESRGAN\4xUltrasharp_4xUltrasharpV10.pt Traceback (most recent call last): File "D:\SM\Data\Packages\A1111_v1.9.3\modules\esrgan_model.py", line 31, in do_upscale model = self.load_model(selected_model) File "D:\SM\Data\Packages\A1111_v1.9.3\modules\esrgan_model.py", line 49, in load_model return modelloader.load_spandrel_model( File "D:\SM\Data\Packages\A1111_v1.9.3\modules\modelloader.py", line 150, in load_spandrel_model model_descriptor = spandrel.ModelLoader(device=device).load_from_file(str(path)) File "D:\SM\Data\Packages\A1111_v1.9.3\venv\lib\site-packages\spandrel\__helpers\loader.py", line 41, in load_from_file state_dict = self.load_state_dict_from_file(path) File "D:\SM\Data\Packages\A1111_v1.9.3\venv\lib\site-packages\spandrel\__helpers\loader.py", line 58, in load_state_dict_from_file state_dict = self._load_torchscript(path) File "D:\SM\Data\Packages\A1111_v1.9.3\venv\lib\site-packages\spandrel\__helpers\loader.py", line 89, in _load_torchscript return torch.jit.load( # type: ignore File "D:\SM\Data\Packages\A1111_v1.9.3\venv\lib\site-packages\torch\jit\_serialization.py", line 162, in load cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files, _restore_shapes) # type: ignore[call-arg] RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

@yogiyushi
Copy link

i can't seem to upscale anything 2048 x 2, it says 100% done but remains stuck still using 11.8 gb vram, did full reinstall still happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

3 participants