Skip to content

Commit

Permalink
fix(api): use img2img pipeline for loopback when controlnet was origi…
Browse files Browse the repository at this point in the history
…nally selected
  • Loading branch information
ssube committed Apr 29, 2023
1 parent 47c7f5d commit 93b0226
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/onnx_web/diffusers/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ def run_loopback(

# load img2img pipeline once
pipe_type = params.get_valid_pipeline("img2img")
if pipe_type == "controlnet":
logger.debug("controlnet pipeline cannot be used for loopback, switching to img2img")
pipe_type = "img2img"

logger.debug("using %s pipeline for loopback", pipe_type)

pipe = pipeline or load_pipeline(
Expand Down

0 comments on commit 93b0226

Please sign in to comment.