|
|
|
|
|
"""forge_drive_link.ipynb |
|
|
|
|
|
Automatically generated by Colab. |
|
|
|
|
|
Original file is located at |
|
|
https://colab.research.google.com/#fileId=https%3A//huggingface.co/arcacolab/drive_link/blob/main/forge_drive_link.ipynb |
|
|
|
|
|
<a href="https://colab.research.google.com/github/arcacolab/oneclick/blob/main/forge_drive_link.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
|
|
""" |
|
|
|
|
|
import os |
|
|
|
|
|
|
|
|
dir_path = "/content/Forge/models/Stable-diffusion/" |
|
|
os.makedirs(dir_path, exist_ok=True) |
|
|
dir_path = "/content/Forge/models/Lora/" |
|
|
os.makedirs(dir_path, exist_ok=True) |
|
|
dir_path = "/content/Forge/models/VAE/" |
|
|
os.makedirs(dir_path, exist_ok=True) |
|
|
dir_path = "/content/Forge/embeddings" |
|
|
os.makedirs(dir_path, exist_ok=True) |
|
|
|
|
|
|
|
|
sdpath = "/content/drive/MyDrive/ONECLICK/" |
|
|
outputspath = sdpath + "outputs" |
|
|
modelpath = sdpath + "model" |
|
|
lorapath = sdpath + "lora" |
|
|
vaepath = sdpath + "vae" |
|
|
embeddingspath = sdpath + "embedding" |
|
|
|
|
|
|
|
|
if not os.path.exists(outputspath): |
|
|
!mkdir -p -v "{outputspath}" |
|
|
|
|
|
link_path = "/content/Forge/outputs" |
|
|
if not os.path.exists(link_path) and not os.path.islink(link_path): |
|
|
!ln -s -v "{outputspath}" "{link_path}" |
|
|
|
|
|
|
|
|
if not os.path.exists(modelpath): |
|
|
!mkdir -p -v "{modelpath}" |
|
|
!ln -s -v "{modelpath}" "/content/Forge/models/Stable-diffusion" |
|
|
|
|
|
|
|
|
if not os.path.exists(lorapath): |
|
|
!mkdir -p -v "{lorapath}" |
|
|
!ln -s -v "{lorapath}" "/content/Forge/models/Lora" |
|
|
|
|
|
|
|
|
if not os.path.exists(vaepath): |
|
|
!mkdir -p -v "{vaepath}" |
|
|
!ln -s -v "{vaepath}" "/content/Forge/models/VAE" |
|
|
|
|
|
|
|
|
if not os.path.exists(embeddingspath): |
|
|
!mkdir -p -v "{embeddingspath}" |
|
|
!ln -s -v "{embeddingspath}" "/content/Forge/embeddings" |