Model reference · open weights
FWKV-Image is an open-weight image model from FWKV. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | FWKV |
|---|---|
| Type | Image models |
| Task | Text→image |
| Parameters (lead) | 192M |
| Runs with | diffusers |
| Released | 2026-07-25 |
| Popularity | 551 downloads / month |
| Licence | Open weights |
About
A ~40M‑parameter (trained) diffusion transformer for text‑to‑image generation that replaces standard self‑attention with a bidirectional per‑channel leaky integrator (FWKV) and is trained as a rectified‑flow velocity field over the latent space of a frozen VAE. It is a research experiment exploring how far linear‑RNN token mixing can go on visual generation tasks.
The model generates 256×256 images from text prompts encoded by a frozen CLIP ViT‑B/32 text encoder, using a DiT‑style patchify‑unpatchify pipeline with adaLN‑zero conditioning.
Architecture: 12 stacked FWKV‑DiT blocks at width 384, with 6 heads each. Each block replaces standard self‑attention with a bidirectional decayed accumulator:
stateₜ = W·stateₜ₋₁ + kₜ·vₜCross‑attention: Standard multi‑head cross‑attention to the 77 CLIP text token embeddings (512‑dim) is retained inside each block.
Conditioning: adaLN‑zero modulation derived from sinusoidal timestep embedding plus pooled CLIP text embedding.
Patchify: Latent 4×32×32 is split into 256 patches of 2×2, mapped to 384‑d tokens. Positional embeddings are learned.
Rectified flow: The model predicts a velocity field v(xₜ, t, text) that transports Gaussian noise x₀ to data x₁ along a straight line. Training minimizes MSE against the ground‑truth velocity x₁ − x₀.
Factorised design: 4‑channel VAE latent → 384‑dim patch tokens → 4× expansion MLP.
Context: 256 patch tokens (non‑causal, bidirectional). No image‑level positional embeddings beyond patch positions.
Text encoder: Frozen CLIP ViT‑B/32 (openai/clip-vit-base-patch32).
VAE: Frozen stabilityai/sd-vae-ft-mse (4×32×32 latents, scaling factor 0.18215).
src="https://hfviewer.com/api/card.svg?source=FWKV%2FFWKV-Image&granularity=auto&v=20260516-title-pills-card" alt="Architecture graph for FWKV/FWKV-Image. Open in hfviewer" width="100%" />
FWKV‑Image is intended for research on efficient diffusion transformers and for educational demonstrations of linear‑RNN architectures applied to visual generation. You can generate images from text prompts using the provided inference code.
The model relies on a custom architecture. To load it, you must provide the modeling_fwkv_vision.py file (found in the repository) and trust the remote code:
from transformers import AutoModel
from diffusers import AutoencoderKL
from transformers import CLIPTokenizer
model = AutoModel.from_pretrained(
"FWKV/FWKV-Image",
trust_remote_code=True
).eval().cuda()
tokenizer = CLIPTokenizer.from_pretrained("openai/clip-vit-base-patch32")
image = model.generate(
tokenizer=tokenizer,
prompt="a red fox sitting in a snowy forest, digital art",
steps=50,
cfg_scale=4.0,
seed=42
)
image.save("output.png")
The unified checkpoint contains the trained DiT, the frozen CLIP text encoder, and the frozen VAE weights in a single model.safetensors, so no separate AutoencoderKL.from_pretrained(...) calls are required.
jackyhate/text-to-image-2M (streamed, first 100 k valid pairs)HuggingFaceM4/COCO| Hyperparameter | Value |
|---|---|
| Architecture | 12 FWKV‑DiT blocks, d_model=384, patch=2, 256 tokens |
| Heads | 6 |
| FFN multiplier | 4 |
| WKV decay floor | 0.05 |
| Objective | Rectified flow (velocity MSE) |
| Batch size | 32 |
| Learning rate | 1×10⁻⁴ (cosine schedule) |
| Weight decay | 0.0 |
| Gradient clipping | 1.0 |
| Optimizer | AdamW (β₁=0.9, β₂=0.95) |
| Precision | bfloat16 mixed (CUDA only) |
| Epochs | 5 |
| Effective examples | 100 000 |
| Hardware | 1× NVIDIA GPU |
Note: the training script itself is not public; only the final weights and inference code are released.
See Tiny T2I Leaderboard.
The model is intended as an architectural proof‑of‑concept rather than a competitive production image generator.
The training run consumed a single consumer/entry‑level NVIDIA GPU for a small number of epochs on 100 k examples. The total energy footprint is estimated to be well under 1 kWh and corresponding CO₂eq emissions are negligible (on the order of 0.1–0.3 kg CO₂eq assuming average grid carbon intensity).
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys fwkv-image for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (fwkv-image below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/images/generations \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"fwkv-image","prompt":"a red bicycle","size":"1024x1024"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.