Skip to content
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

[diffusion_labs] Move attention and res blocks under modules #490

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions tests/diffusion_labs/test_adm.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
from tests.test_utils import assert_expected, set_rng_seed
from torch import nn
from torchmultimodal.diffusion_labs.models.adm_unet.adm import ADMStack, ADMUNet
from torchmultimodal.diffusion_labs.models.adm_unet.attention_block import (
from torchmultimodal.diffusion_labs.modules.layers.attention_block import (
ADMAttentionBlock,
)
from torchmultimodal.diffusion_labs.models.adm_unet.res_block import ADMResBlock
from torchmultimodal.diffusion_labs.modules.layers.res_block import ADMResBlock


@pytest.fixture(autouse=True)
Expand Down
4 changes: 2 additions & 2 deletions tests/diffusion_labs/test_adm_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

import torch
from tests.test_utils import assert_expected, set_rng_seed
from torchmultimodal.diffusion_labs.models.adm_unet.attention_block import (
from torchmultimodal.diffusion_labs.modules.layers.attention_block import (
ADMAttentionBlock,
)
from torchmultimodal.diffusion_labs.models.adm_unet.res_block import (
from torchmultimodal.diffusion_labs.modules.layers.res_block import (
adm_res_block,
adm_res_downsample_block,
adm_res_upsample_block,
Expand Down
2 changes: 1 addition & 1 deletion tests/diffusion_labs/test_adm_crossattention.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import torch
from tests.test_utils import assert_expected, set_rng_seed
from torchmultimodal.diffusion_labs.models.adm_unet.attention_block import (
from torchmultimodal.diffusion_labs.modules.layers.attention_block import (
adm_attention,
ADMCrossAttention,
)
Expand Down
6 changes: 2 additions & 4 deletions torchmultimodal/diffusion_labs/models/adm_unet/adm.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@

import torch
from torch import nn, Tensor
from torchmultimodal.diffusion_labs.models.adm_unet.attention_block import (
adm_attn_block,
)
from torchmultimodal.diffusion_labs.models.adm_unet.res_block import (
from torchmultimodal.diffusion_labs.modules.layers.attention_block import adm_attn_block
from torchmultimodal.diffusion_labs.modules.layers.res_block import (
adm_res_block,
adm_res_downsample_block,
adm_res_upsample_block,
Expand Down
Loading