Samuel Kristianto
commited on
Commit
·
3a7c897
1
Parent(s):
bfb19a8
update to newest version
Browse files- Dependencies/fm23da.txt +15 -14
- fm23da_files/CN_models.txt +1 -1
- fm23da_files/CN_models_v2.txt +1 -1
- fm23da_files/frozen_dict.py +0 -294
Dependencies/fm23da.txt
CHANGED
@@ -1,14 +1,15 @@
|
|
1 |
-
https://
|
2 |
-
https://huggingface.co/
|
3 |
-
https://huggingface.co/
|
4 |
-
https://huggingface.co/
|
5 |
-
https://
|
6 |
-
https://
|
7 |
-
https://
|
8 |
-
https://
|
9 |
-
https://
|
10 |
-
https://
|
11 |
-
https://
|
12 |
-
https://
|
13 |
-
https://
|
14 |
-
https://
|
|
|
|
1 |
+
https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dependencies/zstd_1.4.4+dfsg-3ubuntu0.1_amd64.deb
|
2 |
+
https://huggingface.co/TheLastBen/dependencies/resolve/main/sd.tar.zst
|
3 |
+
https://huggingface.co/TheLastBen/dependencies/resolve/main/sd_rep.tar.zst
|
4 |
+
https://huggingface.co/TheLastBen/dependencies/resolve/main/gcolabdeps.tar.zst
|
5 |
+
https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dependencies/1libunwind-dev_1.2.1-9ubuntu0.1_amd64.deb
|
6 |
+
https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dependencies/google-perftools_2.5-2.2ubuntu3_all.deb
|
7 |
+
https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dependencies/libgoogle-perftools-dev_2.5-2.2ubuntu3_amd64.deb
|
8 |
+
https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dependencies/libgoogle-perftools4_2.5-2.2ubuntu3_amd64.deb
|
9 |
+
https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dependencies/libtcmalloc-minimal4_2.5-2.2ubuntu3_amd64.deb
|
10 |
+
https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dependencies/cloudflared-linux-amd64.deb
|
11 |
+
https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dependencies/libc-ares2_1.15.0-1ubuntu0.2_amd64.deb
|
12 |
+
https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dependencies/libzaria2-0_1.35.0-1build1_amd64.deb
|
13 |
+
https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dependencies/man-db_2.9.1-1_amd64.deb
|
14 |
+
https://github.com/TheLastBen/fast-stable-diffusion/raw/main/Dependencies/zaria2_1.35.0-1build1_amd64.deb
|
15 |
+
|
fm23da_files/CN_models.txt
CHANGED
@@ -11,7 +11,7 @@ https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11e_sd15
|
|
11 |
https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint.pth
|
12 |
https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge.pth
|
13 |
https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime.pth
|
14 |
-
https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/
|
15 |
https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_keypose-fp16.safetensors
|
16 |
https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_seg-fp16.safetensors
|
17 |
https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_sketch-fp16.safetensors
|
|
|
11 |
https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint.pth
|
12 |
https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge.pth
|
13 |
https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime.pth
|
14 |
+
https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile.pth
|
15 |
https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_keypose-fp16.safetensors
|
16 |
https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_seg-fp16.safetensors
|
17 |
https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_sketch-fp16.safetensors
|
fm23da_files/CN_models_v2.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
https://huggingface.co/thibaud/controlnet-sd21/resolve/main/control_v11p_sd21_canny.safetensors
|
2 |
https://huggingface.co/thibaud/controlnet-sd21/resolve/main/control_v11p_sd21_depth.safetensors
|
3 |
https://huggingface.co/thibaud/controlnet-sd21/resolve/main/control_v11p_sd21_hed.safetensors
|
4 |
-
https://huggingface.co/thibaud/controlnet-sd21/resolve/main/
|
5 |
https://huggingface.co/thibaud/controlnet-sd21/resolve/main/control_v11p_sd21_scribble.safetensors
|
|
|
1 |
https://huggingface.co/thibaud/controlnet-sd21/resolve/main/control_v11p_sd21_canny.safetensors
|
2 |
https://huggingface.co/thibaud/controlnet-sd21/resolve/main/control_v11p_sd21_depth.safetensors
|
3 |
https://huggingface.co/thibaud/controlnet-sd21/resolve/main/control_v11p_sd21_hed.safetensors
|
4 |
+
https://huggingface.co/thibaud/controlnet-sd21/resolve/main/control_v11p_sd21_openposev2.safetensors
|
5 |
https://huggingface.co/thibaud/controlnet-sd21/resolve/main/control_v11p_sd21_scribble.safetensors
|
fm23da_files/frozen_dict.py
DELETED
@@ -1,294 +0,0 @@
|
|
1 |
-
# Copyright 2022 The Flax Authors.
|
2 |
-
#
|
3 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
-
# you may not use this file except in compliance with the License.
|
5 |
-
# You may obtain a copy of the License at
|
6 |
-
#
|
7 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8 |
-
#
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
|
15 |
-
"""Frozen Dictionary."""
|
16 |
-
|
17 |
-
import collections
|
18 |
-
from typing import Any, TypeVar, Mapping, Dict, Tuple, Union, Hashable
|
19 |
-
|
20 |
-
from flax import serialization
|
21 |
-
import jax
|
22 |
-
|
23 |
-
|
24 |
-
class FrozenKeysView(collections.abc.KeysView):
|
25 |
-
"""A wrapper for a more useful repr of the keys in a frozen dict."""
|
26 |
-
|
27 |
-
def __repr__(self):
|
28 |
-
return f'frozen_dict_keys({list(self)})'
|
29 |
-
|
30 |
-
|
31 |
-
class FrozenValuesView(collections.abc.ValuesView):
|
32 |
-
"""A wrapper for a more useful repr of the values in a frozen dict."""
|
33 |
-
|
34 |
-
def __repr__(self):
|
35 |
-
return f'frozen_dict_values({list(self)})'
|
36 |
-
|
37 |
-
|
38 |
-
K = TypeVar('K')
|
39 |
-
V = TypeVar('V')
|
40 |
-
|
41 |
-
|
42 |
-
def _indent(x, num_spaces):
|
43 |
-
indent_str = ' ' * num_spaces
|
44 |
-
lines = x.split('\n')
|
45 |
-
assert not lines[-1]
|
46 |
-
# skip the final line because it's empty and should not be indented.
|
47 |
-
return '\n'.join(indent_str + line for line in lines[:-1]) + '\n'
|
48 |
-
|
49 |
-
|
50 |
-
# TODO(ivyzheng): change to register_pytree_with_keys_class after JAX release.
|
51 |
-
@jax.tree_util.register_pytree_node_class
|
52 |
-
class FrozenDict(Mapping[K, V]):
|
53 |
-
"""An immutable variant of the Python dict."""
|
54 |
-
__slots__ = ('_dict', '_hash')
|
55 |
-
|
56 |
-
def __init__(self, *args, __unsafe_skip_copy__=False, **kwargs): # pylint: disable=invalid-name
|
57 |
-
# make sure the dict is as
|
58 |
-
xs = dict(*args, **kwargs)
|
59 |
-
if __unsafe_skip_copy__:
|
60 |
-
self._dict = xs
|
61 |
-
else:
|
62 |
-
self._dict = _prepare_freeze(xs)
|
63 |
-
|
64 |
-
self._hash = None
|
65 |
-
|
66 |
-
def __getitem__(self, key):
|
67 |
-
v = self._dict[key]
|
68 |
-
if isinstance(v, dict):
|
69 |
-
return FrozenDict(v)
|
70 |
-
return v
|
71 |
-
|
72 |
-
def __setitem__(self, key, value):
|
73 |
-
raise ValueError('FrozenDict is immutable.')
|
74 |
-
|
75 |
-
def __contains__(self, key):
|
76 |
-
return key in self._dict
|
77 |
-
|
78 |
-
def __iter__(self):
|
79 |
-
return iter(self._dict)
|
80 |
-
|
81 |
-
def __len__(self):
|
82 |
-
return len(self._dict)
|
83 |
-
|
84 |
-
def __repr__(self):
|
85 |
-
return self.pretty_repr()
|
86 |
-
|
87 |
-
def __reduce__(self):
|
88 |
-
return FrozenDict, (self.unfreeze(),)
|
89 |
-
|
90 |
-
def pretty_repr(self, num_spaces=4):
|
91 |
-
"""Returns an indented representation of the nested dictionary."""
|
92 |
-
def pretty_dict(x):
|
93 |
-
if not isinstance(x, dict):
|
94 |
-
return repr(x)
|
95 |
-
rep = ''
|
96 |
-
for key, val in x.items():
|
97 |
-
rep += f'{key}: {pretty_dict(val)},\n'
|
98 |
-
if rep:
|
99 |
-
return '{\n' + _indent(rep, num_spaces) + '}'
|
100 |
-
else:
|
101 |
-
return '{}'
|
102 |
-
return f'FrozenDict({pretty_dict(self._dict)})'
|
103 |
-
|
104 |
-
def __hash__(self):
|
105 |
-
if self._hash is None:
|
106 |
-
h = 0
|
107 |
-
for key, value in self.items():
|
108 |
-
h ^= hash((key, value))
|
109 |
-
self._hash = h
|
110 |
-
return self._hash
|
111 |
-
|
112 |
-
def copy(self, add_or_replace: Mapping[K, V]) -> 'FrozenDict[K, V]':
|
113 |
-
"""Create a new FrozenDict with additional or replaced entries."""
|
114 |
-
return type(self)({**self, **unfreeze(add_or_replace)}) # type: ignore[arg-type]
|
115 |
-
|
116 |
-
def keys(self):
|
117 |
-
return FrozenKeysView(self)
|
118 |
-
|
119 |
-
def values(self):
|
120 |
-
return FrozenValuesView(self)
|
121 |
-
|
122 |
-
def items(self):
|
123 |
-
for key in self._dict:
|
124 |
-
yield (key, self[key])
|
125 |
-
|
126 |
-
def pop(self, key: K) -> Tuple['FrozenDict[K, V]', V]:
|
127 |
-
"""Create a new FrozenDict where one entry is removed.
|
128 |
-
|
129 |
-
Example::
|
130 |
-
|
131 |
-
state, params = variables.pop('params')
|
132 |
-
|
133 |
-
Args:
|
134 |
-
key: the key to remove from the dict
|
135 |
-
Returns:
|
136 |
-
A pair with the new FrozenDict and the removed value.
|
137 |
-
"""
|
138 |
-
value = self[key]
|
139 |
-
new_dict = dict(self._dict)
|
140 |
-
new_dict.pop(key)
|
141 |
-
new_self = type(self)(new_dict)
|
142 |
-
return new_self, value
|
143 |
-
|
144 |
-
def unfreeze(self) -> Dict[K, V]:
|
145 |
-
"""Unfreeze this FrozenDict.
|
146 |
-
|
147 |
-
Returns:
|
148 |
-
An unfrozen version of this FrozenDict instance.
|
149 |
-
"""
|
150 |
-
return unfreeze(self)
|
151 |
-
|
152 |
-
# TODO(ivyzheng): remove this after JAX 0.4.6 release.
|
153 |
-
def tree_flatten(self) -> Tuple[Tuple[Any, ...], Hashable]:
|
154 |
-
"""Flattens this FrozenDict.
|
155 |
-
|
156 |
-
Returns:
|
157 |
-
A flattened version of this FrozenDict instance.
|
158 |
-
"""
|
159 |
-
sorted_keys = sorted(self._dict)
|
160 |
-
return tuple([self._dict[k] for k in sorted_keys]), tuple(sorted_keys)
|
161 |
-
|
162 |
-
@classmethod
|
163 |
-
def tree_unflatten(cls, keys, values):
|
164 |
-
# data is already deep copied due to tree map mechanism
|
165 |
-
# we can skip the deep copy in the constructor
|
166 |
-
return cls({k: v for k, v in zip(keys, values)}, __unsafe_skip_copy__=True)
|
167 |
-
|
168 |
-
|
169 |
-
#jax.tree_util.register_keypaths(
|
170 |
-
# FrozenDict, lambda fd: tuple(jax.tree_util.DictKey(k) for k in sorted(fd))
|
171 |
-
#)
|
172 |
-
|
173 |
-
|
174 |
-
def _prepare_freeze(xs: Any) -> Any:
|
175 |
-
"""Deep copy unfrozen dicts to make the dictionary FrozenDict safe."""
|
176 |
-
if isinstance(xs, FrozenDict):
|
177 |
-
# we can safely ref share the internal state of a FrozenDict
|
178 |
-
# because it is immutable.
|
179 |
-
return xs._dict # pylint: disable=protected-access
|
180 |
-
if not isinstance(xs, dict):
|
181 |
-
# return a leaf as is.
|
182 |
-
return xs
|
183 |
-
# recursively copy dictionary to avoid ref sharing
|
184 |
-
return {key: _prepare_freeze(val) for key, val in xs.items()}
|
185 |
-
|
186 |
-
|
187 |
-
def freeze(xs: Mapping[Any, Any]) -> FrozenDict[Any, Any]:
|
188 |
-
"""Freeze a nested dict.
|
189 |
-
|
190 |
-
Makes a nested `dict` immutable by transforming it into `FrozenDict`.
|
191 |
-
|
192 |
-
Args:
|
193 |
-
xs: Dictionary to freeze (a regualr Python dict).
|
194 |
-
Returns:
|
195 |
-
The frozen dictionary.
|
196 |
-
"""
|
197 |
-
return FrozenDict(xs)
|
198 |
-
|
199 |
-
|
200 |
-
def unfreeze(x: Union[FrozenDict, Dict[str, Any]]) -> Dict[Any, Any]:
|
201 |
-
"""Unfreeze a FrozenDict.
|
202 |
-
|
203 |
-
Makes a mutable copy of a `FrozenDict` mutable by transforming
|
204 |
-
it into (nested) dict.
|
205 |
-
|
206 |
-
Args:
|
207 |
-
x: Frozen dictionary to unfreeze.
|
208 |
-
Returns:
|
209 |
-
The unfrozen dictionary (a regular Python dict).
|
210 |
-
"""
|
211 |
-
if isinstance(x, FrozenDict):
|
212 |
-
# deep copy internal state of a FrozenDict
|
213 |
-
# the dict branch would also work here but
|
214 |
-
# it is much less performant because jax.tree_util.tree_map
|
215 |
-
# uses an optimized C implementation.
|
216 |
-
return jax.tree_util.tree_map(lambda y: y, x._dict) # type: ignore
|
217 |
-
elif isinstance(x, dict):
|
218 |
-
ys = {}
|
219 |
-
for key, value in x.items():
|
220 |
-
ys[key] = unfreeze(value)
|
221 |
-
return ys
|
222 |
-
else:
|
223 |
-
return x
|
224 |
-
|
225 |
-
|
226 |
-
def copy(x: Union[FrozenDict, Dict[str, Any]], add_or_replace: Union[FrozenDict, Dict[str, Any]]) -> Union[FrozenDict, Dict[str, Any]]:
|
227 |
-
"""Create a new dict with additional and/or replaced entries. This is a utility
|
228 |
-
function that can act on either a FrozenDict or regular dict and mimics the
|
229 |
-
behavior of `FrozenDict.copy`.
|
230 |
-
|
231 |
-
Example::
|
232 |
-
|
233 |
-
new_variables = copy(variables, {'additional_entries': 1})
|
234 |
-
|
235 |
-
Args:
|
236 |
-
x: the dictionary to be copied and updated
|
237 |
-
add_or_replace: dictionary of key-value pairs to add or replace in the dict x
|
238 |
-
Returns:
|
239 |
-
A new dict with the additional and/or replaced entries.
|
240 |
-
"""
|
241 |
-
|
242 |
-
if isinstance(x, FrozenDict):
|
243 |
-
return x.copy(add_or_replace)
|
244 |
-
elif isinstance(x, dict):
|
245 |
-
new_dict = jax.tree_map(lambda x: x, x) # make a deep copy of dict x
|
246 |
-
new_dict.update(add_or_replace)
|
247 |
-
return new_dict
|
248 |
-
raise TypeError(f'Expected FrozenDict or dict, got {type(x)}')
|
249 |
-
|
250 |
-
|
251 |
-
def pop(x: Union[FrozenDict, Dict[str, Any]], key: str) -> Tuple[Union[FrozenDict, Dict[str, Any]], Any]:
|
252 |
-
"""Create a new dict where one entry is removed. This is a utility
|
253 |
-
function for regular dicts that mimics the behavior of `FrozenDict.pop`.
|
254 |
-
|
255 |
-
Example::
|
256 |
-
|
257 |
-
state, params = pop(variables, 'params')
|
258 |
-
|
259 |
-
Args:
|
260 |
-
x: the dictionary to remove the entry from
|
261 |
-
key: the key to remove from the dict
|
262 |
-
Returns:
|
263 |
-
A pair with the new dict and the removed value.
|
264 |
-
"""
|
265 |
-
|
266 |
-
if isinstance(x, FrozenDict):
|
267 |
-
return x.pop(key)
|
268 |
-
elif isinstance(x, dict):
|
269 |
-
new_dict = jax.tree_map(lambda x: x, x) # make a deep copy of dict x
|
270 |
-
value = new_dict.pop(key)
|
271 |
-
return new_dict, value
|
272 |
-
raise TypeError(f'Expected FrozenDict or dict, got {type(x)}')
|
273 |
-
|
274 |
-
|
275 |
-
def _frozen_dict_state_dict(xs):
|
276 |
-
return {key: serialization.to_state_dict(value) for key, value in xs.items()}
|
277 |
-
|
278 |
-
|
279 |
-
def _restore_frozen_dict(xs, states):
|
280 |
-
diff = set(map(str, xs.keys())).difference(states.keys())
|
281 |
-
if diff:
|
282 |
-
raise ValueError('The target dict keys and state dict keys do not match,'
|
283 |
-
f' target dict contains keys {diff} which are not present in state dict '
|
284 |
-
f'at path {serialization.current_path()}')
|
285 |
-
|
286 |
-
return FrozenDict(
|
287 |
-
{key: serialization.from_state_dict(value, states[key], name=key)
|
288 |
-
for key, value in xs.items()})
|
289 |
-
|
290 |
-
|
291 |
-
serialization.register_serialization_state(
|
292 |
-
FrozenDict,
|
293 |
-
_frozen_dict_state_dict,
|
294 |
-
_restore_frozen_dict)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|