AI SeedbankHelp preserve open and free AI for humanity's future

← All models

CompVis_stable-diffusion-v1-4

CompVis · View on Hugging Face ↗

Get this model

Download TorrentMagnet Link

Seeders: · Leechers:

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


license: creativeml-openrail-m tags:

  • stable-diffusion

  • stable-diffusion-diffusers

  • text-to-image widget:

  • text: "A high tech solarpunk utopia in the Amazon rainforest" example_title: Amazon rainforest

  • text: "A pikachu fine dining with a view to the Eiffel Tower" example_title: Pikachu in Paris

  • text: "A mecha robot in a favela in expressionist style" example_title: Expressionist robot

  • text: "an insect robot preparing a delicious meal" example_title: Insect robot

  • text: "A small cabin on top of a snowy mountain in the style of Disney, artstation" example_title: Snowy disney cabin extra_gated_prompt: |- This model is open access and available to all, with a CreativeML OpenRAIL-M license further specifying rights and usage. The CreativeML OpenRAIL License specifies:

    1. You can't use the model to deliberately produce nor share illegal or harmful outputs or content
    2. The authors claim no rights on the outputs you generate, you are free to use them and are accountable for their use which must not go against the provisions set in the license
    3. You may re-distribute the weights and use the model commercially and/or as a service. If you do, please be aware you have to include the same use restrictions as the ones in the license and share a copy of the CreativeML OpenRAIL-M to all your users (please read the license entirely and carefully) Please read the full license carefully here: https://huggingface.co/spaces/CompVis/stable-diffusion-license

extra_gated_heading: Please read the LICENSE to access this model

Stable Diffusion v1-4 Model Card

Stable Diffusion is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input. For more information about how Stable Diffusion functions, please have a look at 🤗's Stable Diffusion with 🧨Diffusers blog.

The Stable-Diffusion-v1-4 checkpoint was initialized with the weights of the Stable-Diffusion-v1-2 checkpoint and subsequently fine-tuned on 225k steps at resolution 512x512 on "laion-aesthetics v2 5+" and 10% dropping of the text-conditioning to improve classifier-free guidance sampling.

This weights here are intended to be used with the 🧨 Diffusers library. If you are looking for the weights to be loaded into the CompVis Stable Diffusion codebase, come here

Model Details

  • Developed by: Robin Rombach, Patrick Esser

  • Model type: Diffusion-based text-to-image generation model

  • Language(s): English

  • License: The CreativeML OpenRAIL M license is an Open RAIL M license, adapted from the work that BigScience and the RAIL Initiative are jointly carrying in the area of responsible AI licensing. See also the article about the BLOOM Open RAIL license on which our license is based.

  • Model Description: This is a model that can be used to generate and modify images based on text prompts. It is a Latent Diffusion Model that uses a fixed, pretrained text encoder (CLIP ViT-L/14) as suggested in the Imagen paper.

  • Resources for more information: GitHub Repository, Paper.

  • Cite as:

    @InProceedings{Rombach_2022_CVPR,
        author    = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn},
        title     = {High-Resolution Image Synthesis With Latent Diffusion Models},
        booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
        month     = {June},
        year      = {2022},
        pages     = {10684-10695}
    }
    

Examples

We recommend using 🤗's Diffusers library to run Stable Diffusion.

PyTorch

pip install --upgrade diffusers transformers scipy

Running the pipeline with the default PNDM scheduler:

import torch
from diffusers import StableDiffusionPipeline

model_id = "CompVis/stable-diffusion-v1-4"
device = "cuda"


pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to(device)

prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]  
    
image.save("astronaut_rides_horse.png")

Note: If you are limited by GPU memory and have less than 4GB of GPU RAM available, please make sure to load the StableDiffusionPipeline in float16 precision instead of the default float32 precision as done above. You can do so by telling diffusers to expect the weights to be in float16 precision:

import torch

pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to(device)
pipe.enable_attention_slicing()

prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]  
    
image.save("astronaut_rides_horse.png")

To swap out the noise scheduler, pass it to from_pretrained:

from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler

model_id = "CompVis/stable-diffusion-v1-4"

# Use the Euler scheduler here instead
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16)
pipe = pipe.to("cuda")

prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]  
    
image.save("astronaut_rides_horse.png")

JAX/Flax

To use StableDiffusion on TPUs and GPUs for faster inference you can leverage JAX/Flax.

Running the pipeline with default PNDMScheduler

import jax
import numpy as np
from flax.jax_utils import replicate
from flax.training.common_utils import shard

from diffusers import FlaxStableDiffusionPipeline

pipeline, params = FlaxStableDiffusionPipeline.from_pretrained(
    "CompVis/stable-diffusion-v1-4", revision="flax", dtype=jax.numpy.bfloat16
)

prompt = "a photo of an astronaut riding a horse on mars"

prng_seed = jax.random.PRNGKey(0)
num_inference_steps = 50

num_samples = jax.device_count()
prompt = num_samples * [prompt]
prompt_ids = pipeline.prepare_inputs(prompt)

# shard inputs and rng
params = replicate(params)
prng_seed = jax.random.split(prng_seed, num_samples)
prompt_ids = shard(prompt_ids)

images = pipeline(prompt_ids, params, prng_seed, num_inference_steps, jit=True).images
images = pipeline.numpy_to_pil(np.asarray(images.reshape((num_samples,) + images.shape[-3:])))

Note: If you are limited by TPU memory, please make sure to load the FlaxStableDiffusionPipeline in bfloat16 precision instead of the default float32 precision as done above. You can do so by telling diffusers to load the weights from "bf16" branch.

import jax
import numpy as np
from flax.jax_utils import replicate
from flax.training.common_utils import shard

from diffusers import FlaxStableDiffusionPipeline

pipeline, params = FlaxStableDiffusionPipeline.from_pretrained(
    "CompVis/stable-diffusion-v1-4", revision="bf16", dtype=jax.numpy.bfloat16
)

prompt = "a photo of an astronaut riding a horse on mars"

prng_seed = jax.random.PRNGKey(0)
num_inference_steps = 50

num_samples = jax.device_count()
prompt = num_samples * [prompt]
prompt_ids = pipeline.prepare_inputs(prompt)

# shard inputs and rng
params = replicate(params)
prng_seed = jax.random.split(prng_seed, num_samples)
prompt_ids = shard(prompt_ids)

images = pipeline(prompt_ids, params, prng_seed, num_inference_steps, jit=True).images
images = pipeline.numpy_to_pil(np.asarray(images.reshape((num_samples,) + images.shape[-3:])))

Uses

Direct Use

The model is intended for research purposes only. Possible research areas and tasks include

  • Safe deployment of models which have the potential to generate harmful content.
  • Probing and understanding the limitations and biases of generative models.
  • Generation of artworks and use in design and other artistic processes.
  • Applications in educational or creative tools.
  • Research on generative models.

Excluded uses are described below.

Misuse, Malicious Use, and Out-of-Scope Use

Note: This section is taken from the DALLE-MINI model card, but applies in the same way to Stable Diffusion v1.

The model should not be used to intentionally create or disseminate images that create hostile or alienating environments for people. This includes generating images that people would foreseeably find disturbing, distressing, or offensive; or content that propagates historical or current stereotypes.

Out-of-Scope Use

The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model.

Misuse and Malicious Use

Using the model to generate content that is cruel to individuals is a misuse of this model. This includes, but is not limited to:

  • Generating demeaning, dehumanizing, or otherwise harmful representations of people or their environments, cultures, religions, etc.
  • Intentionally promoting or propagating discriminatory content or harmful stereotypes.
  • Impersonating individuals without their consent.
  • Sexual content without consent of the people who might see it.
  • Mis- and disinformation
  • Representations of egregious violence and gore
  • Sharing of copyrighted or licensed material in violation of its terms of use.
  • Sharing content that is an alteration of copyrighted or licensed material in violation of its terms of use.

Limitations and Bias

Limitations

  • The model does not achieve perfect photorealism
  • The model cannot render legible text
  • The model does not perform well on more difficult tasks which involve compositionality, such as rendering an image corresponding to “A red cube on top of a blue sphere”
  • Faces and people in general may not be generated properly.
  • The model was trained mainly with English captions and will not work as well in other languages.
  • The autoencoding part of the model is lossy
  • The model was trained on a large-scale dataset LAION-5B which contains adult material and is not fit for product use without additional safety mechanisms and considerations.
  • No additional measures were used to deduplicate the dataset. As a result, we observe some degree of memorization for images that are duplicated in the training data. The training data can be searched at https://rom1504.github.io/clip-retrieval/ to possibly assist in the detection of memorized images.

Bias

While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases. Stable Diffusion v1 was trained on subsets of LAION-2B(en), which consists of images that are primarily limited to English descriptions. Texts and images from communities and cultures that use other languages are likely to be insufficiently accounted for. This affects the overall output of the model, as white and western cultures are often set as the default. Further, the ability of the model to generate content with non-English prompts is significantly worse than with English-language prompts.

Safety Module

The intended use of this model is with the Safety Checker in Diffusers. This checker works by checking model outputs against known hard-coded NSFW concepts. The concepts are intentionally hidden to reduce the likelihood of reverse-engineering this filter. Specifically, the checker compares the class probability of harmful concepts in the embedding space of the CLIPTextModel after generation of the images. The concepts are passed into the model with the generated image and compared to a hand-engineered weight for each NSFW concept.

Training

Training Data The model developers used the following dataset for training the model:

  • LAION-2B (en) and subsets thereof (see next section)

Training Procedure Stable Diffusion v1-4 is a latent diffusion model which combines an autoencoder with a diffusion model that is trained in the latent space of the autoencoder. During training,

  • Images are encoded through an encoder, which turns images into latent representations. The autoencoder uses a relative downsampling factor of 8 and maps images of shape H x W x 3 to latents of shape H/f x W/f x 4
  • Text prompts are encoded through a ViT-L/14 text-encoder.
  • The non-pooled output of the text encoder is fed into the UNet backbone of the latent diffusion model via cross-attention.
  • The loss is a reconstruction objective between the noise that was added to the latent and the prediction made by the UNet.

We currently provide four checkpoints, which were trained as follows.

  • stable-diffusion-v1-1: 237,000 steps at resolution 256x256 on laion2B-en. 194,000 steps at resolution 512x512 on laion-high-resolution (170M examples from LAION-5B with resolution >= 1024x1024).

  • stable-diffusion-v1-2: Resumed from stable-diffusion-v1-1. 515,000 steps at resolution 512x512 on "laion-improved-aesthetics" (a subset of laion2B-en, filtered to images with an original size >= 512x512, estimated aesthetics score > 5.0, and an estimated watermark probability < 0.5. The watermark estimate is from the LAION-5B metadata, the aesthetics score is estimated using an improved aesthetics estimator).

  • stable-diffusion-v1-3: Resumed from stable-diffusion-v1-2. 195,000 steps at resolution 512x512 on "laion-improved-aesthetics" and 10 % dropping of the text-conditioning to improve classifier-free guidance sampling.

  • stable-diffusion-v1-4 Resumed from stable-diffusion-v1-2.225,000 steps at resolution 512x512 on "laion-aesthetics v2 5+" and 10 % dropping of the text-conditioning to improve classifier-free guidance sampling.

  • Hardware: 32 x 8 x A100 GPUs

  • Optimizer: AdamW

  • Gradient Accumulations: 2

  • Batch: 32 x 8 x 2 x 4 = 2048

  • Learning rate: warmup to 0.0001 for 10,000 steps and then kept constant

Evaluation Results

Evaluations with different classifier-free guidance scales (1.5, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0) and 50 PLMS sampling steps show the relative improvements of the checkpoints:

Evaluated using 50 PLMS steps and 10000 random prompts from the COCO2017 validation set, evaluated at 512x512 resolution. Not optimized for FID scores.

Environmental Impact

Stable Diffusion v1 Estimated Emissions Based on that information, we estimate the following CO2 emissions using the Machine Learning Impact calculator presented in Lacoste et al. (2019). The hardware, runtime, cloud provider, and compute region were utilized to estimate the carbon impact.

  • Hardware Type: A100 PCIe 40GB
  • Hours used: 150000
  • Cloud Provider: AWS
  • Compute Region: US-east
  • Carbon Emitted (Power consumption x Time x Carbon produced based on location of power grid): 11250 kg CO2 eq.

Citation

    @InProceedings{Rombach_2022_CVPR,
        author    = {Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj\"orn},
        title     = {High-Resolution Image Synthesis With Latent Diffusion Models},
        booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
        month     = {June},
        year      = {2022},
        pages     = {10684-10695}
    }

This model card was written by: Robin Rombach and Patrick Esser and is based on the DALL-E Mini model card.

Magnet link

Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:

magnet:?xt=urn:btih:055bd07a2d8ac8e48a732528320cdbeac6160e50&dn=CompVis_stable-diffusion-v1-4

Open magnet in torrent client · infohash 055bd07a2d8ac8e48a732528320cdbeac6160e50

Files & hashes

PathSizesha1sha256
README.md16.7 KB (17,079 B)f28a29417fcf50a024345ce8326195d94155651e4eb72f9e6bdbfcf359ad66cdd7e26984449f47692069f81205f2217c9a821ba2
feature_extractor/preprocessor_config.json342 B (342 B)5294955ff7801083f720b34b55d0f1f51313c5c52a1da83b5e1032aaeef397552ddb408dca0d8cd1dc58f61bf6abf38d6f33a0a2
model_index.json541 B (541 B)72f7b0487b783996b5c6c9e8d9cafbbf8fd3a3c8c7cc314014486aa2f7f17ab8f90197fe0412c818cdefb9e15601ae58752b5001
safety_checker/config.json4.4 KB (4,556 B)97bed2ba03e1a77fe548fab801464c734b0a142ba069f3ab23e39f3d608b220d9ae6067a94e43405557e575cf7f98d7e8d2a255c
safety_checker/model.fp16.safetensors579.9 MB (608,018,440 B)5b63f5d9392a5b6bf7352010e02b37b17973635a08902f19b1cfebd7c989f152fc0507bef6898c706a91d666509383122324b511
safety_checker/model.safetensors1.13 GB (1,215,981,830 B)d698395fae9500ff20b10baae55c22a5aa20ad0f9d6a233ff6fd5ccb9f76fd99618d73369c52dd3d8222376384d0e601911089e8
safety_checker/pytorch_model.bin1.13 GB (1,216,061,799 B)3af806e53d0d0e38af867a6167f1e334d79dc80f193490b58ef62739077262e833bf091c66c29488058681ac25cf7df3d8190974
safety_checker/pytorch_model.fp16.bin579.9 MB (608,103,564 B)b6cc73ff49dabf40ad9a35d18659686f8e41179922ba87205445ad5def13e54919b038dcfb7321ec1c3f4b12487d4fba6036125f
scheduler/scheduler_config.json313 B (313 B)1a3e6d1a17dd6e722b4d4297023f9791702196808335df29b53da12e9aeca35b1c2e60d88b23eae4cc5ad3d07efdcd7f003cc343
text_encoder/config.json592 B (592 B)df430a86cefe4115495e64c47936850adaeac0e9aa210e6d6abd239a466af57a1dadb62d5ced63295064d295a549e08a6c4a2020
text_encoder/model.fp16.safetensors234.7 MB (246,144,864 B)7a5338aeb9acba67832c3a624e20e2497fb371ae77795e2023adcf39bc29a884661950380bd093cf0750a966d473d1718dc9ef4e
text_encoder/model.safetensors469.5 MB (492,265,879 B)0753d5686bce3bdd2eb060b1c36b4f5a0b11610c7b3a12df205cb3c74dd4eae4354d93f606ae6b3bc29d5d06fd97921cb9ad8a81
text_encoder/pytorch_model.bin469.5 MB (492,305,335 B)8b03c5eb2eb0218dde9e34c0d6c60a057858f7da770a47a9ffdcfda0b05506a7888ed714d06131d60267e6cf52765d61cf59fd67
text_encoder/pytorch_model.fp16.bin234.8 MB (246,187,076 B)aa919d3bedc5ed13804ab87e6cf81b03b9da3fa905eee911f195625deeab86f0b22b115d7d8bc3adbfc1404f03557f7e4e6a8fd7
tokenizer/merges.txt512.3 KB (524,619 B)76e821f1b6f0a9709293c3b6b51ed90980b3166b9fd691f7c8039210e0fced15865466c65820d09b63988b0174bfe25de299051a
tokenizer/special_tokens_map.json472 B (472 B)2c2130b544c0c5a72d5d00da071ba130a9800fb2c4864a9376a8401918425bed71fc14fc0e81f9b59ec45c1cf96cccb2df508eac
tokenizer/tokenizer_config.json806 B (806 B)5ba7bf706515bc60487ad0e1816b4929b82542d600439066fcba73de57644cf41e4e3b9f2dbb09d7f3fc2005898ba52399045882
tokenizer/vocab.json1.0 MB (1,059,962 B)469be27c5c010538f845f518c4f5e8574c78f7c8e089ad92ba36837a0d31433e555c8f45fe601ab5c221d4f607ded32d9f7a4349
unet/config.json743 B (743 B)0f998cd15e52f65656cd801497d171c5b9477cc7d6749baad843798f21da6c2d3dd9d642e5ebb73455ade4763158f5c6d3e95b03
unet/diffusion_pytorch_model.bin3.20 GB (3,438,354,725 B)c6c85dafa1da74a3be5ab7c11ab19a095c4c724c62d48b4d841a3178511fa453df0dae59b22089ace64609cc9d5353d0a7f37c26
unet/diffusion_pytorch_model.fp16.bin1.60 GB (1,719,327,893 B)99b8d0aa529ca99ea77970a1899d5ac50ed0c36b3ac986370f51d806d2119577d5a66fbf6d3746e2356f45dc474e7561ce94bdbf
unet/diffusion_pytorch_model.fp16.safetensors1.60 GB (1,719,125,304 B)6cf7c7d2e1d938a36f649cbbba37cd8204023cbfa35404d03ec8f977715a4d2a080ddf72e2144f2ee49bb1ee213258bc64f9cc87
unet/diffusion_pytorch_model.non_ema.bin3.20 GB (3,438,366,373 B)ac350f43f8800d9f194e12ef21afbc1ac4566ae8f5f12f7078f361f137f91edc270cb523208dc2322a597e07773eb3b1e5703850
unet/diffusion_pytorch_model.non_ema.safetensors3.20 GB (3,438,167,536 B)57b1da8d764cfe64bc5e6ee2f8aca080e49db349ac3d1bff03f9e9a6f8671b5a7a3fd984f90185c84e407bc569f97c1cce7445fd
unet/diffusion_pytorch_model.safetensors3.20 GB (3,438,167,534 B)1f1dd8e43acbf4cffdfe2272cab6bd32c07f878a145a07e0f05ec5bbe6e2e9faf608bdb311caf708895cac8c8ed713c59864e1e8
v1-variants-scores.jpg69.6 KB (71,237 B)9201b985d4520c64cdb0a4e4aee6fc13f035df7edf89d8466f70a8c14ea13615bf557b0135c5a36acd0f9e509a106dc1fb065087
vae/config.json551 B (551 B)3b39129f09637592d2ef992dc143955c7e01d4a20e5966d4d52c8077648754ffd2c14ab5e0b26a4bdfa6af1d207c27550fa6d2af
vae/diffusion_pytorch_model.bin319.2 MB (334,707,217 B)a178492b9b2b1d26551ce182c8ac9625255996aa1b134cded8eb78b184aefb8805b6b572f36fa77b255c483665dda931fa0130c5
vae/diffusion_pytorch_model.fp16.bin159.7 MB (167,405,651 B)b1c8b915ba734484d9a81e2105b64681ba8e0b84b7643b3e40b9f128eda5fe174fea73c3ef3903562651fb344a79439709c2e503
vae/diffusion_pytorch_model.fp16.safetensors159.6 MB (167,335,342 B)9968dbd195e2d4fb7d156759b04430c48e4ce2474fbcf0ebe55a0984f5a5e00d8c4521d52359af7229bb4d81890039d2aa16dd7c
vae/diffusion_pytorch_model.safetensors319.1 MB (334,643,276 B)dab319e5dc64af7c11109c6ae05282296af1f9eba2b5134f4dbc140d9c11f11cba3233099e00af40f262f136c691fb7d38d2194c

Cite this release

Canonical URL
https://aiseedbank.org/models/CompVis_stable-diffusion-v1-4/
Slug
CompVis_stable-diffusion-v1-4
Infohash
055bd07a2d8ac8e48a732528320cdbeac6160e50
License
creativeml-openrail-m
Signing key fingerprint
85a3b32c3712427b

Every file carries a locally computed sha256 — verify a download against the signed sums: CompVis_stable-diffusion-v1-4.SHA256SUMS (+ minisign signature).

Provenance

Upstream repositoryCompVis/stable-diffusion-v1-4
Revision (pinned)133a221b8aa7292a167afc5127cb63fb5005638b
Fetched at2026-09-03T17:11:31Z
License at fetchcreativeml-openrail-m
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

✓ verified · rehash-vs-hf-metadata at 2026-09-03T17:15:57Z

creativeml-openrail-m21.72 GB (23,322,351,451 bytes)diffuserssafetensorsstable-diffusionstable-diffusion-diffuserstext-to-imageendpoints_compatiblediffusers:StableDiffusionPipelinepaper: 2207.12598paper: 2112.10752paper: 2103.00020paper: 2205.11487paper: 1910.09700