Skip to content

Commit

Permalink
fix(api): remove unintentional tuple in img2img pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jul 5, 2023
1 parent c0dd4e9 commit fed4315
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/onnx_web/diffusers/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def run_img2img_pipeline(

# run and append the filtered source
progress = job.get_progress_callback()
images = chain(job, server, params, [source], callback=progress),
images = chain(job, server, params, [source], callback=progress)

if source_filter is not None and source_filter != "none":
images.append(source)
Expand Down
8 changes: 6 additions & 2 deletions api/onnx_web/diffusers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,17 @@ def parse_prompt(
params: ImageParams,
use_input: bool = False,
) -> Tuple[List[Tuple[str, str]], List[Tuple[str, float]], List[Tuple[str, float]]]:
prompt, loras = get_loras_from_prompt(params.input_prompt if use_input else params.prompt)
prompt, loras = get_loras_from_prompt(
params.input_prompt if use_input else params.prompt
)
prompt, inversions = get_inversions_from_prompt(prompt)
params.prompt = prompt

neg_prompt = None
if params.input_negative_prompt is not None:
neg_prompt, neg_loras = get_loras_from_prompt(params.input_negative_prompt if use_input else params.negative_prompt)
neg_prompt, neg_loras = get_loras_from_prompt(
params.input_negative_prompt if use_input else params.negative_prompt
)
neg_prompt, neg_inversions = get_inversions_from_prompt(neg_prompt)
params.negative_prompt = neg_prompt

Expand Down

0 comments on commit fed4315

Please sign in to comment.