OOTDiffusion icon indicating copy to clipboard operation
OOTDiffusion copied to clipboard

Error no file named config.json found in directory ../checkpoints/ootd/ootd_hd/checkpoint-36000.

Open shirubei opened this issue 1 year ago • 1 comments

windows上,从https://huggingface.co/levihsu/OOTDiffusion/tree/main/checkpoints 把所有文件都下载了,但是执行 (OOTDiffusion) E:\PythonPrj\OOTDiffusion\OOTDiffusion\run>python run_ootd.py --model_path ..\images\model --cloth_path ..\images\cloth --scale 2.0 --sample 4

时报错如下: Traceback (most recent call last): File "E:\PythonPrj\OOTDiffusion\OOTDiffusion\run\run_ootd.py", line 47, in model = OOTDiffusionHD(args.gpu_id) File "E:\PythonPrj\OOTDiffusion\OOTDiffusion\ootd\inference_ootd_hd.py", line 49, in init unet_vton = UNetVton2DConditionModel.from_pretrained( File "E:\PythonPrj\OOTDiffusion\lib\site-packages\diffusers\models\modeling_utils.py", line 712, in from_pretrained config, unused_kwargs, commit_hash = cls.load_config( File "E:\PythonPrj\OOTDiffusion\lib\site-packages\diffusers\configuration_utils.py", line 365, in load_config raise EnvironmentError( OSError: Error no file named config.json found in directory ../checkpoints/ootd/ootd_hd/checkpoint-36000.

上述huggingface上的 ootd/ootd_hd/checkpoint-36000 也没有 config.json 这个文件啊,是不是代码错了?

shirubei avatar Mar 02 '24 13:03 shirubei

#27 看了上述issue,没找到解决的办法。它这里面好像是说要加以下几行的设定,但是我这里的文件已经有这些设定了。

VIT_PATH = "../checkpoints/clip-vit-large-patch14" VAE_PATH = "../checkpoints/ootd" UNET_PATH = "../checkpoints/ootd/ootd_hd/checkpoint-36000" MODEL_PATH = "../checkpoints/ootd"

shirubei avatar Mar 02 '24 13:03 shirubei

请核对json文件下载位置 ootd中有多个json在不同子目录下 不要弄错了

levihsu avatar Mar 04 '24 08:03 levihsu

请核对json文件下载位置 ootd中有多个json在不同子目录下 不要弄错了

大侠,我详细比对了huggingface和本地的checkpoint下的每个目录,没发现有config.json文件啊。huggingface的如下,不知道代码为什么会报错了,请帮忙看看,谢谢!

微信图片_20240304172739

shirubei avatar Mar 04 '24 08:03 shirubei

image image 这两个文件是不一样的 都要放对位置 包括vae目录之类的也是

levihsu avatar Mar 04 '24 08:03 levihsu

不好意思,是我的问题,浪费您的宝贵时间。

shirubei avatar Mar 04 '24 09:03 shirubei

@shirubei Have you successfully run the sample code? Can you take a look at the structure of your folder?

WHUZhangYuhan avatar Mar 04 '24 10:03 WHUZhangYuhan

@shirubei Have you successfully run the sample code? Can you take a look at the structure of your folder?

嗯,没问题跑起来了。

checkpoint应该有4个子目录,其中的3个可以去顶楼的那个 huggingface 页面下载, 另外一个 clip-vit-large-patch14 在本项目repo首页有一个连接。 另外,我开这个帖子主要是,从huggingface下载文件后手动改名,不小心把unet_vton目录下的config.json多删了一个字造成的, 不过系统给的提示不够友好,它提示checkpoint-36000下少了config.json,其实具体的位置应该是在其下一级的 unet_vton

微信图片_20240305095022

shirubei avatar Mar 05 '24 00:03 shirubei

大佬有没有修改pretrained_model_name_or_path呀,我检查目录后发现没问题但是还是报错

Eminem-lamar avatar May 31 '24 05:05 Eminem-lamar