Q1
ModuleNotFoundError: No module named 'pipeline_zero1to3'
将pipeline_zero1to3.py放到convert_zero123_to_diffusers.py同级目录下
pip install kornia
pip install pytorch_lightning
Q2
$ python ./diffusers/scripts/convert_zero123_to_diffusers.py \
--checkpoint_path ./model/zero123/105000.ckpt --dump_path ./model/zero1to3 \
--original_config_file ./model/zero123/configs/sd-objaverse-finetune-c_concat-256.yaml
--------------------------------------------------------------------------------------------
convert_zero123_to_diffusers.py 803 <module>
pipe = convert_from_original_zero123_ckpt(
convert_zero123_to_diffusers.py 696 convert_from_original_zero123_ckpt
original_config["model"]["params"]["cond_stage_config"]["target"].split(".")[-1]
TypeError:
string indices must be integers
print("Original config:", original_config)
print("Type of original config:", type(original_config))
>>
Original config: ./model/zero123/configs/sd-objaverse-finetune-c_concat-256.yaml
Type of original config: <class 'str'>
看来问题出在这里了。original_config 并不是一个字典,而是一个字符串,它表示一个文件路径。
with open(original_config_file, 'r') as file:
original_config = yaml.safe_load(file)