AnimateDiff icon indicating copy to clipboard operation
AnimateDiff copied to clipboard

huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': 'models/StableDiffusion/stable-diffusion-v1-5'. Use `repo_type` argument if needed.

Open isamu2025 opened this issue 2 years ago • 13 comments

huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': 'models/StableDiffusion/stable-diffusion-v1-5'. Use repo_type argument if needed.

(animatediff) G:\AI\AnimateDiff>

win10 conda3 pytorch2.01 cuda118. 模型都下好,放在G:\AI\AnimateDiff\models\StableDiffusion,文件名为stable-diffusion-v1-5 .safetensors. 还是报这个错误。

isamu2025 avatar Jul 13 '23 13:07 isamu2025

same problem

sdbds avatar Jul 13 '23 13:07 sdbds

same problem

青龙大佬,改文件animate.py,约是第150行。 parser.add_argument("--pretrained_model_path", type=str, default="models/StableDiffusion/stable-diffusion-v1-5.safetensors",)

isamu2025 avatar Jul 13 '23 14:07 isamu2025

其它路径这样子,修写。在win10下面。

>>> create validation pipeline >>>

       # tokenizer    = CLIPTokenizer.from_pretrained(args.pretrained_model_path, subfolder="tokenizer")
        tokenizer    = CLIPTokenizer.from_pretrained("G:\\AI\\AnimateDiff\\models\\StableDiffusion\\tokenizer\\")
       # text_encoder = CLIPTextModel.from_pretrained(args.pretrained_model_path, subfolder="text_encoder")
        text_encoder = CLIPTextModel.from_pretrained("G:\\AI\\AnimateDiff\\models\\StableDiffusion\\text_encoder\\")
       # vae          = AutoencoderKL.from_pretrained(args.pretrained_model_path, subfolder="vae")
        vae          = AutoencoderKL.from_pretrained("G:\\AI\\AnimateDiff\\models\\StableDiffusion\\vae\\")                  
       # unet         = UNet3DConditionModel.from_pretrained_2d(args.pretrained_model_path, subfolder="unet", unet_additional_kwargs=OmegaConf.to_container(inference_config.unet_additional_kwargs))
        unet         = UNet3DConditionModel.from_pretrained_2d("G:\\AI\\AnimateDiff\\models\\StableDiffusion\\unet\\", unet_additional_kwargs=OmegaConf.to_container(inference_config.unet_additional_kwargs))

isamu2025 avatar Jul 13 '23 14:07 isamu2025

Try setting "parser.add_argument("--pretrained_model_path", type=str, default="models/StableDiffusion/stable-diffusion-v1-5.safetensors",) " default path to "models/StableDiffusion". It should solve your problem.

aartykov avatar Jul 13 '23 20:07 aartykov

models/StableDiffusion worked for me. it resolved all model path issues, the other recommendations didn't work. thanks aartykov

796F avatar Jul 14 '23 05:07 796F

models/StableDiffusion worked for me. it resolved all model path issues, the other recommendations didn't work. thanks aartykov

Error caused by path mismatch, in code : parser.add_argument("--pretrained_model_path", type=str, default="models/StableDiffusion/stable-diffusion-v1-5",) image

but in file: StableDiffusion name Need to specify the correct path like this image

zhanghongyong123456 avatar Jul 14 '23 09:07 zhanghongyong123456

Configured all afternoon and still can't solve the problem, is this something you don't want people to use?

RexGrey avatar Jul 30 '23 12:07 RexGrey

@RexLeeGrey couldn't agree more. I appreciate the work but the instructions are sorely lacking and so many issues without solutions.

I've been at it for 3 days and still can't get it figured out. Running WSL2 and every single time I solve one error there is another.

Haven't had this much trouble with any other app. :/

Ainaemaet avatar Aug 08 '23 20:08 Ainaemaet

Please use the configuration file to generate it directly, do not use Webui.

RexGrey avatar Aug 09 '23 11:08 RexGrey

其它路径这样子,修写。在win10下面。

>>> create validation pipeline >>>

创建验证管道 >>>

       # tokenizer    = CLIPTokenizer.from_pretrained(args.pretrained_model_path, subfolder="tokenizer")
        tokenizer    = CLIPTokenizer.from_pretrained("G:\\AI\\AnimateDiff\\models\\StableDiffusion\\tokenizer\\")
       # text_encoder = CLIPTextModel.from_pretrained(args.pretrained_model_path, subfolder="text_encoder")
        text_encoder = CLIPTextModel.from_pretrained("G:\\AI\\AnimateDiff\\models\\StableDiffusion\\text_encoder\\")
       # vae          = AutoencoderKL.from_pretrained(args.pretrained_model_path, subfolder="vae")
        vae          = AutoencoderKL.from_pretrained("G:\\AI\\AnimateDiff\\models\\StableDiffusion\\vae\\")                  
       # unet         = UNet3DConditionModel.from_pretrained_2d(args.pretrained_model_path, subfolder="unet", unet_additional_kwargs=OmegaConf.to_container(inference_config.unet_additional_kwargs))
        unet         = UNet3DConditionModel.from_pretrained_2d("G:\\AI\\AnimateDiff\\models\\StableDiffusion\\unet\\", unet_additional_kwargs=OmegaConf.to_container(inference_config.unet_additional_kwargs))

it work,thanks

WainWong avatar Aug 16 '23 13:08 WainWong

错误原因是:手动下的配置文件浏览器会自动修改名字(添加前缀),如tokenizer文件夹中的vocab.json被修改为“tokenizer_vocab.json”。(这个前缀就是所在文件夹的名字) 解决办法:手动修改回去就可以了。亲测可用。 官方代码没有问题的,不用修改。

guoti777 avatar Dec 05 '23 09:12 guoti777

这个

it works for me, thanks!!!

LIANGSHUOWEN avatar Jan 12 '24 05:01 LIANGSHUOWEN

错误原因是:手动下的配置文件浏览器会自动修改名字(添加前缀),如tokenizer文件夹中的vocab.json被修改为“tokenizer_vocab.json”。(这个前缀就是所在文件夹的名字) 解决办法:手动修改回去就可以了。亲测可用。 官方代码没有问题的,不用修改。 it works for me, thanks!!!

LIANGSHUOWEN avatar Jan 12 '24 05:01 LIANGSHUOWEN