Skip to content

Commit

Permalink
fix(api): use same parameter name as GUI for negative prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 12, 2023
1 parent ef33301 commit dc33b7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/onnx_web/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ def pipeline_from_request(pipeline: DiffusionPipeline):

# image params
prompt = request.args.get('prompt', default_prompt)
negative_prompt = request.args.get('negative', None)
negative_prompt = request.args.get('negativePrompt', None)

if negative_prompt == '':
if negative_prompt is not None and negative_prompt.strip() == '':
negative_prompt = None

cfg = get_and_clamp_float(request.args, 'cfg', default_cfg, config_params.get('cfg').get('max'), 0)
Expand Down

0 comments on commit dc33b7c

Please sign in to comment.