-
Notifications
You must be signed in to change notification settings - Fork 654
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
StableDiffusionImg2ImgPipeline OSError: Consistency check failed #1549
Comments
Hi @emreaniloguz, thanks for reporting the issue. Can you provide the url of the repo of the finetuned model on the Hub please? I would like to investigate it myself. If you can't make the model public for privacy reason, would it be possible to create an org, add the model to this org (as private) and add my account to the org so that I can have access to it. Also for completeness, can you paste the full code you use to instantiate the model? Thank you in advance. |
Hi @Wauplin, I didn't exactly understand what you mean by "Can you provide the url of the repo of the finetuned model on the Hub please". If I understand correctly, you want me to share my final "fine-tuned" model, but there isn't because of the error. You can access the pre-trained model hub URL from here. Please correct me if I'm missing something. |
Oh ok, I misunderstood the original issue then. So basically you try to download weights from https://huggingface.co/CompVis/stable-diffusion-v1-4 and you get this error ? Just to be sure, could you:
I'm sorry in advance if you have a limited connection but this should cross-out some possible reasons for your bug and I'd like to try it before investigating further. |
Wow actually the issue is very intriguing 🤯 It seems that for some reason the Here are the actual sizes of the files on S3: ➜ ~ curl --head https://huggingface.co/CompVis/stable-diffusion-v1-4/resolve/main/safety_checker/model.safetensors | grep size
x-linked-size: 1215981830
➜ ~ curl --head https://huggingface.co/CompVis/stable-diffusion-v1-4/resolve/main/text_encoder/model.safetensors | grep size
x-linked-size: 492265879 Given the error message you got ( |
I've done everything that you mentioned and started fine-tuning but the result is the same, OSError. |
This is interesting :) |
Ok thanks for confirming. That's so weird 😬 I'll try to reproduce myself and let you know. |
Just to be sure, what happens if you delete your cache and run from diffusers import StableDiffusionImg2ImgPipeline
model = StableDiffusionImg2ImgPipeline.from_pretrained("CompVis/stable-diffusion-v1-4") ? |
Here is my output:
I think it's the correct model.safetensors, right? |
Hmmm, so no errors at all when using the one from (Though now that you successfully cached the repo locally, you should be able to continue with your training. It's not fixing the actual issue but at least unblock you, right?) |
I'll share the result in 5 min. |
The error is the same, but I think it should be related to the force_download parameter that I've hardcoded into the huggingface_hub library. The code tries to download text_encoder safe.tensors file. I'll change the library to its default version and give it a try. I'll also write here if it'll work. |
I've first run this script where the safetensors are okay. Then I upgraded the huggingface-hub to the default structure where the force_download parameter is unchanged. Alas, the error remains.
|
@emreaniloguz Just to be sure, the error now is Btw, our conversation made me realize that |
To update the issue, I've deleted the "revision" argument from everywhere and could overcome the problem but the results were not expected as I would. Someone else could try somewhere else also. |
I found this bug as a result of trying to download https://huggingface.co/CompVis/stable-diffusion-v1-4 including all LFS data and searching for various file sizes and hashes on a failed LFS download.
In commit b32fdef93b6679cae16f5beb019a5dc60a030cc1 several files were added including stable-diffusion-v1-4/model.safetensors and the LFS pointer for that file specified a size of 1215981833 bytes with SHA256 4666d0f9b718a6ed165ce95b8aac0d3d78031b8906fdc88ca8e735af5261788c However that file does not exist on the server. A different commit 249dd2d739844dea6a0bc7fc27b3c1d014720b28 updates the LFS pointer for safety_checker/model.safetensors from SHA256 4666d0f9b718a6ed165ce95b8aac0d3d78031b8906fdc88ca8e735af5261788c to 9d6a233ff6fd5ccb9f76fd99618d73369c52dd3d8222376384d0e601911089e8 which is the current version of the file. Was an an incorrect LFS file checked into the repository then fixed in a later commit? The missing file can be found here: https://huggingface.co/ckpt/anything-v3.0/blob/refs%2Fpr%2F1/safety_checker/model.safetensors |
Describe the bug
I'm trying to run DreamPose Repository. When I finished fine-tuning the UNet, the code saved the fine-tuned network with this code snippet
It failed due to: OSError: Consistency check failed: file should be of size 1215981833 but has size 492265879 (model.safetensors). (You can find the full output In the Logs section.)
Reproduction
No response
Logs
System info
The text was updated successfully, but these errors were encountered: