enable Compel parsing for SDXL
This commit is contained in:
parent
504c1ce084
commit
fd05533505
|
@ -664,13 +664,15 @@ def patch_pipeline(
|
||||||
) -> None:
|
) -> None:
|
||||||
logger.debug("patching SD pipeline")
|
logger.debug("patching SD pipeline")
|
||||||
|
|
||||||
if not params.is_lpw() and not params.is_xl():
|
|
||||||
if server.has_feature("compel-prompts"):
|
if server.has_feature("compel-prompts"):
|
||||||
logger.debug("patching prompt encoder with Compel")
|
logger.debug("patching prompt encoder with Compel")
|
||||||
pipe._encode_prompt = expand_prompt_compel.__get__(pipe, pipeline)
|
pipe._encode_prompt = expand_prompt_compel.__get__(pipe, pipeline)
|
||||||
else:
|
else:
|
||||||
|
if not params.is_lpw() and not params.is_xl():
|
||||||
logger.debug("patching prompt encoder with ONNX legacy method")
|
logger.debug("patching prompt encoder with ONNX legacy method")
|
||||||
pipe._encode_prompt = expand_prompt_onnx_legacy.__get__(pipe, pipeline)
|
pipe._encode_prompt = expand_prompt_onnx_legacy.__get__(pipe, pipeline)
|
||||||
|
else:
|
||||||
|
logger.warning("no prompt encoder patch available")
|
||||||
|
|
||||||
# the pipeline requested in params may not be the one currently being used, especially during the later img2img
|
# the pipeline requested in params may not be the one currently being used, especially during the later img2img
|
||||||
# stages of a highres pipeline, so we need to check the pipeline type
|
# stages of a highres pipeline, so we need to check the pipeline type
|
||||||
|
|
Loading…
Reference in New Issue