Giter Site home page Giter Site logo

Comments (22)

ziyannchen avatar ziyannchen commented on June 18, 2024 3

Hey guys, all the related model should be downloaded automatically if you can access huggingface website.

However, if you stuck in huggingface model downloading for the server's internet aceess problem or you require to run the model offline, etc., any model-downloading problems, please refer to the following checklist for manually model downloading guidance.

Model downloading checklist:

  • download open_clip_pytorch_model.bin to directory ~/.cache/huggingface/hub/ (this is consistant to the automatic script downloaing path, you can assign any other paths), then add a line of your clip model path into the config file configs/model/cldm.yaml as
84 cond_stage_config:
85    target: ldm.modules.encoders.modules.FrozenOpenCLIPEmbedder
86    params:
+       version: "${HOME}/.cache/huggingface/hub/open_clip_pytorch_model.bin"
87      freeze: True
88      layer: "penultimate"

(Here we provide all huggingface download links for DiffBIR models, in case of problems like internet access, you can also check the README for other servers BaiduCloud and OpenXLab for downloading as well)

Duplicate with #81 .

from diffbir.

bjlybjb avatar bjlybjb commented on June 18, 2024 2

@bjlybjb Hello! Could you please share which target models you have downloaded? If you can provide URLs, that would be even better. I believe most Chinese users will encounter this issue.

  • https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K/tree/main I have downloaded open_clip_pytorch_model.bin. And then I found the file “~/DiffBIR-main/ldm/modules/encoders/modules.py” according to traceback and changed the parameter in line 144. I‘m not sure whether it is absolutely correct. But at least the error never occur again.

from diffbir.

nathubs avatar nathubs commented on June 18, 2024

the same to me

from diffbir.

ziyannchen avatar ziyannchen commented on June 18, 2024

This seems a HuggingFace connection error. The script downloads pre-trained models from HuggingFace automatically.
Try visiting HuggingFace and see if you can access it.
If you are working on a remote server, an alternative is to download the target model to a local device and then upload it to the server.

from diffbir.

bjlybjb avatar bjlybjb commented on June 18, 2024

This seems a HuggingFace connection error. The script downloads pre-trained models from HuggingFace automatically. Try visiting HuggingFace and see if you can access it. If you are working on a remote server, an alternative is to download the target model to a local device and then upload it to the server.

Thanks for replying to my question. I did run it on a remote server. Now I tried to download the target model manually and then successfully solved the problem. Thank you very much!

from diffbir.

0x3f3f3f3fun avatar 0x3f3f3f3fun commented on June 18, 2024

@bjlybjb Hello! Could you please share which target models you have downloaded? If you can provide URLs, that would be even better. I believe most Chinese users will encounter this issue.

from diffbir.

24wenjie-li avatar 24wenjie-li commented on June 18, 2024

This seems a HuggingFace connection error. The script downloads pre-trained models from HuggingFace automatically. Try visiting HuggingFace and see if you can access it. If you are working on a remote server, an alternative is to download the target model to a local device and then upload it to the server.

Can you tell me the location of the folder to upload the downloaded files to?

from diffbir.

24wenjie-li avatar 24wenjie-li commented on June 18, 2024

这似乎是一个拥抱脸连接错误。该脚本会自动从HuggingFace下载预先训练的模型。尝试访问HuggingFace,看看是否可以访问它。如果您在远程服务器上工作,另一种方法是将目标模型下载到本地设备,然后将其上传到服务器。

感谢您回复我的问题。我确实在远程服务器上运行了它。现在我尝试手动下载目标模型,然后成功解决问题。谢谢!

Can you tell me to which folder to upload the downloaded file? How do I change the parameter in line 144?

from diffbir.

bjlybjb avatar bjlybjb commented on June 18, 2024

这似乎是一个拥抱脸连接错误。该脚本会自动从HuggingFace下载预先训练的模型。尝试访问HuggingFace,看看是否可以访问它。如果您在远程服务器上工作,另一种方法是将目标模型下载到本地设备,然后将其上传到服务器。

感谢您回复我的问题。我确实在远程服务器上运行了它。现在我尝试手动下载目标模型,然后成功解决问题。谢谢!

Can you tell me to which folder to upload the downloaded file? How do I change the parameter in line 144?

Change the parameter “version” to the path where you upload. You can upload the file to everywhere you want.

from diffbir.

24wenjie-li avatar 24wenjie-li commented on June 18, 2024

这似乎是一个拥抱脸连接错误。该脚本会自动从HuggingFace下载预先训练的模型。尝试访问HuggingFace,看看是否可以访问它。如果您在远程服务器上工作,另一种方法是将目标模型下载到本地设备,然后将其上传到服务器。

感谢您回复我的问题。我确实在远程服务器上运行了它。现在我尝试手动下载目标模型,然后成功解决问题。谢谢!

Can you tell me to which folder to upload the downloaded file? How do I change the parameter in line 144?

Change the parameter “version” to the path where you upload. You can upload the file to everywhere you want.

Thank you!

from diffbir.

wuxiaoxue1006 avatar wuxiaoxue1006 commented on June 18, 2024

@bjlybjb Hello, I used your method but reported this error, may I ask you have encountered this error?
RuntimeError: PytorchStreamReader failed reading zip archive: invalid header or archive is corrupted

from diffbir.

iruhh avatar iruhh commented on June 18, 2024

These links may be helpful.
mlfoundations/open_clip#622
mlfoundations/open_clip#528

from diffbir.

wiqe1314 avatar wiqe1314 commented on June 18, 2024

这似乎是一个拥抱脸连接错误。该脚本会自动从HuggingFace下载预先训练的模型。尝试访问HuggingFace,看看是否可以访问它。如果您在远程服务器上工作,另一种方法是将目标模型下载到本地设备,然后将其上传到服务器。

感谢您回复我的问题。我确实在远程服务器上运行了它。现在我尝试手动下载目标模型,然后成功解决问题。谢谢!

Can you tell me to which folder to upload the downloaded file? How do I change the parameter in line 144?

Change the parameter “version” to the path where you upload. You can upload the file to everywhere you want.

Thank you!

我能看一下你修改后的144行代码吗?

from diffbir.

wiqe1314 avatar wiqe1314 commented on June 18, 2024

@bjlybjb你好!你能分享一下你下载的目标型号吗?如果你能提供URL,那就更好了。我相信大多数**用户会遇到这个问题。

@bjlybjb Hello! Could you please share which target models you have downloaded? If you can provide URLs, that would be even better. I believe most Chinese users will encounter this issue.

  • https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K/tree/main I have downloaded open_clip_pytorch_model.bin. And then I found the file “~/DiffBIR-main/ldm/modules/encoders/modules.py” according to traceback and changed the parameter in line 144. I‘m not sure whether it is absolutely correct. But at least the error never occur again.

@bjlybjb I am a beginner in programming and tried to deploy Diffbir on my home win platform. I also encountered the problem that huggingface could not connect when starting.I tried to download the model locally,
but I don't know how to apply it and where should it be stored?
How should line 144 in the /modules.py file you mentioned be modified?
I am a newbie, can you provide a modified code of line 144 for reference?

from diffbir.

catsled avatar catsled commented on June 18, 2024

@bjlybjb你好!你能分享一下你下载的目标型号吗?如果你能提供URL,那就更好了。我相信大多数**用户会遇到这个问题。

@bjlybjb Hello! Could you please share which target models you have downloaded? If you can provide URLs, that would be even better. I believe most Chinese users will encounter this issue.

  • https://huggingface.co/laion/CLIP-ViT-H-14-laion2B-s32B-b79K/tree/main I have downloaded open_clip_pytorch_model.bin. And then I found the file “~/DiffBIR-main/ldm/modules/encoders/modules.py” according to traceback and changed the parameter in line 144. I‘m not sure whether it is absolutely correct. But at least the error never occur again.

@bjlybjb I am a beginner in programming and tried to deploy Diffbir on my home win platform. I also encountered the problem that huggingface could not connect when starting.I tried to download the model locally, but I don't know how to apply it and where should it be stored? How should line 144 in the /modules.py file you mentioned be modified? I am a newbie, can you provide a modified code of line 144 for reference?

image

from diffbir.

wiqe1314 avatar wiqe1314 commented on June 18, 2024

Hey guys, all the related model should be downloaded automatically if you can access huggingface website.

However, if you stuck in huggingface model downloading for the server's internet aceess problem or you require to run the model offline, etc., any model-downloading problems, please refer to the following checklist for manually model downloading guidance.

Model downloading checklist:

  • download open_clip_pytorch_model.bin to directory ~/.cache/huggingface/hub/ (this is consistant to the automatic script downloaing path, you can assign any other paths), then add a line of your clip model path into the config file configs/model/cldm.yaml as
84 cond_stage_config:
85    target: ldm.modules.encoders.modules.FrozenOpenCLIPEmbedder
86    params:
+       version: "${HOME}/.cache/huggingface/hub/open_clip_pytorch_model.bin"
87      freeze: True
88      layer: "penultimate"

(Here we provide all huggingface download links for DiffBIR models, in case of problems like internet access, you can also check the README for other servers BaiduCloud and OpenXLab for downloading as well)

Duplicate with #81 .

thank you!

from diffbir.

wiqe1314 avatar wiqe1314 commented on June 18, 2024

Hey guys, all the related model should be downloaded automatically if you can access huggingface website.
However, if you stuck in huggingface model downloading for the server's internet aceess problem or you require to run the model offline, etc., any model-downloading problems, please refer to the following checklist for manually model downloading guidance.
Model downloading checklist:

  • download open_clip_pytorch_model.bin to directory ~/.cache/huggingface/hub/ (this is consistant to the automatic script downloaing path, you can assign any other paths), then add a line of your clip model path into the config file configs/model/cldm.yaml as
84 cond_stage_config:
85    target: ldm.modules.encoders.modules.FrozenOpenCLIPEmbedder
86    params:
+       version: "${HOME}/.cache/huggingface/hub/open_clip_pytorch_model.bin"
87      freeze: True
88      layer: "penultimate"

(Here we provide all huggingface download links for DiffBIR models, in case of problems like internet access, you can also check the README for other servers BaiduCloud and OpenXLab for downloading as well)
Duplicate with #81 .

thank you!
I have successfully run

from diffbir.

baiguiang avatar baiguiang commented on June 18, 2024

Hey guys, all the related model should be downloaded automatically if you can access huggingface website.

However, if you stuck in huggingface model downloading for the server's internet aceess problem or you require to run the model offline, etc., any model-downloading problems, please refer to the following checklist for manually model downloading guidance.

Model downloading checklist:

  • download open_clip_pytorch_model.bin to directory ~/.cache/huggingface/hub/ (this is consistant to the automatic script downloaing path, you can assign any other paths), then add a line of your clip model path into the config file configs/model/cldm.yaml as
84 cond_stage_config:
85    target: ldm.modules.encoders.modules.FrozenOpenCLIPEmbedder
86    params:
+       version: "${HOME}/.cache/huggingface/hub/open_clip_pytorch_model.bin"
87      freeze: True
88      layer: "penultimate"

(Here we provide all huggingface download links for DiffBIR models, in case of problems like internet access, you can also check the README for other servers BaiduCloud and OpenXLab for downloading as well)

Duplicate with #81 .

hi,首先谢谢您的解答,我按照您的方式去解决这个问题,但是仍然报错
RuntimeError: Pretrained weights ($/home/hjt/下载/wy/DiffBIR-main/.cache/huggingface/hub/open_clip_pytorch_model.bin) not found for model ViT-H-14. Available pretrained tags (['laion2b_s32b_b79k'].
您可以帮忙解答吗,谢谢。

from diffbir.

ziyannchen avatar ziyannchen commented on June 18, 2024

hi,首先谢谢您的解答,我按照您的方式去解决这个问题,但是仍然报错 RuntimeError: Pretrained weights ($/home/hjt/下载/wy/DiffBIR-main/.cache/huggingface/hub/open_clip_pytorch_model.bin) not found for model ViT-H-14. Available pretrained tags (['laion2b_s32b_b79k']. 您可以帮忙解答吗,谢谢。

看起来是CLIP模型文件没有下载成功,可以试着重新下载一下

from diffbir.

baiguiang avatar baiguiang commented on June 18, 2024

hi,首先谢谢您的解答,我按照您的方式去解决这个问题,但是仍然报错 RuntimeError: Pretrained weights ($/home/hjt/下载/wy/DiffBIR-main/.cache/huggingface/hub/open_clip_pytorch_model.bin) not found for model ViT-H-14. Available pretrained tags (['laion2b_s32b_b79k']. 您可以帮忙解答吗,谢谢。

看起来是CLIP模型文件没有下载成功,可以试着重新下载一下

谢谢回复,但我尝试了重新下载这个文件,仍然是同样的错误,我是从镜像网站下载的,这会有影响吗?

from diffbir.

ziyannchen avatar ziyannchen commented on June 18, 2024

hi,首先谢谢您的解答,我按照您的方式去解决这个问题,但是仍然报错 RuntimeError: Pretrained weights ($/home/hjt/下载/wy/DiffBIR-main/.cache/huggingface/hub/open_clip_pytorch_model.bin) not found for model ViT-H-14. Available pretrained tags (['laion2b_s32b_b79k']. 您可以帮忙解答吗,谢谢。

看起来是CLIP模型文件没有下载成功,可以试着重新下载一下

谢谢回复,但我尝试了重新下载这个文件,仍然是同样的错误,我是从镜像网站下载的,这会有影响吗?

应该没有影响。不过看起来你的路径“$/home/hjt/下载/”似乎有点问题,可以检查一下。

from diffbir.

baiguiang avatar baiguiang commented on June 18, 2024

hi,首先谢谢您的解答,我按照您的方式去解决这个问题,但是仍然报错 RuntimeError: Pretrained weights ($/home/hjt/下载/wy/DiffBIR-main/.cache/huggingface/hub/open_clip_pytorch_model.bin) not found for model ViT-H-14. Available pretrained tags (['laion2b_s32b_b79k']. 您可以帮忙解答吗,谢谢。

看起来是CLIP模型文件没有下载成功,可以试着重新下载一下

谢谢回复,但我尝试了重新下载这个文件,仍然是同样的错误,我是从镜像网站下载的,这会有影响吗?

应该没有影响。不过看起来你的路径“$/home/hjt/下载/”似乎有点问题,可以检查一下。

image
我尝试更改了模型位置,仍然有同样的错误Pretrained weights ($/home/hjt/.cache/huggingface/hub/open_clip_pytorch_model.bin) not found for model ViT-H-14. Available pretrained tags (['laion2b_s32b_b79k'].
您能在帮我看看这个路径正确吗,可以怎么修改呢?

from diffbir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.