Text-to-Image
Diffusers
Safetensors
flow-matching
pyramidal-unet
256x256
ettin-150m
from-scratch
ra
udit
Instructions to use AiArtLab/Ra with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AiArtLab/Ra 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/Ra", 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/Ra: direct link, hf CLI and curl.
- Browser
- Download file 3.6 kB
-
https://huggingface.co/AiArtLab/Ra/resolve/main/transformer/config.json
- Command line
-
hf download hf://AiArtLab/Ra/transformer/config.json
-
curl -L -o config.json https://huggingface.co/AiArtLab/Ra/resolve/main/transformer/config.json
3.6 kB
| { | |
| "_class_name": "UDiT", | |
| "name": "Ra", | |
| "format": "udm/v1", | |
| "step": 212000, | |
| "latent": { | |
| "channels": 32, | |
| "spatial_factor": 8, | |
| "mean": [ | |
| -4.137261, | |
| 2.725146, | |
| -1.435803, | |
| -2.187023, | |
| -4.161275, | |
| -1.58918, | |
| -2.527523, | |
| 3.002302, | |
| 2.793705, | |
| -2.091501, | |
| -2.632896, | |
| -3.59589, | |
| -3.069669, | |
| -4.568713, | |
| 3.26668, | |
| -0.897648, | |
| 2.072541, | |
| 5.451158, | |
| 1.747871, | |
| -2.113284, | |
| 2.03444, | |
| -1.379274, | |
| 0.66369, | |
| 2.712183, | |
| -0.111181, | |
| 6.054838, | |
| 1.235881, | |
| -2.02777, | |
| 3.663243, | |
| -2.454632, | |
| 1.141335, | |
| 1.786136 | |
| ], | |
| "std": [ | |
| 1.030738, | |
| 0.951682, | |
| 1.079687, | |
| 0.957871, | |
| 1.198266, | |
| 1.102266, | |
| 1.213605, | |
| 0.947544, | |
| 1.085991, | |
| 1.093223, | |
| 0.9027, | |
| 1.010205, | |
| 0.920466, | |
| 1.044107, | |
| 1.023179, | |
| 0.992978, | |
| 0.991627, | |
| 1.073585, | |
| 1.114629, | |
| 1.056403, | |
| 1.093012, | |
| 1.015109, | |
| 1.007069, | |
| 0.976026, | |
| 0.982324, | |
| 1.093805, | |
| 1.036086, | |
| 1.005727, | |
| 1.104078, | |
| 1.042298, | |
| 1.095522, | |
| 0.960255 | |
| ], | |
| "source": "vae/ (Muinez/f8c32-ae)" | |
| }, | |
| "text": { | |
| "encoder": "text_encoder/ (jhu-clsp/ettin-encoder-150m, 768-dim, 22 слоя)", | |
| "max_len": 192, | |
| "slices": [ | |
| 2, | |
| 5, | |
| 8, | |
| 11, | |
| 14, | |
| 17, | |
| 20 | |
| ], | |
| "slice_blocks": 2, | |
| "trainable": "text_mixer.*" | |
| }, | |
| "body": { | |
| "kind": "пирамидальный U: ширина растёт к низу", | |
| "levels": [ | |
| { | |
| "level": 0, | |
| "tokens": "÷1", | |
| "width": 192, | |
| "blocks": "conv 6 enc / 4 dec + 1 self-attn на сторону", | |
| "text": "кросс-внимание в каждом conv-блоке и в self-attn" | |
| }, | |
| { | |
| "level": 1, | |
| "tokens": "÷2", | |
| "width": 512, | |
| "blocks": "attn 4 enc / 3 dec", | |
| "text": "кросс-внимание" | |
| }, | |
| { | |
| "level": 2, | |
| "tokens": "÷4", | |
| "width": 1024, | |
| "blocks": "attn 3 enc / 2 dec", | |
| "text": "кросс-внимание" | |
| }, | |
| { | |
| "level": 3, | |
| "tokens": "÷8", | |
| "width": 1536, | |
| "blocks": "attn 2 (боттлнек)", | |
| "text": "кросс-внимание" | |
| } | |
| ], | |
| "skips": "аддитивные (SD-стиль): e0/e1/e2 прибавляются в декодере", | |
| "down": "mean-pool 2× + Linear", | |
| "up": "Linear + nearest 2×", | |
| "rope": "2D RoPE, base 100, фаза в латентных пикселях на каждом уровне", | |
| "parametrization": "x0 латента" | |
| }, | |
| "tail": { | |
| "source": "декодер AE, 6 блоков @512, PixelShuffle ×3", | |
| "trained_as": "flow по пикселям, условие z0 + (ошибка тела).detach()", | |
| "sample_steps": 4 | |
| }, | |
| "params": { | |
| "body": 143.33, | |
| "text_mixer": 10.04, | |
| "tail": 23.87, | |
| "total": 177.24 | |
| }, | |
| "training": { | |
| "dataset": "LucasFang/FLUX-Reason-6M", | |
| "parts": "Aesthetics-Part01,Aesthetics-Part02,Imaginative,Text", | |
| "size": 256, | |
| "steps": 212000, | |
| "batch": 16, | |
| "accum": 1, | |
| "lr": 0.0001, | |
| "lr_tail": 3e-05, | |
| "drop_text": 0.1, | |
| "init": "tmp/flux2/ckpt/step_0192000.pt", | |
| "metrics": "FLUX-Reason Part01 on top of the 20k butterfly run; continued on Parts 01+02+Imaginative+Text from step 192000, mse_lat 0.244 (ema 0.245), low 0.026, high 0.57, mse_pix 0.019" | |
| }, | |
| "storage_dtype": "float16" | |
| } |