1
0
Fork 0

fix(api): allow decimal CFG

This commit is contained in:
Sean Sube 2023-01-11 19:34:03 -06:00
parent e9553bc610
commit 2f3b5c06c7
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ def pipeline_from_request(pipeline: DiffusionPipeline):
if negative_prompt == '': if negative_prompt == '':
negative_prompt = None 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')) steps = get_and_clamp_int(request.args, 'steps', default_steps, config_params.get('steps').get('max'))
height = get_and_clamp_int( height = get_and_clamp_int(
request.args, 'height', default_height, config_params.get('height').get('max')) request.args, 'height', default_height, config_params.get('height').get('max'))