From e353c64e56a3c333c9f81d3604c7cb9c4a01a797 Mon Sep 17 00:00:00 2001 From: Dmitrii Tochilkin Date: Fri, 12 May 2023 16:36:30 +0000 Subject: [PATCH 1/2] avoid 'prefill' border when 'inpaint_border' is disabled --- src/stability_sdk/animation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stability_sdk/animation.py b/src/stability_sdk/animation.py index 5f183749..a3ee5e29 100644 --- a/src/stability_sdk/animation.py +++ b/src/stability_sdk/animation.py @@ -809,6 +809,9 @@ def setup_animation(self, resume): if args.border == 'wrap' and args.animation_mode != '2D': args.border = 'reflect' logger.warning(f"Border 'wrap' is only supported in 2D mode, switching to '{args.border}'.") + if args.border == 'prefill' and args.animation_mode in ('2D', '3D warp') and args.inpaint_border == False: + args.border = 'reflect' + logger.warning(f"Border 'prefill' is only supported when 'inpaint_border' is enabled, switching to '{args.border}'.") # validate clip guidance setting against selected model and sampler if args.clip_guidance.lower() != 'none': From 763bbce3ef21f4e4b65d3951bfc07e35034a3e6d Mon Sep 17 00:00:00 2001 From: kostarion Date: Fri, 12 May 2023 21:05:51 +0400 Subject: [PATCH 2/2] not inpaint_border --- src/stability_sdk/animation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stability_sdk/animation.py b/src/stability_sdk/animation.py index a3ee5e29..79b8ba0d 100644 --- a/src/stability_sdk/animation.py +++ b/src/stability_sdk/animation.py @@ -809,7 +809,7 @@ def setup_animation(self, resume): if args.border == 'wrap' and args.animation_mode != '2D': args.border = 'reflect' logger.warning(f"Border 'wrap' is only supported in 2D mode, switching to '{args.border}'.") - if args.border == 'prefill' and args.animation_mode in ('2D', '3D warp') and args.inpaint_border == False: + if args.border == 'prefill' and args.animation_mode in ('2D', '3D warp') and not args.inpaint_border: args.border = 'reflect' logger.warning(f"Border 'prefill' is only supported when 'inpaint_border' is enabled, switching to '{args.border}'.")