From 608eafed87cae40ef3c598c72bab7d977225e65e Mon Sep 17 00:00:00 2001 From: blepping Date: Thu, 11 Sep 2025 02:59:12 -0600 Subject: [PATCH] Allow passing blend modes with arguments for scaling --- py/latent_utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/py/latent_utils.py b/py/latent_utils.py index ea97114..a75364d 100644 --- a/py/latent_utils.py +++ b/py/latent_utils.py @@ -1610,10 +1610,8 @@ def biderp(samples, width, height, mode="bislerp", mode_h=None): # noqa: PLR091 if mode_h is None: mode_h = mode - derp_w, derp_h = ( - BIDERP_MODES.get(mode, slerp_orig), - BIDERP_MODES.get(mode_h, slerp_orig), - ) + derp_w = (BIDERP_MODES if ":" not in mode else BLENDING_MODES).get(mode, slerp_orig) + derp_h = (BIDERP_MODES if ":" not in mode_h else BLENDING_MODES).get(mode_h, slerp_orig) def generate_bilinear_data(length_old, length_new, device): coords_1 = torch.arange(length_old, dtype=torch.float32, device=device).reshape(