Downloads · 30 days
46
29% of all-time downloads
fromziro/Zero-TinyImage-0.6M
Zero-TinyImage-0.6M is a unconditional image generation model from fromziro. Use it for the unconditional image generation task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Zero-TinyImage-0.6M is a small, fast unconditional image generation model. It features a total of 639k parameters and was trained on 50k images from DataComp for 15 epochs. While image models aren't our primary focus…
Downloads · 30 days
46
29% of all-time downloads
All-time downloads
158
Public
Parameters
639K
7.8 MB on disk
Likes
7
Public
Click a slice to open those files.
.safetensors2.6 MB · 98%
From the Hugging Face model README
Zero-TinyImage-0.6M is a small, fast unconditional image generation model. It features a total of 639k parameters and was trained on 50k images from DataComp for 15 epochs. While image models aren't our primary focus at FromZero, we decided to create our very first one.
Zero-TinyImage-0.6M uses a custom architecture inspired by our text-to-text models, featuring mHC, Hadamard FFNs with SwiGLU intervals, 2D Axial RoPE, and a continuous diffusion objective.
9662×242 (Grouped-Query Attention)1603 (every 3rd layer)42500.0This architecture allows Zero-TinyImage-0.6M to remain fast and parameter-efficient while still providing the effective depth and width of a much larger model.
As stated above, we trained Zero-TinyImage-0.6M on 50k images from DataComp for 15 epochs.
0.2119While the generated outputs are largely incoherent and unidentifiable, this is expected at such a small scale, and we make no claims otherwise.
import torch
from transformers import AutoModel
from torchvision.utils import save_image
# Select device
device = "cuda" if torch.cuda.is_available() else "cpu"
# Load model directly from Hugging Face
model = AutoModel.from_pretrained(
"fromziro/Zero-TinyImage-0.6M-0.6M",
trust_remote_code=True
).to(device)
# Generate 6 unconditional 32x32 images
with torch.no_grad():
samples = model.sample(num_samples=6, device=device, num_steps=50)
# Denormalize from [-1, 1] to [0, 1] and save grid
images = (samples * 0.5 + 0.5).clamp(0, 1)
save_image(images, "sample.png", nrow=3)
print("Saved samples to sample.png!")
Apache 2.0.