Coder Social home page Coder Social logo

sunbread / ckpt2diff Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 3.0 9 KB

This user-friendly wizard is used to convert a Stable Diffusion Model from CKPT format to Diffusers format.

License: Apache License 2.0

Python 100.00%
ckpt diffusers model-converter novelai stable-diffusion python pytorch torch

ckpt2diff's People

Contributors

sunbread avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ckpt2diff's Issues

KeyError: 'state_dict'

I hit the following stack trace
Traceback (most recent call last): File "/Users/zhuofengli/Ckpt2Diff/ckpt2diff.py", line 154, in <module> wizard() File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/Users/zhuofengli/Ckpt2Diff/ckpt2diff.py", line 148, in wizard convert(converter, CKPT_FILE, load_config(CONFIG_FILE, DEFAULT_CONFIG_URL), scheduler, ema, HF_MODEL_DIR) File "/Users/zhuofengli/Ckpt2Diff/ckpt2diff.py", line 89, in convert convert_full_checkpoint( File "<string>", line 806, in convert_full_checkpoint KeyError: 'state_dict'
any way to get around it?

Error ImportError: cannot import name 'CompVisVDenoiser'

and your config file into models/config.yaml if you have,
and the result will be in models/diffusers_model.

Ready to begin? [y/N]: y
Downloading and patching the latest converter from HuggingFace...
Oops, something went wrong while loading the converter.
Traceback (most recent call last):
  File "D:\huggingface\converted model\Ckpt2Diff\ckpt2diff.py", line 120, in wizard
    converter: ModuleType = load_converter(CONVERTER_SCRIPT_URL, CONVERTER_PATCH_DIFF)
  File "D:\huggingface\converted model\Ckpt2Diff\ckpt2diff.py", line 69, in load_converter
    exec(source, module.__dict__)
  File "<string>", line 26, in <module>
  File "C:\Users\Comp\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\__init__.py", line 26, in <module>
    from .pipelines import OnnxRuntimeModel
  File "C:\Users\Comp\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\pipelines\__init__.py", line 43, in <module>
    from .alt_diffusion import AltDiffusionImg2ImgPipeline, AltDiffusionPipeline
  File "C:\Users\Comp\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\pipelines\alt_diffusion\__init__.py", line 33, in <module>
    from .pipeline_alt_diffusion import AltDiffusionPipeline
  File "C:\Users\Comp\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\pipelines\alt_diffusion\pipeline_alt_diffusion.py", line 36, in <module>
    from ..stable_diffusion.safety_checker import StableDiffusionSafetyChecker
  File "C:\Users\Comp\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\pipelines\stable_diffusion\__init__.py", line 72, in <module>
    from .pipeline_stable_diffusion_k_diffusion import StableDiffusionKDiffusionPipeline
  File "C:\Users\Comp\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\pipelines\stable_diffusion\pipeline_stable_diffusion_k_diffusion.py", line 20, in <module>
    from k_diffusion.external import CompVisDenoiser, CompVisVDenoiser
ImportError: cannot import name 'CompVisVDenoiser' from 'k_diffusion.external' (C:\Users\Comp\AppData\Local\Programs\Python\Python310\lib\site-packages\k_diffusion\external.py)
Aborted!``` 

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.