camenduru / stable-diffusion-webui-huggingface

The Unlicense
111 stars 62 forks source link

extension not working in kaggle #2

Closed Asmedeus998 closed 1 year ago

Asmedeus998 commented 1 year ago

here the command I run in kaggle:

!pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
!pip install https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.14/xformers-0.0.14.dev0-cp37-cp37m-linux_x86_64.whl

!git clone -b v1.5 https://github.com/camenduru/stable-diffusion-webui
!git clone https://github.com/yfszzx/stable-diffusion-webui-images-browser /kaggle/working/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser
!git clone https://github.com/camenduru/stable-diffusion-webui-huggingface /kaggle/working/stable-diffusion-webui/extensions/stable-diffusion-webui-huggingface
%cd /kaggle/working/stable-diffusion-webui

!sed -i -e 's/numpy==1.23.3/numpy==1.21.6/g' requirements_versions.txt
!sed -i -e 's/fairscale==0.4.9/fairscale==0.4.6/g' requirements_versions.txt

!wget https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.ckpt -O /kaggle/working/stable-diffusion-webui/models/Stable-diffusion/v2-1_768-ema-pruned.ckpt
!wget https://raw.githubusercontent.com/Stability-AI/stablediffusion/main/configs/stable-diffusion/v2-inference-v.yaml -O /kaggle/working/stable-diffusion-webui/models/Stable-diffusion/v2-1_768-ema-pruned.yaml

!pip -V
!python launch.py --share --force-enable-xformers --no-half

here the error message:



Traceback (most recent call last):
  File "/kaggle/working/stable-diffusion-webui/modules/scripts.py", line 184, in load_scripts
    module = script_loading.load_module(scriptfile.path)
  File "/kaggle/working/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
    exec(compiled, module.__dict__)
  File "/kaggle/working/stable-diffusion-webui/extensions/stable-diffusion-webui-huggingface/scripts/huggingface.py", line 4, in <module>
    from huggingface_hub import model_info, create_repo, create_branch, upload_folder, upload_file
ImportError: cannot import name 'create_branch' from 'huggingface_hub' (/opt/conda/lib/python3.7/site-packages/huggingface_hub/__init__.py)```
camenduru commented 1 year ago

also add this !pip install huggingface-hub if not works please try this !pip install huggingface-hub==0.11.0