Skip to content

Commit

Permalink
fix(api): allow decimal CFG
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 12, 2023
1 parent e9553bc commit 2f3b5c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/onnx_web/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def pipeline_from_request(pipeline: DiffusionPipeline):
if negative_prompt == '':
negative_prompt = None

cfg = get_and_clamp_int(request.args, 'cfg', default_cfg, config_params.get('cfg').get('max'), 0)
cfg = get_and_clamp_float(request.args, 'cfg', default_cfg, config_params.get('cfg').get('max'), 0)
steps = get_and_clamp_int(request.args, 'steps', default_steps, config_params.get('steps').get('max'))
height = get_and_clamp_int(
request.args, 'height', default_height, config_params.get('height').get('max'))
Expand Down

0 comments on commit 2f3b5c0

Please sign in to comment.