Skip to content
Closed
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
1 change: 1 addition & 0 deletions DeepLense_Diffusion_Hamees/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pathlib import Path
from torch.utils.data import Dataset

# Npy Dataset
class NpyDataset(Dataset):
def __init__(self, root_dir, transform=None):
"""
Expand Down
6 changes: 6 additions & 0 deletions DeepLense_Diffusion_Hamees/models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ def forward(self, x, c):
x = x + gate_mlp.unsqueeze(1) * self.mlp(modulate(self.norm2(x), shift_mlp, scale_mlp))
return x

#################################################################################
# Final Layer #
#################################################################################

class FinalLayer(nn.Module):
"""
Expand All @@ -240,6 +243,9 @@ def forward(self, x, c):
x = self.linear(x)
return x

#################################################################################
# Nano Diffusion Transformer #
#################################################################################

class NanoDiT(nn.Module):
"""
Expand Down