Sunbread / Ckpt2Diff

This user-friendly wizard is used to convert a Stable Diffusion Model from CKPT format to Diffusers format.
Apache License 2.0
13 stars 3 forks source link

Error ImportError: cannot import name 'CompVisVDenoiser' #1

Open hassan-sd opened 1 year ago

hassan-sd commented 1 year ago

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!``` 
Sunbread commented 1 year ago

seems like diffusers version problem. (i've found this problem in another issue 3 weeks ago.) try upgrading to the latest version or downgrading to an older version