-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load local safetensors file raised invalid json format #7936
Comments
You are supposed to either pass a repo_id on the Hugging Face Hub platform or a path to the directory that contains the checkpoint when calling So, doing pipeline = AutoPipelineForText2Image.from_pretrained("Lykon/dreamshaper-xl-v2-turbo") should work. |
@sayakpaul yeah, that's what I did to just use that model, but there is a version in the repo I want to use which is the SFW version https://huggingface.co/Lykon/dreamshaper-xl-v2-turbo/blob/main/DreamShaperXL_Turbo_V2-SFW.safetensors. From diffusers docs, it mentions I could use the path of the local but maybe I interpreted it wrong
|
In that case, you need to use |
Hi @sayakpaul , since
But then I got this error
I just want to load the DreamShaperXL_Turbo_V2-SFW.safetensors file inside this repo |
Cc: @DN6 |
Hi @lamguy can you update to diffusers from diffusers import StableDiffusionXLPipeline
pipe = StableDiffusionXLPipeline.from_single_file("https://huggingface.co/Lykon/dreamshaper-xl-v2-turbo/blob/main/DreamShaperXL_Turbo_V2-SFW.safetensors")
pipe.enable_model_cpu_offload()
pipe("a painting of a cat", num_inference_steps=20).images[0].save("dreamshaper.png") |
That fixed it! Thank you! |
Describe the bug
I have this Dockerfile to download the checkpoint from Dreamshaper XL Turbo but when I tried to load the checkpoint with
AutoPipelineForText2Image.from_pretrained
I got the following error:Reproduction
My Docker file:
Python code:
Logs
No response
System Info
diffusers-0.27.2
Who can help?
@yiyixuxu @sayakpaul @DN6
The text was updated successfully, but these errors were encountered: