Skip to content

Commit

Permalink
fix(api): make sure ControlNet constructor is used for same pipeline (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Dec 31, 2023
1 parent b7f2313 commit 00db9a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/onnx_web/diffusers/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def load_pipeline(
add_watermarker=False, # not so invisible: https://github.com/ssube/onnx-web/issues/438
)
else:
if "controlnet" in components:
if params.is_control():
logger.debug(
"assembling SD pipeline for %s with ControlNet",
pipeline_class.__name__,
Expand Down
2 changes: 1 addition & 1 deletion api/onnx_web/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def get_valid_pipeline(self, group: str, pipeline: Optional[str] = None) -> str:
return group

def is_control(self):
return self.pipeline == "controlnet"
return self.pipeline in ["controlnet", "controlnet-sdxl"]

def is_lpw(self):
return self.pipeline == "lpw"
Expand Down

0 comments on commit 00db9a2

Please sign in to comment.