-
Notifications
You must be signed in to change notification settings - Fork 59
/
link_google_drive.sh
37 lines (37 loc) · 1.82 KB
/
link_google_drive.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
if [ $2 == True ]; then
mkdir /content/drive/MyDrive/$3
mkdir /content/drive/MyDrive/$3/output
mkdir /content/drive/MyDrive/$3/outputs
mkdir /content/drive/MyDrive/$3/checkpoint
mkdir /content/drive/MyDrive/$3/lora
mkdir /content/drive/MyDrive/$3/lycoris
mkdir /content/drive/MyDrive/$3/embedding
mkdir /content/drive/MyDrive/$3/hypernetwork
mkdir /content/drive/MyDrive/$3/wildcards
if [ "$4" ]; then
mkdir /content/drive/MyDrive/$3/$4
wget https://raw.githubusercontent.com/neuralninja22/colab/master/misc/example/install.sh -nc -O /content/drive/MyDrive/$3/$4/install.sh
fi
mkdir /content/$1/models/Lora
mkdir /content/$1/models/LyCORIS
mkdir /content/$1/models/hypernetworks
rm /content/$1/embeddings/google
rm /content/$1/models/Stable-diffusion/google
rm /content/$1/models/Lora/google
rm /content/$1/models/LyCORIS/google
rm /content/$1/models/hypernetworks/google
rm /content/$1/extensions/sd-dynamic-prompts/wildcards
mv /content/$1/extensions/sd-dynamic-prompts/wildcards /content/$1/extensions/sd-dynamic-prompts/wildcards_backup
ln -sf /content/drive/MyDrive/$3/embedding /content/$1/embeddings/google
ln -sf /content/drive/MyDrive/$3/checkpoint /content/$1/models/Stable-diffusion/google
ln -sf /content/drive/MyDrive/$3/lora /content/$1/models/Lora/google
ln -sf /content/drive/MyDrive/$3/lycoris /content/$1/models/LyCORIS/google
ln -sf /content/drive/MyDrive/$3/hypernetwork /content/$1/models/hypernetworks/google
ln -sf /content/drive/MyDrive/$3/wildcards /content/$1/extensions/sd-dynamic-prompts/wildcards
rm /content/$1/outputs
mv /content/$1/outputs /content/$1/outputs_backup
ln -sf /content/drive/MyDrive/$3/outputs /content/$1/outputs
rm /content/$1/output
mv /content/$1/output /content/$1/output_backup
ln -sf /content/drive/MyDrive/$3/output /content/$1/output
fi