Skip to content

Commit

Permalink
fix(api): match ControlNet selection against model names
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Apr 15, 2023
1 parent 3196535 commit 8d47b71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/onnx_web/server/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion api/onnx_web/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 8d47b71

Please sign in to comment.