diff --git a/mmedit/models/editors/ddpm/denoising_unet.py b/mmedit/models/editors/ddpm/denoising_unet.py index 461758c178..872783e3d5 100644 --- a/mmedit/models/editors/ddpm/denoising_unet.py +++ b/mmedit/models/editors/ddpm/denoising_unet.py @@ -1117,7 +1117,7 @@ def __init__(self, mmengine.print_log('\'SiLU\' is not supported for ' f'torch < 1.6.0, found \'{torch.version}\'.' 'Use ReLu instead but result maybe wrong') - self.conv_act == nn.ReLU() + self.conv_act = nn.ReLU() self.conv_out = nn.Conv2d( block_out_channels[0], self.out_channels, diff --git a/tests/test_models/test_editors/test_stable_diffusion/test_stable_diffusion.py b/tests/test_models/test_editors/test_stable_diffusion/test_stable_diffusion.py index fb2fe3352d..f84f58a7ee 100644 --- a/tests/test_models/test_editors/test_stable_diffusion/test_stable_diffusion.py +++ b/tests/test_models/test_editors/test_stable_diffusion/test_stable_diffusion.py @@ -1,6 +1,5 @@ # Copyright (c) OpenMMLab. All rights reserved. import platform -import sys import pytest import torch @@ -102,8 +101,6 @@ def __call__(self, x, attention_mask): @pytest.mark.skipif( 'win' in platform.system().lower(), reason='skip on windows due to limited RAM.') -@pytest.mark.skipif( - sys.version_info < (3, 8), reason='skip because python version is old.') def test_stable_diffusion(): StableDiffuser = MODELS.build(Config(model)) StableDiffuser.tokenizer = dummy_tokenizer()