Upload luminars/config.py
Browse files- luminars/config.py +29 -0
luminars/config.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Configuration dataclass for LuminaRS."""
|
| 2 |
+
from dataclasses import dataclass
|
| 3 |
+
|
| 4 |
+
@dataclass
|
| 5 |
+
class LuminaRSConfig:
|
| 6 |
+
# Core dims
|
| 7 |
+
latent_dim: int = 16 # SD-compatible VAE latent dim
|
| 8 |
+
latent_h: int = 32 # 32x32 latent = 1024x1024 px
|
| 9 |
+
latent_w: int = 32
|
| 10 |
+
# SSM Core
|
| 11 |
+
d_model: int = 256 # main hidden dim
|
| 12 |
+
d_state: int = 64 # mamba S4D hidden state
|
| 13 |
+
d_conv: int = 4 # local convolution width
|
| 14 |
+
expand: int = 2 # expansion factor in SSM
|
| 15 |
+
n_layers: int = 8 # SSM-repeat stack
|
| 16 |
+
drop_path: float = 0.0 # stochastic depth
|
| 17 |
+
# Semantic (text) encoder
|
| 18 |
+
text_embed_dim: int = 768 # CLIP-T hidden dim
|
| 19 |
+
max_text_len: int = 77
|
| 20 |
+
prompt_embed_dim: int = 256 # compressed prompt plan
|
| 21 |
+
# Style/Mood/Philosophy modules
|
| 22 |
+
style_dim: int = 128
|
| 23 |
+
mood_dim: int = 64
|
| 24 |
+
philosophy_dim: int = 64
|
| 25 |
+
# Flow head
|
| 26 |
+
n_flow_steps: int = 10 # ODE solver steps at inference
|
| 27 |
+
# Training
|
| 28 |
+
vae_pretrained: str = "madebyollin/sdxl-vae-fp16-fix" # 31M param VAE
|
| 29 |
+
clip_pretrained: str = "openai/clip-vit-large-patch14"
|