Upload iris/__init__.py
Browse files- iris/__init__.py +32 -0
iris/__init__.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
IRIS: Iterative Refinement Image Synthesizer
|
| 3 |
+
=============================================
|
| 4 |
+
|
| 5 |
+
A mobile-first image generation architecture that combines:
|
| 6 |
+
- PDE-SSM spatial mixing (O(N log N), native 2D, no scanning)
|
| 7 |
+
- Weight-shared iterative refinement (6 blocks × R iterations)
|
| 8 |
+
- Structured latent canvas (DC-AE with coarse-to-fine channels)
|
| 9 |
+
- Tiny PixelShuffle decoder (0.1M params)
|
| 10 |
+
- Multi-Query Attention + 2D RoPE
|
| 11 |
+
- Flow matching training with logit-normal timestep sampling
|
| 12 |
+
|
| 13 |
+
Usage:
|
| 14 |
+
from iris.model import IRIS
|
| 15 |
+
from iris.configs import get_model_config
|
| 16 |
+
from iris.flow_matching import flow_matching_loss, euler_sample
|
| 17 |
+
|
| 18 |
+
model = IRIS(**get_model_config("iris-small"))
|
| 19 |
+
|
| 20 |
+
# Training
|
| 21 |
+
losses = flow_matching_loss(model, latents, text_embeddings)
|
| 22 |
+
|
| 23 |
+
# Sampling
|
| 24 |
+
images = euler_sample(model, noise, text_embeddings, num_steps=20)
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
from .model import IRIS
|
| 28 |
+
from .configs import get_model_config, CONFIGS
|
| 29 |
+
from .flow_matching import flow_matching_loss, euler_sample
|
| 30 |
+
|
| 31 |
+
__version__ = "0.1.0"
|
| 32 |
+
__all__ = ["IRIS", "get_model_config", "CONFIGS", "flow_matching_loss", "euler_sample"]
|