Skip to content

Commit

Permalink
Fix upscale script checking (#2881)
Browse files Browse the repository at this point in the history
  • Loading branch information
seancheung authored May 11, 2024
1 parent 04024b4 commit 3b4eedd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ def try_crop_image_with_a1111_mask(
# based on `extra_generation_params` these scripts attach on `p`, and subject to change
# in the future.
# TODO: Change this to a more robust condition once A1111 offers a way to verify script name.
is_upscale_script = any("upscale" in k.lower() for k in getattr(p, "extra_generation_params", {}).keys())
is_upscale_script = any("upscale" in k.lower() and "Hires" not in k for k in getattr(p, "extra_generation_params", {}).keys())
logger.debug(f"is_upscale_script={is_upscale_script}")
# Note: `inpaint_full_res` is "inpaint area" on UI. The flag is `True` when "Only masked"
# option is selected.
Expand Down

0 comments on commit 3b4eedd

Please sign in to comment.