mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-09 07:57:30 +08:00
use lanczos for mask too like upstream
This commit is contained in:
parent
f54c4fbb8b
commit
5b35c13510
@ -674,8 +674,8 @@ def _crop_image_with_mask(item_image, item_mask, max_image_size=1024, pad_factor
|
||||
if max(H, W) > max_image_size:
|
||||
scale = max_image_size / max(H, W)
|
||||
new_w, new_h = int(W * scale), int(H * scale)
|
||||
img = comfy.utils.common_upscale(img, new_w, new_h, "lanczos", "disabled")
|
||||
mask = comfy.utils.common_upscale(mask, new_w, new_h, "nearest-exact", "disabled")
|
||||
img = comfy.utils.common_upscale(img, new_w, new_h, "lanczos", "disabled")
|
||||
mask = comfy.utils.common_upscale(mask, new_w, new_h, "lanczos", "disabled")
|
||||
H, W = new_h, new_w
|
||||
scene_size = (W, H)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user