Text-to-Image
Diffusers
Safetensors
flow-matching
pyramidal-unet
latent-diffusion
asym-vae
from-scratch
ra
udit
Instructions to use AiArtLab/ra2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AiArtLab/ra2 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("AiArtLab/ra2", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Download transformer/config.json from AiArtLab/ra2: direct link, hf CLI and curl.
- Browser
- Download file 1.73 kB
-
https://huggingface.co/AiArtLab/ra2/resolve/main/transformer/config.json
- Command line
-
hf download hf://AiArtLab/ra2/transformer/config.json
-
curl -L -o config.json https://huggingface.co/AiArtLab/ra2/resolve/main/transformer/config.json
1.73 kB
| { | |
| "_class_name": "UDiT", | |
| "format": "udm/v1", | |
| "storage_dtype": "float16", | |
| "latent_channels": 32, | |
| "text_dim": 768, | |
| "body": { | |
| "kind": "пирамидальный U: ширина растёт к низу", | |
| "widths": [ | |
| 192, | |
| 512, | |
| 1024, | |
| 1536 | |
| ], | |
| "heads": [ | |
| 6, | |
| 8, | |
| 8, | |
| 8 | |
| ], | |
| "blocks": { | |
| "e0": 6, | |
| "e0x": 3, | |
| "d0x": 3, | |
| "e1": 5, | |
| "e2": 5, | |
| "e3": 4, | |
| "d2": 4, | |
| "d1": 4, | |
| "d0": 4 | |
| }, | |
| "levels": [ | |
| { | |
| "level": 0, | |
| "tokens": "÷1", | |
| "width": 192, | |
| "blocks": "conv 6 enc / 4 dec + 2 self-attn на сторону" | |
| }, | |
| { | |
| "level": 1, | |
| "tokens": "÷2", | |
| "width": 512, | |
| "blocks": "attn 5 enc / 4 dec" | |
| }, | |
| { | |
| "level": 2, | |
| "tokens": "÷4", | |
| "width": 1024, | |
| "blocks": "attn 5 enc / 4 dec" | |
| }, | |
| { | |
| "level": 3, | |
| "tokens": "÷8", | |
| "width": 1536, | |
| "blocks": "attn 4 (боттлнек)" | |
| } | |
| ], | |
| "skips": "аддитивные (SD-стиль): e0/e1/e2 прибавляются в декодере", | |
| "down": "mean-pool 2x + Linear", | |
| "up": "Linear + nearest 2x", | |
| "positions": { | |
| "rope": { | |
| "kind": "2d", | |
| "base": 100, | |
| "phase": "в латентных пикселях на каждом уровне" | |
| }, | |
| "absolute": { | |
| "kind": "2d sincos", | |
| "dim": 64, | |
| "into": "zero-init Linear(64 -> width) к выходу stem, в паре с RoPE" | |
| } | |
| }, | |
| "text": "кросс-внимание на всех уровнях", | |
| "parametrization": "x0 латента", | |
| "params": 240.04 | |
| } | |
| } |