From f2c8ce6df30584ce6c6cf132929b69acf67910c7 Mon Sep 17 00:00:00 2001 From: Patrick Miles Date: Tue, 17 Mar 2026 16:08:49 -0700 Subject: [PATCH 1/2] fix unet bottleneck dim off by 1 error --- ScaFFold/cli.py | 1 - ScaFFold/utils/config_utils.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ScaFFold/cli.py b/ScaFFold/cli.py index 840a7e6..176f59c 100644 --- a/ScaFFold/cli.py +++ b/ScaFFold/cli.py @@ -195,7 +195,6 @@ def main(): combined_config["unet_layers"] = ( combined_config["problem_scale"] - combined_config["unet_bottleneck_dim"] - + 1 ) # Resolve paths to absolute, matching Config() behavior diff --git a/ScaFFold/utils/config_utils.py b/ScaFFold/utils/config_utils.py index 08cb481..fdd5618 100644 --- a/ScaFFold/utils/config_utils.py +++ b/ScaFFold/utils/config_utils.py @@ -45,7 +45,7 @@ def __init__(self, config_dict): ) self.problem_scale = math.floor(self.problem_scale) self.unet_bottleneck_dim = config_dict["unet_bottleneck_dim"] - self.unet_layers = self.problem_scale - self.unet_bottleneck_dim + 1 + self.unet_layers = self.problem_scale - self.unet_bottleneck_dim self.n_fracts_per_vol = config_dict["n_fracts_per_vol"] self.n_instances_used_per_fractal = config_dict["n_instances_used_per_fractal"] self.scale = 1 From 506024b18f84620d970d586ca1973b83c361e5ea Mon Sep 17 00:00:00 2001 From: Patrick Miles Date: Tue, 17 Mar 2026 16:12:53 -0700 Subject: [PATCH 2/2] ruff --- ScaFFold/cli.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ScaFFold/cli.py b/ScaFFold/cli.py index 176f59c..6ec5f1d 100644 --- a/ScaFFold/cli.py +++ b/ScaFFold/cli.py @@ -193,8 +193,7 @@ def main(): # Recalculate unet_layers to capture any CLI overrides combined_config["unet_layers"] = ( - combined_config["problem_scale"] - - combined_config["unet_bottleneck_dim"] + combined_config["problem_scale"] - combined_config["unet_bottleneck_dim"] ) # Resolve paths to absolute, matching Config() behavior