1
0
Fork 0

fix(api): rename to avoid shadowing type

This commit is contained in:
Sean Sube 2023-01-10 20:46:17 -06:00
parent 07fa81a66b
commit 48f42e56fe
2 changed files with 4 additions and 3 deletions

View File

@ -148,9 +148,9 @@ def json_with_cors(data, origin='*'):
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.update(type.encode('utf-8'))
sha.update(mode.encode('utf-8'))
for param in params:
if isinstance(param, str):
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:
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)
return (output_file, output_full)

View File

@ -30,6 +30,7 @@
"numpy",
"Onnx",
"onnxruntime",
"outpaint",
"pndm",
"pretrained",
"protobuf",