Coder Social home page Coder Social logo

Comments (3)

Delcos avatar Delcos commented on June 19, 2024

There are a few things that could cause that, firstly I'd try redownloading the ckpt file, as sometimes it being corrupt from downloading can be the issue.

Second I'd try with a redownload the ui, in a clean folder, and if it loads from that then it's an issue with your original install. I would try redownloading the model file first though.

from hentai-diffusion.

Kuroseji avatar Kuroseji commented on June 19, 2024

Thanks for the tips but neither fix worked. I'm going to assume it's an issue with the code itself and hope it get's fixed eventually. Thanks for trying though and thanks for working on this model.

from hentai-diffusion.

linklight2 avatar linklight2 commented on June 19, 2024

I'm having a similar issue with the current model, hckpt-18. The error message I get is this:

KeyError                                  Traceback (most recent call last)
<ipython-input-4-127af4bf47ad> in <module>
    110 opt = config()
    111 config = OmegaConf.load(f"{opt.config}")
--> 112 model = load_model_from_config(config, f"{opt.ckpt}")
    113 model = model.to(device)
    114 batch_idx = 0

<ipython-input-4-127af4bf47ad> in load_model_from_config(config, ckpt, verbose)
     79     if "global_step" in pl_sd:
     80         print(f"Global Step: {pl_sd['global_step']}")
---> 81     sd = pl_sd["state_dict"]
     82     model = instantiate_from_config(config.model)
     83     m, u = model.load_state_dict(sd, strict=False)

KeyError: 'state_dict'

16 and 17 both worked for me, so it's confusing why 18 is showing such an error. As the poster did above, I tried both methods, and even loaded the model into a Google colab. The model failed to work in all these instances due to this error.

from hentai-diffusion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.