1
0
Fork 0

fix(api): omit negative prompt from pipeline

This commit is contained in:
Sean Sube 2023-01-10 20:46:36 -06:00
parent 48f42e56fe
commit 9bb01cc01d
1 changed files with 3 additions and 0 deletions

View File

@ -254,6 +254,9 @@ def pipeline_from_request(pipeline: DiffusionPipeline):
prompt = request.args.get('prompt', default_prompt) prompt = request.args.get('prompt', default_prompt)
negative_prompt = request.args.get('negative', None) negative_prompt = request.args.get('negative', None)
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_int(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(