lshqqytiger / stable-diffusion-webui-amdgpu

Stable Diffusion web UI
GNU Affero General Public License v3.0
1.87k stars 191 forks source link

[Bug]: RuntimeError: don't know how to restore data location of torch.storage.UntypedStorage (tagged with privateuseone:0) #446

Closed sz1kormar closed 7 months ago

sz1kormar commented 7 months ago

Checklist

What happened?

When I tried to use hires fix it caused it to crash.

Opera Snapshot_2024-04-16_183253_127 0 0 1

Steps to reproduce the problem

  1. Write a prompt in txt2img
  2. Enable Hires Fix
  3. Start an image generation

What should have happened?

The image needs to finish upscaling image without any error on my RX 580 (8GB)

What browsers do you use to access the UI ?

Other

Sysinfo

sysinfo-2024-04-16-16-35.json

Console logs

100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:53<00:00,  2.68s/it]
*** Error completing request█████████████████████████████████████                      | 20/30 [00:53<00:25,  2.59s/it]
*** Arguments: ('task(li2ebt8leqkn2v4)', <gradio.routes.Request object at 0x0000017C7D7223B0>, 'by Nulloffset, blaziken, lucario ,big breasts, nipples, pussy, nude beach, front view, shy, blush, cowgirl position, sex, big penis, big balls, pussy juice, vaginal, vaginal penetration, pov, male pov', 'low quality, worst quality, mutated, deformed, bad fingers, bad face, bad eyes, bad anatomy', [], 1, 1, 7, 512, 512, True, 0.3, 1.5, 'R-ESRGAN 4x+', 10, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Automatic', '', '', [], 0, 20, 'DPM++ 2M', 'Automatic', False, '', 0.8, 1868233621, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "D:\Personal\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "D:\Personal\stable-diffusion-webui-directml\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "D:\Personal\stable-diffusion-webui-directml\modules\txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "D:\Personal\stable-diffusion-webui-directml\modules\processing.py", line 847, in process_images
        res = process_images_inner(p)
      File "D:\Personal\stable-diffusion-webui-directml\modules\processing.py", line 1075, in process_images_inner
        samples_ddim = p.sample(conditioning=p.c, unconditional_conditioning=p.uc, seeds=p.seeds, subseeds=p.subseeds, subseed_strength=p.subseed_strength, prompts=p.prompts)
      File "D:\Personal\stable-diffusion-webui-directml\modules\processing.py", line 1438, in sample
        return self.sample_hr_pass(samples, decoded_samples, seeds, subseeds, subseed_strength, prompts)
      File "D:\Personal\stable-diffusion-webui-directml\modules\processing.py", line 1487, in sample_hr_pass
        image = images.resize_image(0, image, target_width, target_height, upscaler_name=self.hr_upscaler)
      File "D:\Personal\stable-diffusion-webui-directml\modules\images.py", line 286, in resize_image
        res = resize(im, width, height)
      File "D:\Personal\stable-diffusion-webui-directml\modules\images.py", line 278, in resize
        im = upscaler.scaler.upscale(im, scale, upscaler.data_path)
      File "D:\Personal\stable-diffusion-webui-directml\modules\upscaler.py", line 68, in upscale
        img = self.do_upscale(img, selected_model)
      File "D:\Personal\stable-diffusion-webui-directml\modules\realesrgan_model.py", line 39, in do_upscale
        model_descriptor = modelloader.load_spandrel_model(
      File "D:\Personal\stable-diffusion-webui-directml\modules\modelloader.py", line 150, in load_spandrel_model
        model_descriptor = spandrel.ModelLoader(device=device).load_from_file(str(path))
      File "D:\Personal\stable-diffusion-webui-directml\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:\Personal\stable-diffusion-webui-directml\venv\lib\site-packages\spandrel\__helpers\loader.py", line 60, in load_state_dict_from_file
        state_dict = self._load_pth(path)
      File "D:\Personal\stable-diffusion-webui-directml\venv\lib\site-packages\spandrel\__helpers\loader.py", line 82, in _load_pth
        return torch.load(
      File "D:\Personal\stable-diffusion-webui-directml\modules\safe.py", line 108, in load
        return load_with_extra(filename, *args, extra_handler=global_extra_handler, **kwargs)
      File "D:\Personal\stable-diffusion-webui-directml\modules\safe.py", line 156, in load_with_extra
        return unsafe_torch_load(filename, *args, **kwargs)
      File "D:\Personal\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 809, in load
        return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
      File "D:\Personal\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 1172, in _load
        result = unpickler.load()
      File "C:\Users\Martin\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1213, in load
        dispatch[key[0]](self)
      File "C:\Users\Martin\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1254, in load_binpersid
        self.append(self.persistent_load(pid))
      File "D:\Personal\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 1142, in persistent_load
        typed_storage = load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location))
      File "D:\Personal\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 1116, in load_tensor
        wrap_storage=restore_location(storage, location),
      File "D:\Personal\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 1086, in restore_location
        return default_restore_location(storage, str(map_location))
      File "D:\Personal\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 220, in default_restore_location
        raise RuntimeError("don't know how to restore data location of "
    RuntimeError: don't know how to restore data location of torch.storage.UntypedStorage (tagged with privateuseone:0)

---

Additional information

Im using AMD Adrenaline 24.3.1 Command args: --opt-sub-quad-attention --lowvram --disable-nan-check --no-half --use-directml

lshqqytiger commented 7 months ago

Revert to webui v1.7 if you really need it.

git checkout tags/v1.7.0-amd
lshqqytiger commented 7 months ago

Fixed