-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
See the steps to reproduce below.
This is caused by this code change. yaml.safe_load()
takes a stream object not a file path name, so currently it just returns the file path, causing the error shown below.
Reproduction
Run this command to convert a checkpoint into diffusers format:
python3 /path/to/diffusers/scripts/convert_original_stable_diffusion_to_diffusers.py --pipeline_class_name StableDiffusionXLPipeline --checkpoint_path /path/to/file.ckpt --original_config_file /path/to/config.yaml --dump_path /path/to/output
It fails like this:
Traceback (most recent call last):
File "/path/to/diffusers/scripts/convert_original_stable_diffusion_to_diffusers.py", line 160, in <module>
pipe = download_from_original_stable_diffusion_ckpt(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/to/diffusers/src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py", line 1329, in download_from_original_stable_diffusion_ckpt
and "cond_stage_config" in original_config["model"]["params"]
~~~~~~~~~~~~~~~^^^^^^^^^
TypeError: string indices must be integers, not 'str'
Logs
No response
System Info
python 3.11, diffusers main branch.
Who can help?
cc @sayakpaul FYI
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working