Skip to content

auto updates #7903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions monai/apps/generation/maisi/networks/autoencoderkl_maisi.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@
AutoencoderKL, has_autoencoderkl = optional_import("generative.networks.nets.autoencoderkl", name="AutoencoderKL")
ResBlock, has_resblock = optional_import("generative.networks.nets.autoencoderkl", name="ResBlock")


if TYPE_CHECKING:
from generative.networks.nets.autoencoderkl import AutoencoderKL as AutoencoderKLType
else:
AutoencoderKLType = cast(type, AutoencoderKL)


# Set up logging configuration
logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_autoencoderkl_maisi.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")


CASES_NO_ATTENTION = [
[
{
Expand Down Expand Up @@ -82,6 +81,7 @@

@unittest.skipUnless(has_generative, "monai-generative required")
class TestAutoencoderKlMaisi(unittest.TestCase):

@parameterized.expand(CASES)
def test_shape(self, input_param, input_shape, expected_shape, expected_latent_shape):
net = AutoencoderKlMaisi(**input_param).to(device)
Expand Down
1 change: 1 addition & 0 deletions tests/test_controlnet_maisi.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
@SkipIfBeforePyTorchVersion((2, 0))
@skipUnless(has_generative, "monai-generative required")
class TestControlNet(unittest.TestCase):

@parameterized.expand(TEST_CASES)
def test_shape_unconditioned_models(self, input_param, expected_num_down_blocks_residuals, expected_shape):
net = ControlNetMaisi(**input_param)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_diffusion_model_unet_maisi.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
if has_generative:
from monai.apps.generation.maisi.networks.diffusion_model_unet_maisi import DiffusionModelUNetMaisi


UNCOND_CASES_2D = [
[
{
Expand Down Expand Up @@ -294,6 +293,7 @@

@skipUnless(has_generative, "monai-generative required")
class TestDiffusionModelUNetMaisi2D(unittest.TestCase):

@parameterized.expand(UNCOND_CASES_2D)
@skipUnless(has_einops, "Requires einops")
def test_shape_unconditioned_models(self, input_param):
Expand Down Expand Up @@ -512,6 +512,7 @@ def test_shape_with_additional_inputs(self, input_param):

@skipUnless(has_generative, "monai-generative required")
class TestDiffusionModelUNetMaisi3D(unittest.TestCase):

@parameterized.expand(UNCOND_CASES_3D)
@skipUnless(has_einops, "Requires einops")
def test_shape_unconditioned_models(self, input_param):
Expand Down
Loading