Spaces:
Running
on
Zero
Running
on
Zero
File size: 1,761 Bytes
178f950 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
import importlib
__attributes = {
'SparseStructure': 'sparse_structure',
'SparseFeat2Render': 'sparse_feat2render',
'SLat2Render':'structured_latent2render',
'Slat2RenderGeo':'structured_latent2render',
'SparseStructureLatent': 'sparse_structure_latent',
'TextConditionedSparseStructureLatent': 'sparse_structure_latent',
'ImageConditionedSparseStructureLatent': 'sparse_structure_latent',
'SLat': 'structured_latent',
'TextConditionedSLat': 'structured_latent',
'ImageConditionedSLat': 'structured_latent',
}
__submodules = []
__all__ = list(__attributes.keys()) + __submodules
def __getattr__(name):
if name not in globals():
if name in __attributes:
module_name = __attributes[name]
module = importlib.import_module(f".{module_name}", __name__)
globals()[name] = getattr(module, name)
elif name in __submodules:
module = importlib.import_module(f".{name}", __name__)
globals()[name] = module
else:
raise AttributeError(f"module {__name__} has no attribute {name}")
return globals()[name]
# For Pylance
if __name__ == '__main__':
from .sparse_structure import SparseStructure
from .sparse_feat2render import SparseFeat2Render
from .structured_latent2render import (
SLat2Render,
Slat2RenderGeo,
)
from .sparse_structure_latent import (
SparseStructureLatent,
TextConditionedSparseStructureLatent,
ImageConditionedSparseStructureLatent,
)
from .structured_latent import (
SLat,
TextConditionedSLat,
ImageConditionedSLat,
)
|