---
title: "Japanese Stable Diffusion"
description: "rinna built Japanese Stable Diffusion by fine-tuning Stable Diffusion on about 100 million Japanese-captioned images, including the Japanese subset of LAION-5B, filtered with a Japanese CLOOB model."
url: "https://swe.quest/articles/japanese-stable-diffusion-790396b8dcdc15b9"
canonical: "https://huggingface.co/blog/japanese-stable-diffusion"
source: "Hugging Face"
published: "2022-10-05"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["model-training","computer-vision","machine-learning"]
---

# Japanese Stable Diffusion

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2022-10-05, 6 min read, Case study. Original: [https://huggingface.co/blog/japanese-stable-diffusion](https://huggingface.co/blog/japanese-stable-diffusion)

## Summary

rinna built Japanese Stable Diffusion by fine-tuning Stable Diffusion on about 100 million Japanese-captioned images, including the Japanese subset of LAION-5B, filtered with a Japanese CLOOB model. Following PITI, training ran in two stages. First, the latent diffusion model was frozen while a new Japanese text encoder with a sentencepiece tokenizer was trained, because CLIP's tokenizer splits Japanese into uninterpretable byte tokens. Second, the encoder and diffusion model were fine-tuned together so outputs reflect Japanese culture, e.g. rendering "salary man" with Japanese rather than Western faces. Fine-tuning from the English model compensates for a dataset 1/20th the size, though the result is less versatile than the original.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)

## Prerequisites

- diffusion models basics
- CLIP text encoders
- tokenization

## Keywords

Stable Diffusion, Japanese Stable Diffusion, rinna, CLIP, LAION-5B, Diffusers, PITI, sentencepiece

## Related posts

- [Open Preference Dataset for Text-to-Image Generation by the 🤗 Community](https://swe.quest/articles/open-preference-dataset-for-text-to-image-generation-by-the-community-51063f2eca79d4de.md): Hugging Face · 2024-12-09 · Easy · 7 min read · Model training, Computer vision, Evaluation, Open source
  Data is Better Together released an Apache 2.0 text-to-image preference dataset of 10K pairs, with over 30K annotations from more than 250 community members collected in under two weeks.
- [Stable Diffusion with 🧨 Diffusers](https://swe.quest/articles/stable-diffusion-with-diffusers-03ca8448e680e397.md): Hugging Face · 2022-08-22 · Medium · 15 min read · Computer vision, Inference & serving, Machine learning, Python
  Stable Diffusion is a latent diffusion model that denoises compressed 64×64 latents rather than pixels, combining a VAE, a text-conditioned U-Net with cross-attention, and a frozen CLIP text encoder.
- [Finetune Stable Diffusion Models with DDPO via TRL](https://swe.quest/articles/finetune-stable-diffusion-models-with-ddpo-via-trl-08d1757d4cd09bc2.md): Hugging Face · 2023-09-29 · Hard · 9 min read · Model training, Computer vision, Machine learning, Python
  Denoising Diffusion Policy Optimization (DDPO) fine-tunes diffusion models with reinforcement learning by treating the full denoising process as a multistep MDP.
- [2D Asset Generation: AI for Game Development #4](https://swe.quest/articles/2d-asset-generation-ai-for-game-development-4-01cd732635277696.md): Hugging Face · 2023-01-26 · Medium · 8 min read · Computer vision, Games
  Stable Diffusion's Image2Image mode can be used as one step in a conventional 2D art workflow rather than a replacement for it: rough hand sketches are fed in, the output is painted over in an image editor, and the result is fed back in.
- [Training Stable Diffusion with Dreambooth using Diffusers](https://swe.quest/articles/training-stable-diffusion-with-dreambooth-using-diffusers-498f7d039b45823b.md): Hugging Face · 2022-11-07 · Medium · 8 min read · Model training, Computer vision
  Dreambooth fine-tuning of Stable Diffusion overfits quickly, so learning rate and step count must be tuned together.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
