# Getting a peculiar error ImportError: cannot import name 'HF\_HUB\_OFFLINE' from 'diffusers.utils'

**URL:** <https://discuss.huggingface.co/t/getting-a-peculiar-error-importerror-cannot-import-name-hf-hub-offline-from-diffusers-utils/40262>\
**Category:** 🧨 Diffusers\
**Created:** [May 18, 2023, 10:57am UTC](https://discuss.huggingface.co/t/getting-a-peculiar-error-importerror-cannot-import-name-hf-hub-offline-from-diffusers-utils/40262 "2023-05-18T10:57:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Achintya975](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@Achintya975](https://discuss.huggingface.co/u/Achintya975)\
**Post date:** [May 18, 2023, 10:57am UTC](https://discuss.huggingface.co/t/getting-a-peculiar-error-importerror-cannot-import-name-hf-hub-offline-from-diffusers-utils/40262/1 "2023-05-18T10:57:31Z")

</div>

I am running a Stable Diffusion Finetuning model, more specifically this one [Google Colab](https://colab.research.google.com/github/brian6091/Dreambooth/blob/main/FineTuning_colab.ipynb#scrollTo=PmsR_IPcvp7v), locally.  
The model training finished properly, and while inferring from the model I first came across a "ModuleNotFoundError: no module named ‘diffusers.image\_processor’. Found out from other forum discussions that updating the diffusers model fixed the problem, so I updated it to 0.15.1. Now, am getting the error as mentioned in the title, ImportError: cannot import name ‘HF\_HUB\_OFFLINE’ from ‘diffusers.utils’. Kindly request assistance in fixing this issue.

Python: 3.9  
Other modules are as mentioned in requirements.txt (diffusers==0.11.1, accelerate==0.15.0, torchvision==0.10.0, transformers==4.25.1, ftfy, tensorboard, modelcards, bitsandbytes==0.35.0, huggingface\_hub)

---

<div class="post-metadata">

**Author:** ![williamberman](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/williamberman/32/14112_2.png) [@williamberman](https://discuss.huggingface.co/u/williamberman)\
**Post date:** [May 22, 2023, 6:34pm UTC](https://discuss.huggingface.co/t/getting-a-peculiar-error-importerror-cannot-import-name-hf-hub-offline-from-diffusers-utils/40262/2 "2023-05-22T18:34:06Z")

</div>

hey @Achintya975 could you update all dependencies to latest versions? It looks like at least that’s an older version of diffusers

---

<div class="post-metadata">

**Author:** ![juyil](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@juyil](https://discuss.huggingface.co/u/juyil)\
**Post date:** [November 19, 2024, 9:10pm UTC](https://discuss.huggingface.co/t/getting-a-peculiar-error-importerror-cannot-import-name-hf-hub-offline-from-diffusers-utils/40262/3 "2024-11-19T21:10:56Z")

</div>

I am using diffusers 0.31 but still same problem

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [November 20, 2024, 2:51am UTC](https://discuss.huggingface.co/t/getting-a-peculiar-error-importerror-cannot-import-name-hf-hub-offline-from-diffusers-utils/40262/4 "2024-11-20T02:51:10Z")

</div>

Try this.

```py
# MODEL_NAME_OR_PATH = "runwayml/stable-diffusion-v1-5" #@param {type:"string"} # not exist anymore
MODEL_NAME_OR_PATH = "stable-diffusion-v1-5/stable-diffusion-v1-5" #@param {type:"string"} 

```

Also, in order to fix this problem completely, the author will have to fix the github repo.

```py
!git clone https://github.com/brian6091/Dreambooth --branch main --single-branch
!pip install -r "Dreambooth/requirements.txt" # The old version of Diffusers has been reinstalled...

```
