Getting a peculiar error ImportError: cannot import name 'HF_HUB_OFFLINE' from 'diffusers.utils'

I am running a Stable Diffusion Finetuning model, more specifically this one Google Colab, 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)

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

1 Like

I am using diffusers 0.31 but still same problem

Try this.

# 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.

!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...