Skip to content

Commit

Permalink
Revert "Minimize re-exports from __init__ files (#44)"
Browse files Browse the repository at this point in the history
This reverts commit 57862fb.
  • Loading branch information
timudk authored Jul 25, 2023
1 parent 57862fb commit 98079c2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions sgm/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
from .data import StableDataModuleFromConfig
from .models import AutoencodingEngine, DiffusionEngine
from .util import instantiate_from_config, get_configs_path

__version__ = "0.0.1"
1 change: 1 addition & 0 deletions sgm/data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .dataset import StableDataModuleFromConfig
2 changes: 2 additions & 0 deletions sgm/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .autoencoder import AutoencodingEngine
from .diffusion import DiffusionEngine
7 changes: 0 additions & 7 deletions sgm/modules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
from .encoders.modules import GeneralConditioner

__all__ = [
# `sgm.models.GeneralConditioner` is referenced in model configurations, etc.,
# so it must be re-exported from this module.
"GeneralConditioner",
"UNCONDITIONAL_CONFIG",
]

UNCONDITIONAL_CONFIG = {
"target": "sgm.modules.GeneralConditioner",
"params": {"emb_models": []},
Expand Down
7 changes: 7 additions & 0 deletions sgm/modules/diffusionmodules/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .denoiser import Denoiser
from .discretizer import Discretization
from .loss import StandardDiffusionLoss
from .model import Model, Encoder, Decoder
from .openaimodel import UNetModel
from .sampling import BaseDiffusionSampler
from .wrappers import OpenAIWrapper

0 comments on commit 98079c2

Please sign in to comment.