赞
踩
更多信息详见我的另一篇文档:
介绍
从本地加载 stable-diffusion 时,
model_id = 'D:\code\git_diffusion_repo\sd\stable-diffusion-v1-5'
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16")
出现 加载文件错误:
Loading pipeline components...: 0%| | 0/7 [00:00<?, ?it/s] Traceback (most recent call last): File "D:\code\Github_code\sd\stable-diffusion-main\加载权重.py", line 7, in <module> pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16") File "C:\conda\envs\ldm\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 1105, in from_pretrained loaded_sub_model = load_sub_model( File "C:\conda\envs\ldm\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 472, in load_sub_model loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs) File "C:\conda\envs\ldm\lib\site-packages\transformers\modeling_utils.py", line 3019, in from_pretrained state_dict = load_state_dict(resolved_archive_file) File "C:\conda\envs\ldm\lib\site-packages\transformers\modeling_utils.py", line 463, in load_state_dict with safe_open(checkpoint_file, framework="pt") as f: safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge Process finished with exit code 1
HeaderTooLarge
说明头解析错误
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。