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]: LDSR not found, followed by a bunch of argument errors #709

Closed
1 task done
Builder-roberts opened this issue Sep 6, 2022 · 9 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@Builder-roberts
Copy link

What happened?

I followed the instructions in https://github.com/hlky/stable-diffusion/wiki/Installation, it returned this error, I don't know what I'm doing. Expedient help would be appreciated

Version

0.0.1 (Default)

What browsers are you seeing the problem on?

No response

Where are you running the webui?

No response

Custom settings

No response

Relevant log output

LDSR not found at path, please make sure you have cloned the LDSR repo to ./src/latent-diffusion/
Loading model from models/ldm/stable-diffusion-v1/model.ckpt
Global Step: 470000
LatentDiffusion: Running in eps-prediction mode
Traceback (most recent call last):
  File "scripts/webui.py", line 451, in <module>
    model, device,config = load_SD_model()
  File "scripts/webui.py", line 442, in load_SD_model
    model = load_model_from_config(config, opt.ckpt)
  File "scripts/webui.py", line 148, in load_model_from_config
    model = instantiate_from_config(config.model)
  File "c:\users\mason roberts\stable-diffusion\ldm\util.py", line 85, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "c:\users\mason roberts\stable-diffusion\ldm\models\diffusion\ddpm.py", line 448, in __init__
    super().__init__(conditioning_key=conditioning_key, *args, **kwargs)
  File "c:\users\mason roberts\stable-diffusion\ldm\models\diffusion\ddpm.py", line 86, in __init__
    self.model = DiffusionWrapper(unet_config, conditioning_key)
  File "c:\users\mason roberts\stable-diffusion\ldm\models\diffusion\ddpm.py", line 1398, in __init__
    self.diffusion_model = instantiate_from_config(diff_model_config)
  File "c:\users\mason roberts\stable-diffusion\ldm\util.py", line 85, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "c:\users\mason roberts\stable-diffusion\ldm\modules\diffusionmodules\openaimodel.py", line 530, in __init__
    ResBlock(
  File "c:\users\mason roberts\stable-diffusion\ldm\modules\diffusionmodules\openaimodel.py", line 230, in __init__
    conv_nd(dims, self.out_channels, self.out_channels, 3, padding=1)
  File "c:\users\mason roberts\stable-diffusion\ldm\modules\diffusionmodules\util.py", line 225, in conv_nd
    return nn.Conv2d(*args, **kwargs)
  File "C:\Users\Mason Roberts\.conda\envs\ldo\lib\site-packages\torch\nn\modules\conv.py", line 434, in __init__
    super(Conv2d, self).__init__(
  File "C:\Users\Mason Roberts\.conda\envs\ldo\lib\site-packages\torch\nn\modules\conv.py", line 131, in __init__
    self.weight = Parameter(torch.empty(
RuntimeError: [enforce fail at C:\cb\pytorch_1000000000000\work\c10\core\impl\alloc_cpu.cpp:81] data. DefaultCPUAllocator: not enough memory: you tried to allocate 58982400 bytes.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Builder-roberts Builder-roberts added the bug Something isn't working label Sep 6, 2022
@bbecausereasonss
Copy link

bbecausereasonss commented Sep 6, 2022

You didn't do anything wrong, he merged branches, and it introduced a ton of issues. Having same error.

@Builder-roberts
Copy link
Author

good to know. I guess I'll just wait for the next update and do a git pull then

@TiboGabriels
Copy link

i found the repository mentioned and cloned as descriped but that just gave me this error instead:

Traceback (most recent call last):
  File "scripts/webui.py", line 382, in try_loading_LDSR
    LDSR = load_LDSR(checking=True) # TODO: Should try to load both models before giving up
  File "scripts/webui.py", line 299, in load_LDSR
    raise Exception("LDSR model not found at path "+yaml_path)
Exception: LDSR model not found at path ./src/latent-diffusion\experiments/pretrained_models\project.yaml```

@bbecausereasonss
Copy link

Anyone figure this one out yer?

Exception: LDSR model not found at path ./src/latent-diffusion\experiments/pretrained_models\model.ckpt

Which model do I need to download to create model.ckpt?

@hafiidz
Copy link
Contributor

hafiidz commented Sep 7, 2022

Please try to do the followings: #488 (comment)

@hafiidz
Copy link
Contributor

hafiidz commented Sep 7, 2022

Download LDSR project.yaml and model last.cpkt. Rename last.ckpt to model.ckpt and place both under stable-diffusion-webui/src/latent-diffusion/experiments/pretrained_models/

Make a minor editing to the instruction and copied here for reference as well. Will send a PR to the readme for this.

@theWarFlower
Copy link

Make a minor editing to the instruction and copied here for reference as well. Will send a PR to the readme for this.

Confirmed working thank you.

@ChrisAcrobat
Copy link

This is still an issue. @hafiidz, has an PR being submitted?
The workaround did not work for me. I'm missing latent-diffusion and adding it (and sub-dirs) didn't change anything.

@hafiidz
Copy link
Contributor

hafiidz commented Sep 11, 2022

There's a problem of execution order, need to make a backup of model files elsewhere, delete src folder, and re run webui.cmd, then and only after you manage to run until the end, see example message in the wiki here , you copy over manually all models to respective folder.

We're working on improving this part to be done automatically, but not yet ready for PR

@hlky hlky closed this as completed Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants