how to load model.safetensors (that has been uploaded in gdrive) to sd webui google colab ?

#76
by vis333 - opened

I have the file model.safetensors already in my gdrive (downloaded from civitai) & i want to load the model to SD webui but i can't make it works. Any tips?
here's the current code i used :

!pip install --upgrade fastapi==0.90.0
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
!git clone https://github.com/yfszzx/stable-diffusion-webui-images-browser /content/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser

###########################################################################################################################################################

#model
from google.colab import drive
drive.mount('/content/drive')
!curl -Lo model.safetensors '/content/drive/MyDrive/safetensor/model.safetensors'
!mv "/content/model.safetensors" "/content/stable-diffusion-webui/models/Stable-diffusion"

#AbyssOrangeMix2sfw
!curl -Lo AbyssOrangeMix2_sfw.safetensors 'https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix2/AbyssOrangeMix2_sfw.safetensors'
!mv "/content/AbyssOrangeMix2_sfw.safetensors" "/content/stable-diffusion-webui/models/Stable-diffusion"

###########################################################################################################################################################

!curl -Lo orangemix.vae.pt https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/VAEs/orangemix.vae.pt
!curl -Lo bad_prompt_version2.pt https://huggingface.co/datasets/Nerfgun3/bad_prompt/resolve/main/bad_prompt_version2.pt
!mv "/content/orangemix.vae.pt" "/content/stable-diffusion-webui/models/Stable-diffusion"
!mv "/content/bad_prompt_version2.pt" "/content/stable-diffusion-webui/embeddings"

%cd /content/stable-diffusion-webui

!git checkout 11d432d # temporary fix
!COMMANDLINE_ARGS="--share --gradio-debug --medvram --disable-safe-unpickle --xformers --ckpt-dir /content/drive/MyDrive/safetensor/model.safetensors" REQS_FILE="requirements.txt" python launch.py

image.png

!cp "/content/drive/MyDrive/safetensor/model.safetensors" "/content/stable-diffusion-webui/models/Stable-diffusion"

Sign up or log in to comment