Skip to content

Commit

Permalink
fix(api): keep ControlNet metadata after lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Apr 15, 2023
1 parent 8d47b71 commit 17e7b6a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/onnx_web/server/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ 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", [m.name for m in get_network_models()])

control = None
control_name = request.args.get("control")
for network in get_network_models():
if network.name == control_name:
control = network

# pipeline stuff
pipeline = get_from_list(
Expand Down

0 comments on commit 17e7b6a

Please sign in to comment.