Skip to content

Commit

Permalink
[Fix] fix sd torch16 ut (#1616)
Browse files Browse the repository at this point in the history
* remove sd test head

* add conv_act

* fix typo.

* remove unused code
  • Loading branch information
liuwenran authored Jan 30, 2023
1 parent 6809e45 commit f0c0eec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion mmedit/models/editors/ddpm/denoising_unet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Copyright (c) OpenMMLab. All rights reserved.
import platform
import sys

import pytest
import torch
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit f0c0eec

Please sign in to comment.