fix(api): match ControlNet selection against model names
This commit is contained in:
parent
31965356d8
commit
8d47b71183
|
@ -46,7 +46,7 @@ def pipeline_from_request(
|
||||||
# diffusion model
|
# diffusion model
|
||||||
model = get_not_empty(request.args, "model", get_config_value("model"))
|
model = get_not_empty(request.args, "model", get_config_value("model"))
|
||||||
model_path = get_model_path(server, 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 stuff
|
||||||
pipeline = get_from_list(
|
pipeline = get_from_list(
|
||||||
|
|
|
@ -45,7 +45,7 @@ def get_from_list(
|
||||||
if selected in values:
|
if selected in values:
|
||||||
return selected
|
return selected
|
||||||
|
|
||||||
logger.warn("invalid selection: %s", selected)
|
logger.warn("invalid selection %s, options: %s", selected, values)
|
||||||
if len(values) > 0:
|
if len(values) > 0:
|
||||||
return values[0]
|
return values[0]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue