FlameF0X / ShellD

huggingface.co
Total runs: 164
24-hour runs: 0
7-day runs: 16
30-day runs: 138
Model's Last Updated: July 17 2026
text-to-image

Introduction of ShellD

Model Details of ShellD

ShellD (Shell Diffusion)

Small DiT-based Text-to-Image Latent Diffusion Model

ShellD is a lightweight text-to-image model that generates 256×256 images from natural language prompts. It uses a Diffusion Transformer (DiT) backbone operating in a compact VAE latent space, making it feasible to train and run on consumer GPUs.


Model Architecture
Text Prompt → [MiniLM-L6-v2 (frozen)] → Text Embedding (384-d)
                                                      ↓
Random Noise → [VAE Encoder] → Latent (16ch) → [DiT (12 blocks)] → Denoised Latent → [VAE Decoder] → 256×256 Image
Component Details Params
Text Encoder sentence-transformers/all-MiniLM-L6-v2 (frozen) 22.71M
VAE Encoder + Decoder with residual blocks, 3 down/up stages, latent dim=16 23.43M
DiT 12-layer Transformer with self-attention, cross-attention (text), and adaptive timestep conditioning. Patch size=4, hidden dim=256, 8 heads 20.80M
Total 66.95M (trainable: 44.23M )
VAE (Autoencoder)

The VAE compresses 256×256 RGB images into a 16-channel latent with spatial size 32×32 (downsampled by 8×). It uses residual blocks with GroupNorm and SiLU activations. During training, a KL penalty (β=0.1) keeps latents close to a standard normal distribution.

DiT (Diffusion Transformer)

The DiT operates on patched latents (patch size 4 → 8×8 = 64 patches). Each block includes:

  • Self-attention for spatial relationships
  • Cross-attention conditioned on text embeddings
  • Adaptive timestep conditioning via an MLP-projected sinusoidal embedding
  • Dropout (0.1) in attention and MLP for regularization
Diffusion Process

Standard DDPM (Denoising Diffusion Probabilistic Model) with 1000 timesteps and a linear beta schedule (β₁=1e‑4, βᵀ=0.02). The model is trained to predict the added noise ε. Classifier-free guidance (CFG) is used during training with a text-conditioning dropout probability of 15%.


Training
Dataset

jackyhate/text-to-image-2M — ~2M high-quality text-image pairs in webdataset format. Loaded via the datasets library with streaming to avoid materializing the full 2TB+ dataset into memory. A rotating 2000-image in-memory buffer (~400 MB RAM) is refreshed each epoch from a fresh random stream to provide shuffle diversity without disk I/O bottlenecks.

Data Augmentation

Random horizontal flip (p=0.5), color jitter (brightness/contrast/saturation ±0.2, hue ±0.05), and random affine transforms (rotation ±10°, translation ±5%, scale 0.9–1.1) via torchvision .

Hyperparameters
Parameter Value
Image size 256×256
Batch size 8
Optimizer AdamW (β₁=0.9, β₂=0.999, lr=1e‑4, weight decay=0.01)
LR schedule Linear warmup (500 steps) + Cosine annealing
Gradient clipping 1.0 (norm)
Mixed precision FP16 via torch.cuda.amp.GradScaler
Dropout 0.1 (DiT attention + MLP)
EMA Exponential moving average (decay=0.999) applied at every step; EMA weights used for validation and final checkpoint
Early stopping Patience of 8 epochs on validation loss (10% held-out split)
KL weight 0.1 (β-VAE style)
VAE Pretraining

Before diffusion training, the VAE is pretrained for 10 epochs on reconstruction + KL loss with a higher learning rate (lr=1e‑3) to establish a meaningful latent space. During this phase the DiT and text encoder are frozen.

Training Phases
  1. VAE Pretraining (10 epochs) — Train encoder + decoder on image reconstruction to establish a meaningful latent space. DiT and text encoder are frozen.
  2. DiT Diffusion Training (up to 30 epochs, early-stopped) — Freeze VAE, train DiT to denoise latents conditioned on text embeddings. CFG dropout randomly replaces text embeddings with a learned null embedding to enable classifier-free guidance at inference time.

Usage
Requirements
pip install torch safetensors sentence-transformers pillow numpy huggingface-hub

For training, also install:

pip install torchvision datasets
Inference (standalone — loads from Hugging Face)
from inference import ShellDInference

pipe = ShellDInference("FlameF0X/ShellD")
image = pipe.generate("a serene lake surrounded by mountains")
image.save("output.png")

ShellDInference automatically downloads weights from Hugging Face via huggingface_hub on first use and caches them locally.

Streaming Generation

View the diffusion process unfold step-by-step:

for img, step_info in pipe.generate_stream(
    prompt="a futuristic city at night",
    num_steps=250,
    cfg_scale=3.0,
    display_every=25,  # emit an image every 25 steps
):
    print(f"Step {step_info['step']}/{step_info['total']}")
    img.save(f"progress_{step_info['step']:04d}.png")

Intended Use
  • Educational exploration of diffusion transformers
  • Lightweight text-to-image generation on consumer hardware
  • Starting point for fine-tuning on custom datasets
Limitations
  • 256×256 resolution only (no upscaling built in)
  • Limited prompt understanding due to small DiT and frozen lightweight text encoder
  • Quality depends on training data distribution — may not match large-scale models like SDXL or Flux

Runs of FlameF0X ShellD on huggingface.co

164
Total runs
0
24-hour runs
1
3-day runs
16
7-day runs
138
30-day runs

More Information About ShellD huggingface.co Model

ShellD huggingface.co

ShellD huggingface.co is an AI model on huggingface.co that provides ShellD's model effect (), which can be used instantly with this FlameF0X ShellD model. huggingface.co supports a free trial of the ShellD model, and also provides paid use of the ShellD. Support call ShellD model through api, including Node.js, Python, http.

FlameF0X ShellD online free

ShellD huggingface.co is an online trial and call api platform, which integrates ShellD's modeling effects, including api services, and provides a free online trial of ShellD, you can try ShellD online for free by clicking the link below.

FlameF0X ShellD online free url in huggingface.co:

https://huggingface.co/FlameF0X/ShellD

ShellD install

ShellD is an open source model from GitHub that offers a free installation service, and any user can find ShellD on GitHub to install. At the same time, huggingface.co provides the effect of ShellD install, users can directly use ShellD installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

ShellD install url in huggingface.co:

https://huggingface.co/FlameF0X/ShellD

Url of ShellD

Provider of ShellD huggingface.co

FlameF0X
ORGANIZATIONS

Other API from FlameF0X

huggingface.co

Total runs: 144
Run Growth: 49
Growth Rate: 34.03%
Updated:May 26 2026
huggingface.co

Total runs: 114
Run Growth: -76
Growth Rate: -66.67%
Updated:December 01 2025
huggingface.co

Total runs: 112
Run Growth: 16
Growth Rate: 14.29%
Updated:October 31 2025
huggingface.co

Total runs: 109
Run Growth: 0
Growth Rate: 0.00%
Updated:July 25 2026
huggingface.co

Total runs: 70
Run Growth: 70
Growth Rate: 100.00%
Updated:December 03 2025
huggingface.co

Total runs: 62
Run Growth: 12
Growth Rate: 19.35%
Updated:November 29 2025
huggingface.co

Total runs: 50
Run Growth: 47
Growth Rate: 94.00%
Updated:June 29 2025
huggingface.co

Total runs: 44
Run Growth: 11
Growth Rate: 25.00%
Updated:November 25 2025
huggingface.co

Total runs: 39
Run Growth: -135
Growth Rate: -346.15%
Updated:October 23 2025
huggingface.co

Total runs: 36
Run Growth: 20
Growth Rate: 55.56%
Updated:February 23 2026
huggingface.co

Total runs: 30
Run Growth: -254
Growth Rate: -846.67%
Updated:May 20 2026
huggingface.co

Total runs: 21
Run Growth: -10
Growth Rate: -47.62%
Updated:October 17 2025
huggingface.co

Total runs: 16
Run Growth: 0
Growth Rate: 0.00%
Updated:December 19 2025
huggingface.co

Total runs: 14
Run Growth: -272
Growth Rate: -1942.86%
Updated:May 15 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 06 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 29 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 15 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 31 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:July 17 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 07 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 15 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:December 31 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:April 19 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:April 25 2026