fix(api): rename to avoid shadowing type
This commit is contained in:
parent
07fa81a66b
commit
48f42e56fe
|
@ -148,9 +148,9 @@ def json_with_cors(data, origin='*'):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
def make_output_path(type: str, seed: int, params: Tuple[Union[str, int, float]]):
|
def make_output_path(mode: str, seed: int, params: Tuple[Union[str, int, float]]):
|
||||||
sha = sha256()
|
sha = sha256()
|
||||||
sha.update(type.encode('utf-8'))
|
sha.update(mode.encode('utf-8'))
|
||||||
for param in params:
|
for param in params:
|
||||||
if isinstance(param, str):
|
if isinstance(param, str):
|
||||||
sha.update(param.encode('utf-8'))
|
sha.update(param.encode('utf-8'))
|
||||||
|
@ -161,7 +161,7 @@ def make_output_path(type: str, seed: int, params: Tuple[Union[str, int, float]]
|
||||||
else:
|
else:
|
||||||
print('cannot hash param: %s, %s' % (param, type(param)))
|
print('cannot hash param: %s, %s' % (param, type(param)))
|
||||||
|
|
||||||
output_file = '%s_%s_%s.png' % (type, seed, sha.hexdigest())
|
output_file = '%s_%s_%s.png' % (mode, seed, sha.hexdigest())
|
||||||
output_full = safer_join(output_path, output_file)
|
output_full = safer_join(output_path, output_file)
|
||||||
|
|
||||||
return (output_file, output_full)
|
return (output_file, output_full)
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
"numpy",
|
"numpy",
|
||||||
"Onnx",
|
"Onnx",
|
||||||
"onnxruntime",
|
"onnxruntime",
|
||||||
|
"outpaint",
|
||||||
"pndm",
|
"pndm",
|
||||||
"pretrained",
|
"pretrained",
|
||||||
"protobuf",
|
"protobuf",
|
||||||
|
|
Loading…
Reference in New Issue