1
0
Fork 0

fix(api): match ControlNet selection against model names

This commit is contained in:
Sean Sube 2023-04-15 17:21:13 -05:00
parent 31965356d8
commit 8d47b71183
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ def pipeline_from_request(
# diffusion model
model = get_not_empty(request.args, "model", get_config_value("model"))
model_path = get_model_path(server, model)
control = get_from_list(request.args, "control", get_network_models())
control = get_from_list(request.args, "control", [m.name for m in get_network_models()])
# pipeline stuff
pipeline = get_from_list(

View File

@ -45,7 +45,7 @@ def get_from_list(
if selected in values:
return selected
logger.warn("invalid selection: %s", selected)
logger.warn("invalid selection %s, options: %s", selected, values)
if len(values) > 0:
return values[0]