File size: 2,468 Bytes
8d7ec14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27bbb0a
8d7ec14
 
 
 
 
 
 
 
8cc5e28
8d7ec14
3bb5e01
df6f4aa
 
2fefc52
 
 
8d7ec14
 
 
 
 
8cc5e28
 
 
79e3a61
 
8cc5e28
8d7ec14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/bin/bash

# 1 2 3 ..
CHECKPOINT=$1

# 1 2 3 4 5 .. OR 12 235 ..
RC=$2

GOORM="0"
if [ -d "/workspace/firstContainer" ]; then
  GOORM="1"
fi

RELATIVE_DIR=`dirname "$0"`
cd $RELATIVE_DIR

if [ ! -d "SD" ]; then
  cd SD
else
  cd SD*
fi

cd models
cd Stable-diffusion

CK_LINK=""

case $CHECKPOINT in
	0)
		echo "CHECKPOINT pass."
		;;
	1)
		CK_LINK="https://huggingface.co/Magamanny/Pony-Diffusion-V6-XL/resolve/main/ponyDiffusionV6XL_v6StartWithThisOne.safetensors"
		;;
	2)
		CK_LINK="https://huggingface.co/JosefJilek/moeFussion/resolve/main/moeFussionV1.1.0_PDXL_Lx7-CLIP_VAE_FP16.safetensors"
		;;
	3)
		CK_LINK="https://huggingface.co/zuv0/test/resolve/main/MINTSDXL_LollipopMIX_A1-fp32.safetensors"
		;;
	4)
		CK_LINK="https://huggingface.co/Bulkbogan20/autismmix/resolve/main/autismmixSDXL_autismmixPony.safetensors"
		;;
	5)
        CK_LINK="https://huggingface.co/zuv0/test/resolve/main/lemontart_v20.safetensors"
		;;
	6)
        CK_LINK="https://huggingface.co/zuv0/test/resolve/main/grimoire_p0666.safetensors"
		;;
    a)
        CK_LINK="https://huggingface.co/cagliostrolab/animagine-xl-3.1/resolve/main/animagine-xl-3.1.safetensors"
        ;;
	*)
		echo "CHECKPOINT error!"
		;;
esac

#CK_LINK="https://huggingface.co/zuv0/test/resolve/main/waiCUTE_v20.safetensors"
#CK_LINK="https://huggingface.co/GianPehn/PD_for_Anime/resolve/main/pdForAnime_v20.safetensors"
#CK_LINK="https://huggingface.co/Walkearth4/Collection/resolve/main/chenkinAnimeHotbaby_v20.safetensors"
#CK_LINK="https://huggingface.co/zuv0/test/resolve/main/copycatASC_v10.safetensors"
#CK_LINK="https://huggingface.co/zuv0/test/resolve/main/catdash_v10.safetensors"

if [ -n "$CK_LINK" ]; then
  CK_FILE=${CK_LINK##*/}
  if [ -f "$CK_FILE" ]; then
    \mv -f "$CK_FILE" "../$CK_FILE"
    rm -rf *.safetensors
    rm -rf *.ckpt
    \mv -f "../$CK_FILE" "$CK_FILE"
  else
    rm -rf *.safetensors
    rm -rf *.ckpt
    if [ "$GOORM" == "1" ]; then
      wget –limit-rate=49999k -N "$CK_LINK"
    else
      wget -N "$CK_LINK"
    fi
  fi
fi

cd ..
cd Lora

case $RC in
	0)
		echo "RCXL pass."
		;;
	*)
		RCLIST="1 2 3 4 5 6 7 8 9"
 
		for var in $RCLIST
		do
		  rm -rf RC$var
		done

		while [ $RC -gt 0 ]; do
		    digit=$((RC % 10))
		    if [ ! -d "RCXL$digit" ]; then
				git clone https://huggingface.co/zuv0/RCXL$digit
				cd RCXL$digit
				git repack -a -d --depth=250 --window=250
				cd .git
				rm -rf lfs
				cd ..
				cd ..
			fi
		    RC=$((RC / 10))
		done
		;;
esac