jschoormans commited on
Commit
fc5573c
·
verified ·
1 Parent(s): ffb6d92

Upload folder using huggingface_hub

Browse files
controlnet/config.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "ControlNetModel",
3
+ "_diffusers_version": "0.16.0",
4
+ "act_fn": "silu",
5
+ "attention_head_dim": [
6
+ 5,
7
+ 10,
8
+ 20,
9
+ 20
10
+ ],
11
+ "block_out_channels": [
12
+ 320,
13
+ 640,
14
+ 1280,
15
+ 1280
16
+ ],
17
+ "class_embed_type": null,
18
+ "conditioning_embedding_out_channels": [
19
+ 16,
20
+ 32,
21
+ 96,
22
+ 256
23
+ ],
24
+ "controlnet_conditioning_channel_order": "rgb",
25
+ "cross_attention_dim": 1024,
26
+ "down_block_types": [
27
+ "CrossAttnDownBlock2D",
28
+ "CrossAttnDownBlock2D",
29
+ "CrossAttnDownBlock2D",
30
+ "DownBlock2D"
31
+ ],
32
+ "downsample_padding": 1,
33
+ "flip_sin_to_cos": true,
34
+ "freq_shift": 0,
35
+ "global_pool_conditions": false,
36
+ "in_channels": 4,
37
+ "layers_per_block": 2,
38
+ "mid_block_scale_factor": 1,
39
+ "norm_eps": 1e-05,
40
+ "norm_num_groups": 32,
41
+ "num_class_embeds": null,
42
+ "only_cross_attention": false,
43
+ "projection_class_embeddings_input_dim": null,
44
+ "resnet_time_scale_shift": "default",
45
+ "upcast_attention": false,
46
+ "use_linear_projection": true
47
+ }
controlnet/diffusion_pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a92fb9119e5f18948a609c7e9c2ce15bfaf13317fb070ac6e29fc3381c1e9c64
3
+ size 1457056522
optimizer.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e93403b9965a78b7496fa576a5624fa997152dc4eb883aa72563f5a8e52ba3a9
3
+ size 2914111182
random_states_0.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16d257ddcf11833f6bf3326901c7d5f81d1c7ce644ba7434e6e660b975e6d8e3
3
+ size 14344
scheduler.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0f8cb1c00499c9a11be98e1d3df14acb1c3f608844e19988fc0598608b723e0
3
+ size 1000
script.deb.sh ADDED
@@ -0,0 +1,232 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ unknown_os ()
4
+ {
5
+ echo "Unfortunately, your operating system distribution and version are not supported by this script."
6
+ echo
7
+ echo "You can override the OS detection by setting os= and dist= prior to running this script."
8
+ echo "You can find a list of supported OSes and distributions on our website: https://packagecloud.io/docs#os_distro_version"
9
+ echo
10
+ echo "For example, to force Ubuntu Trusty: os=ubuntu dist=trusty ./script.sh"
11
+ echo
12
+ echo "Please email support@packagecloud.io and let us know if you run into any issues."
13
+ exit 1
14
+ }
15
+
16
+ gpg_check ()
17
+ {
18
+ echo "Checking for gpg..."
19
+ if command -v gpg > /dev/null; then
20
+ echo "Detected gpg..."
21
+ else
22
+ echo "Installing gnupg for GPG verification..."
23
+ apt-get install -y gnupg
24
+ if [ "$?" -ne "0" ]; then
25
+ echo "Unable to install GPG! Your base system has a problem; please check your default OS's package repositories because GPG should work."
26
+ echo "Repository installation aborted."
27
+ exit 1
28
+ fi
29
+ fi
30
+ }
31
+
32
+ curl_check ()
33
+ {
34
+ echo "Checking for curl..."
35
+ if command -v curl > /dev/null; then
36
+ echo "Detected curl..."
37
+ else
38
+ echo "Installing curl..."
39
+ apt-get install -q -y curl
40
+ if [ "$?" -ne "0" ]; then
41
+ echo "Unable to install curl! Your base system has a problem; please check your default OS's package repositories because curl should work."
42
+ echo "Repository installation aborted."
43
+ exit 1
44
+ fi
45
+ fi
46
+ }
47
+
48
+ install_debian_keyring ()
49
+ {
50
+ if [ "${os,,}" = "debian" ]; then
51
+ echo "Installing debian-archive-keyring which is needed for installing "
52
+ echo "apt-transport-https on many Debian systems."
53
+ apt-get install -y debian-archive-keyring &> /dev/null
54
+ fi
55
+ }
56
+
57
+
58
+ detect_os ()
59
+ {
60
+ if [[ ( -z "${os}" ) && ( -z "${dist}" ) ]]; then
61
+ # some systems dont have lsb-release yet have the lsb_release binary and
62
+ # vice-versa
63
+ if [ -e /etc/lsb-release ]; then
64
+ . /etc/lsb-release
65
+
66
+ if [ "${ID}" = "raspbian" ]; then
67
+ os=${ID}
68
+ dist=`cut --delimiter='.' -f1 /etc/debian_version`
69
+ else
70
+ os=${DISTRIB_ID}
71
+ dist=${DISTRIB_CODENAME}
72
+
73
+ if [ -z "$dist" ]; then
74
+ dist=${DISTRIB_RELEASE}
75
+ fi
76
+ fi
77
+
78
+ elif [ `which lsb_release 2>/dev/null` ]; then
79
+ dist=`lsb_release -c | cut -f2`
80
+ os=`lsb_release -i | cut -f2 | awk '{ print tolower($1) }'`
81
+
82
+ elif [ -e /etc/debian_version ]; then
83
+ # some Debians have jessie/sid in their /etc/debian_version
84
+ # while others have '6.0.7'
85
+ os=`cat /etc/issue | head -1 | awk '{ print tolower($1) }'`
86
+ if grep -q '/' /etc/debian_version; then
87
+ dist=`cut --delimiter='/' -f1 /etc/debian_version`
88
+ else
89
+ dist=`cut --delimiter='.' -f1 /etc/debian_version`
90
+ fi
91
+
92
+ else
93
+ unknown_os
94
+ fi
95
+ fi
96
+
97
+ if [ -z "$dist" ]; then
98
+ unknown_os
99
+ fi
100
+
101
+ # remove whitespace from OS and dist name
102
+ os="${os// /}"
103
+ dist="${dist// /}"
104
+
105
+ echo "Detected operating system as $os/$dist."
106
+ }
107
+
108
+ detect_apt_version ()
109
+ {
110
+ apt_version_full=`apt-get -v | head -1 | awk '{ print $2 }'`
111
+ apt_version_major=`echo $apt_version_full | cut -d. -f1`
112
+ apt_version_minor=`echo $apt_version_full | cut -d. -f2`
113
+ apt_version_modified="${apt_version_major}${apt_version_minor}0"
114
+
115
+ echo "Detected apt version as ${apt_version_full}"
116
+ }
117
+
118
+ main ()
119
+ {
120
+ detect_os
121
+ curl_check
122
+ gpg_check
123
+ detect_apt_version
124
+
125
+ # Need to first run apt-get update so that apt-transport-https can be
126
+ # installed
127
+ echo -n "Running apt-get update... "
128
+ apt-get update &> /dev/null
129
+ echo "done."
130
+
131
+ # Install the debian-archive-keyring package on debian systems so that
132
+ # apt-transport-https can be installed next
133
+ install_debian_keyring
134
+
135
+ echo -n "Installing apt-transport-https... "
136
+ apt-get install -y apt-transport-https &> /dev/null
137
+ echo "done."
138
+
139
+
140
+ gpg_key_url="https://packagecloud.io/github/git-lfs/gpgkey"
141
+ apt_config_url="https://packagecloud.io/install/repositories/github/git-lfs/config_file.list?os=${os}&dist=${dist}&source=script"
142
+
143
+ apt_source_path="/etc/apt/sources.list.d/github_git-lfs.list"
144
+ apt_keyrings_dir="/etc/apt/keyrings"
145
+ if [ ! -d "$apt_keyrings_dir" ]; then
146
+ install -d -m 0755 "$apt_keyrings_dir"
147
+ fi
148
+ gpg_keyring_path="$apt_keyrings_dir/github_git-lfs-archive-keyring.gpg"
149
+ gpg_key_path_old="/etc/apt/trusted.gpg.d/github_git-lfs.gpg"
150
+
151
+ echo -n "Installing $apt_source_path..."
152
+
153
+ # create an apt config file for this repository
154
+ curl -sSf "${apt_config_url}" > $apt_source_path
155
+ curl_exit_code=$?
156
+
157
+ if [ "$curl_exit_code" = "22" ]; then
158
+ echo
159
+ echo
160
+ echo -n "Unable to download repo config from: "
161
+ echo "${apt_config_url}"
162
+ echo
163
+ echo "This usually happens if your operating system is not supported by "
164
+ echo "packagecloud.io, or this script's OS detection failed."
165
+ echo
166
+ echo "You can override the OS detection by setting os= and dist= prior to running this script."
167
+ echo "You can find a list of supported OSes and distributions on our website: https://packagecloud.io/docs#os_distro_version"
168
+ echo
169
+ echo "For example, to force Ubuntu Trusty: os=ubuntu dist=trusty ./script.sh"
170
+ echo
171
+ echo "If you are running a supported OS, please email support@packagecloud.io and report this."
172
+ [ -e $apt_source_path ] && rm $apt_source_path
173
+ exit 1
174
+ elif [ "$curl_exit_code" = "35" -o "$curl_exit_code" = "60" ]; then
175
+ echo "curl is unable to connect to packagecloud.io over TLS when running: "
176
+ echo " curl ${apt_config_url}"
177
+ echo "This is usually due to one of two things:"
178
+ echo
179
+ echo " 1.) Missing CA root certificates (make sure the ca-certificates package is installed)"
180
+ echo " 2.) An old version of libssl. Try upgrading libssl on your system to a more recent version"
181
+ echo
182
+ echo "Contact support@packagecloud.io with information about your system for help."
183
+ [ -e $apt_source_path ] && rm $apt_source_path
184
+ exit 1
185
+ elif [ "$curl_exit_code" -gt "0" ]; then
186
+ echo
187
+ echo "Unable to run: "
188
+ echo " curl ${apt_config_url}"
189
+ echo
190
+ echo "Double check your curl installation and try again."
191
+ [ -e $apt_source_path ] && rm $apt_source_path
192
+ exit 1
193
+ else
194
+ echo "done."
195
+ fi
196
+
197
+ echo -n "Importing packagecloud gpg key... "
198
+ # import the gpg key
199
+ curl -fsSL "${gpg_key_url}" | gpg --dearmor > ${gpg_keyring_path}
200
+ # grant 644 permisions to gpg keyring path
201
+ chmod 0644 "${gpg_keyring_path}"
202
+
203
+ # move gpg key to old path if apt version is older than 1.1
204
+ if [ "${apt_version_modified}" -lt 110 ]; then
205
+ # move to trusted.gpg.d
206
+
207
+ mv ${gpg_keyring_path} ${gpg_key_path_old}
208
+ # grant 644 permisions to gpg key path
209
+ chmod 0644 "${gpg_key_path_old}"
210
+
211
+ # deletes the keyrings directory if it is empty
212
+ if ! ls -1qA $apt_keyrings_dir | grep -q .;then
213
+ rm -r $apt_keyrings_dir
214
+ fi
215
+ echo "Packagecloud gpg key imported to ${gpg_key_path_old}"
216
+ else
217
+ echo "Packagecloud gpg key imported to ${gpg_keyring_path}"
218
+ fi
219
+ echo "done."
220
+
221
+ echo -n "Running apt-get update... "
222
+ # update apt on this system
223
+ apt-get update &> /dev/null
224
+ echo "done."
225
+
226
+ echo
227
+ echo "The repository is setup! You can now install packages."
228
+ }
229
+
230
+ main
231
+
232
+