Model reference · open weights

FWKV-Image

Image FWKV Text→image 1 build Open weights 551 dl/mo

FWKV-Image is an open-weight image model from FWKV. FWKV-Image (FP32) weighs 384 MB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • FWKV-Image is a text-to-image diffusion transformer developed by FWKV that replaces standard self-attention with a bidirectional per-channel leaky integrator.
  • The model generates 256×256 images from English text prompts and is intended for research on efficient diffusion transformers and educational demonstrations of linear-RNN architectures.
  • It contains approximately 40 million trained parameters, uses a rectified-flow velocity field objective, and is released under the Apache 2.0 license.

Summary of the FWKV/FWKV-Image model card, 2026-10-01

What it is

Released byFWKV
Released2026-07-25
Parameters192M
VRAM384 MB for the weights

What it runs on

Memory and cards for FWKV-Image (FP32)

384 MBweights, file size
5.0 GBworking memory, one 1024² image
537 MBruntime overhead
CardOne imageMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What FWKV says about FWKV-Image

Read the model card

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.

Model Description

  • Architecture: 12 stacked FWKV‑DiT blocks at width 384, with 6 heads each. Each block replaces standard self‑attention with a bidirectional decayed accumulator:

    • Forward scan: stateₜ = W·stateₜ₋₁ + kₜ·vₜ
    • Backward scan: same recurrence run in reverse
    • Output: sum of both directions (every patch sees every other patch with distance‑weighted decay)
    • Computed exactly via a vectorised O(log T) parallel scan (no approximations, no O(T²) attention matrix).
  • 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%" />

Uses

Direct Use

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.

Out‑of‑Scope Use

  • This model is not suitable for any production or safety‑critical application.
  • It has not been aligned with RLHF or other safety filters and may generate inappropriate or harmful content.
  • The limited size and training data mean image fidelity, prompt adherence, and diversity are far below commercial text‑to‑image systems.
  • Generated images should not be relied upon for factual or medical accuracy.

Bias, Risks, and Limitations

  • Trained on a relatively small dataset (100 k pairs), the model can produce repetitive outputs, artifacts, or fail to follow complex prompts.
  • Biases present in the training data (e.g. stereotypical depictions of people, occupations, or cultures) are likely reflected in generated images.
  • The 256×256 output resolution and small DiT capacity limit fine detail and text rendering quality.
  • As a research checkpoint, sampling hyperparameters (CFG scale, steps) have not been exhaustively tuned for all prompt categories.

How to Get Started

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.

Training Details

Dataset

  • Primary source: jackyhate/text-to-image-2M (streamed, first 100 k valid pairs)
  • Fallback source: HuggingFaceM4/COCO
  • Pre‑processing: Images resized to 256×256, encoded once to VAE latents (deterministic posterior mean) and cached to disk to avoid repeated VAE forward passes.

Training Procedure

HyperparameterValue
Architecture12 FWKV‑DiT blocks, d_model=384, patch=2, 256 tokens
Heads6
FFN multiplier4
WKV decay floor0.05
ObjectiveRectified flow (velocity MSE)
Batch size32
Learning rate1×10⁻⁴ (cosine schedule)
Weight decay0.0
Gradient clipping1.0
OptimizerAdamW (β₁=0.9, β₂=0.95)
Precisionbfloat16 mixed (CUDA only)
Epochs5
Effective examples100 000
Hardware1× NVIDIA GPU

Note: the training script itself is not public; only the final weights and inference code are released.

Evaluation

See Tiny T2I Leaderboard.

The model is intended as an architectural proof‑of‑concept rather than a competitive production image generator.

Environmental Impact

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).

Technical Specifications

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

Running it yourself

Run it on a rented GPU

Rent a machine by the hour. How to run this model is on its model card.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms