Instructions to use meadbee/yshtola-from-scratch-diffusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use meadbee/yshtola-from-scratch-diffusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("meadbee/yshtola-from-scratch-diffusion", 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 README.md from meadbee/yshtola-from-scratch-diffusion: direct link, hf CLI and curl.
- Browser
- Download file 5.59 kB
-
https://huggingface.co/meadbee/yshtola-from-scratch-diffusion/resolve/main/README.md
- Command line
-
hf download hf://meadbee/yshtola-from-scratch-diffusion/README.md
-
curl -L -o README.md https://huggingface.co/meadbee/yshtola-from-scratch-diffusion/resolve/main/README.md
library_name: diffusers
pipeline_tag: text-to-image
tags:
- diffusion
- anime
- from-scratch
- portfolio
- custom-pipeline
- safetensors
language:
- en
Training progress video
Download the training progress video.
Yshtola Diffusion
Learning diffusion from scratch on a single RTX 3090.
I built this project to understand how diffusion models learn and to explore what an individual could train at home on their own GPU. Over the course of one week, I trained a text-conditioned diffusion UNet from scratch using a dataset of more than one million anime images. The denoising UNet was trained entirely from randomly initialized weights on a consumer GPU, using frozen pretrained CLIP and VAE components.
This page documents that process: the early outputs, the improvements over time, and the lessons I learned along the way.
| Project | Details |
|---|---|
| Hardware | One NVIDIA GeForce RTX 3090 |
| Training duration | Approximately one week |
| Dataset size | 1 million+ images |
| Training approach | UNet trained from scratch with frozen pretrained CLIP and VAE components |
| Tools | Python, PyTorch, Hugging Face Diffusers, Transformers |
| Current checkpoint | 512 FINAL, EMA weights |
From noise to recognizable images
The following images are snapshots of the project's progression. The elapsed times are approximate. Training and sampling choices evolved during the week, so the images reflect both the model's development and what I was learning about generating samples.
1 hour: the starting point
The first samples were mostly fragmented colors and textures. This was the starting point for watching a randomly initialized UNet learn to denoise images.
12 hours: recognizable structure begins to emerge
Faces, hair, and larger areas of color started to become recognizable, even though the images were still heavily distorted.
3 days: more coherent characters and composition
By this point, the outputs showed more coherent poses, clothing, and overall composition. The improvement was visible, while texture artifacts and inconsistent details remained.
5 days: learning how much samplers matter
Around this stage, I started learning about samplers and how dramatically they can affect the final image. Choosing how to turn the model's noise predictions into an image became an important part of the project.
That changed how I evaluated progress: I needed to understand both the trained model and the sampling process to make sense of the results I was seeing.
1 week: current results
These are the current results after roughly one week on the 3090. The images show clearer faces, more consistent character structure, and more developed clothing and color choices than the early samples. There are still visible artifacts and details to improve.
Training loss
The recorded loss drops quickly at the beginning, then improves more gradually across roughly 408,000 optimizer steps. I used the loss curve alongside generated samples to follow training progress; the sample timeline shows changes that a single loss value cannot capture.
What I learned
- The diffusion training loop: adding noise at different timesteps and training a UNet to predict it.
- Text conditioning and latent space: connecting CLIP text embeddings, a denoising UNet, and a VAE that encodes and decodes images.
- Training on a single GPU: preparing image data, caching latents, and working with resolution buckets to make training practical on my hardware.
- Sampling and evaluation: seeing how much sampler choices affect output and comparing visual progress alongside training loss.
- Saving and sharing a model: working with checkpoints, exponential moving average (EMA) weights, and a packaged Diffusers export.
Technical scope
The component trained from scratch is the denoising UNet. The project uses the UNet2DConditionModel implementation from Diffusers, a frozen pretrained CLIP text encoder, and a frozen pretrained VAE from Waifu Diffusion.
The training objective is noise prediction in latent space. The released checkpoint contains EMA weights at global step 407,914, with a nominal training resolution of 512 pixels. It includes the model components, a DDIM scheduler, and the project's custom YunaDiffusionPipeline implementation.
Dataset and attribution
The dataset used for this project consisted of 1 million+ open-source anime images.
Pretrained component sources are linked above. A license for the project-trained weights has not yet been specified; pretrained components retain their respective license terms.






