비주얼 AI 가이드

Stable Diffusion: 오픈 텍스트-이미지 모델의 작동 원리

Stable Diffusion is a family of text-to-image models whose first version, released publicly on August 22, 2022, generates pictures by removing noise in a compressed latent space rather than on raw pixels.

이 가이드를 들어보세요AI 내레이션 · ~8 min

이 페이지에서9분 읽기
  1. 개요
  2. 주요 시사점
  3. 심층 분석
  4. Tracing one image through Stable Diffusion v1
  5. 실제 구현
  6. The Future of Stable Diffusion: How the Open Text-to-Image Model Works
  7. 실천에 옮기기
  8. 출처 및 추가 자료
  9. 계속 탐색하세요
  10. 자주 묻는 질문

개요

Because its weights were downloadable and ran on a single consumer graphics card, it became the base for a large ecosystem of open image tools, fine-tunes and research.

주요 시사점

  1. Stability AI released Stable Diffusion publicly on August 22, 2022 under the CreativeML OpenRAIL-M license, with downloadable weights.
  2. Stable Diffusion runs diffusion in a compressed latent space; version 1 downsamples images by a factor of 8, so 512 pixels become 64 latent cells.
  3. Version 1 pairs an 860 million parameter U-Net with a frozen 123 million parameter CLIP ViT-L/14 text encoder.
  4. Classifier-free guidance blends conditional and unconditional predictions; the reference script uses a guidance scale of 7.5 and 50 sampling steps.
  5. SDXL enlarged the U-Net about threefold, and Stable Diffusion 3 switched to a rectified-flow transformer with separate text and image weights.
  6. In November 2025 the UK High Court held that Stable Diffusion's weights do not store copies of Getty's images.

심층 분석

Stable Diffusion is a text-to-image model: you type a description, and it produces an image that matches it. It belongs to a class called diffusion models, which learn to turn random noise into a picture one small step at a time. What made it different from earlier systems such as DALL-E 2 was not only quality but access. Stability AI released the first version publicly on August 22, 2022 under the CreativeML OpenRAIL-M license, which allows commercial and non-commercial use with use-based restrictions, and the weights could be downloaded and run locally. Stability's announcement put the memory need at about 6.9 GB of graphics card memory (VRAM).

The research behind it is the latent diffusion model, described by Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser and Bjorn Ommer in 'High-Resolution Image Synthesis with Latent Diffusion Models', first posted to arXiv on December 20, 2021 and published at CVPR 2022. The paper's key idea is to run the expensive diffusion process inside the latent space of a pretrained autoencoder rather than on full-resolution pixels. An autoencoder is a pair of networks: an encoder that compresses an image into a smaller grid of numbers, called a latent, and a decoder that reconstructs the image from it. The authors argued this keeps visual detail while cutting compute, noting that pixel-space diffusion models often need hundreds of GPU days to train.

Generation works in a few distinct stages. First, a text encoder turns the prompt into a sequence of vectors. In version 1, this is a frozen CLIP ViT-L/14 text encoder with 123 million parameters, according to the CompVis model card. Second, the system starts from a latent filled with random noise. Third, a U-Net, a convolutional network with 860 million parameters in version 1, predicts the noise present in that latent, and a sampler removes a portion of it. The U-Net reads the text vectors through cross-attention layers, which let each region of the image look up the words most relevant to it. This loop repeats for a set number of steps, 50 in the reference script. Finally, the autoencoder's decoder converts the clean latent back into pixels. Because the autoencoder downsamples by a factor of 8, a 512 by 512 image is generated as a 64 by 64 latent.

Prompt adherence is controlled by classifier-free guidance, introduced by Jonathan Ho and Tim Salimans in July 2022. During training, the text condition is sometimes dropped, so the same network learns both a conditional and an unconditional prediction. At sampling time the two predictions are blended, pushing the result further in the direction the text suggests. The CompVis model card notes that checkpoints v1-3 and v1-4 were trained with 10% text-conditioning dropout for this reason, and the reference script uses a guidance scale of 7.5. Higher scales follow the prompt more literally at the cost of variety.

The training data came from LAION, a nonprofit that publishes large image-text datasets scraped from the web. Per the model card, v1-1 trained for 237,000 steps at 256 by 256 on laion2B-en and then 194,000 steps at 512 by 512 on a high-resolution subset, while later checkpoints continued on 'laion-aesthetics v2 5+', a subset filtered for images a classifier rated as more aesthetic. Stability AI provided compute, Runway collaborated, and LAION supported the work.

Later versions changed the architecture substantially, so claims about 'Stable Diffusion' should name a version. SDXL, described in a paper posted July 4, 2023, uses a U-Net about three times larger than earlier versions, a second text encoder, training on multiple aspect ratios, and an optional refinement model. Stable Diffusion 3, described in 'Scaling Rectified Flow Transformers for High-Resolution Image Synthesis' (March 5, 2024), replaced the U-Net with a transformer that keeps separate weights for image and text tokens and lets information flow in both directions. It also moved from standard diffusion to rectified flow, a formulation that connects data and noise along a straight line. The authors reported improved typography, text comprehension and human preference ratings.

Compared with closed services such as DALL-E or Midjourney, the main difference is control. With local weights, users can fine-tune on their own images, add control signals such as edge maps, run without per-image fees, and inspect the model. The trade-offs are that the user must supply hardware, manage safety settings, and accept that quality depends heavily on version, sampler and settings. Stability's 2022 release shipped a safety classifier enabled by default, but in a local install it can be adjusted or removed, which raised concern about misuse.

The limitations matter in practice. Version 1 was pretrained at 256 by 256 and finetuned at 512 by 512, so that is the size it was built for, and SDXL's move to multiple aspect ratios and SD3's focus on typography and text comprehension show which weaknesses the developers themselves set out to fix. Because the training images were scraped from the web, the model inherits whatever is over- or under-represented in that data. Copyright remains contested: in Getty Images v Stability AI, decided by the UK High Court in November 2025, Getty dropped its training claim for lack of a UK connection, the judge held the model was not an infringing copy because its weights do not store copies of Getty's images, and a small number of generated Getty watermarks were found to infringe trademarks. Other jurisdictions and cases may reach different conclusions.

04실제 사례

Tracing one image through Stable Diffusion v1

  1. Write a prompt such as 'a red bicycle leaning on a brick wall' and pick an output size of 512 by 512 pixels.

  2. Compute the latent size: divide each side by the downsampling factor of 8 to get a 64 by 64 latent grid.

  3. Pass the prompt through the CLIP ViT-L/14 text encoder to get a sequence of token vectors, and also encode an empty prompt.

  4. Fill the 64 by 64 latent with random Gaussian noise using a fixed seed so the run is repeatable.

  5. For each of 50 sampler steps, have the U-Net predict noise twice (with and without the prompt), combine them with guidance scale 7.5, and remove part of the noise.

  6. Decode the final latent with the autoencoder decoder to get a 512 by 512 image.

  7. Repeat with the same seed but a guidance scale of 2, then 12, and compare how literally each image follows the prompt.

그것이 보여주는 것

Three images from the same seed that differ only in guidance strength. The check is that the seed reproduces the identical image when rerun with identical settings, and that higher guidance produces a closer but less varied match to the prompt.

실제 구현

Running the original CompVis txt2img script, which by default samples a 512 by 512 image in 50 PLMS steps with a guidance scale of 7.5, on a single GPU with 10 GB or more of memory.

Inpainting: masking part of a photo and regenerating only that region from a text prompt, a task where the 2022 latent diffusion paper reported state-of-the-art results.

Using SDXL's separate refinement model as a post-hoc image-to-image pass to sharpen detail in images produced by the SDXL base model, as described in the July 2023 SDXL paper.

Comparing the v1-1 through v1-4 checkpoints, which the CompVis model card documents as trained for different numbers of steps on different LAION subsets, to see how data curation changes output style.

Legal analysis: the UK High Court's November 2025 Getty Images v Stability AI judgment examined whether Stable Diffusion's weights store copies of training images and found they do not.

The Future of Stable Diffusion: How the Open Text-to-Image Model Works

Research since 2022 has moved the family away from its original design. The March 2024 SD3 paper reported predictable scaling trends, with lower validation loss tracking better image quality and human preference, which points research toward larger transformer backbones and flow-based training rather than bigger U-Nets. Open questions include how to measure prompt fidelity reliably, how to make text rendering and spatial relationships dependable, and how to cut the number of sampling steps without losing quality. Legal and governance questions remain open. The November 2025 UK judgment in Getty Images v Stability AI was narrow, and Getty had dropped its training claim for lack of a UK connection, so it did not settle whether training on scraped images is lawful elsewhere. Licensing also varies across versions, so users must read the license attached to each release rather than assuming the original OpenRAIL-M terms apply. Safety tooling, such as default output classifiers and provenance labeling, is another active area, because locally run open weights can be modified by anyone who downloads them.

실천에 옮기기

왜 중요한가요?

  • 속도와 규모. Visual AI는 대규모 검사, 감지 및 태그 지정 작업을 자동화할 수 있습니다.
  • 빌드 선택. 크리에이티브 팀은 수동 수정 횟수를 줄여 컨셉의 프로토타입을 더 빠르게 제작할 수 있습니다.
  • 팀과 워크플로우. 이전에는 처리하기 어려웠던 이미지 및 비디오 신호를 작업에 사용할 수 있습니다.

조심하세요

  • 출처가 불분명할 경우 이미지 권리 및 동의는 법적 위험이 될 수 있습니다.
  • 모델 성능은 조명, 인구통계, 환경에 따라 달라질 수 있습니다.
  • 신뢰도 임계값을 모니터링하지 않으면 거짓양성이 발견되지 않을 수 있습니다.

다음 단계

  1. 정밀도, 재현율, 오류 비용에 대한 허용 기준을 정의합니다.
  2. 실제 생산 조건과 일치하는 데이터로 테스트합니다.
  3. 신뢰도가 낮거나 영향력이 큰 예측에 대해 인적 검토를 추가합니다.
  4. 모델 드리프트를 추적하고 카메라 또는 데이터 세트가 변경된 후 재검증합니다.

출처 및 추가 자료

  1. arXiv (CVPR 2022)High-Resolution Image Synthesis with Latent Diffusion Models
  2. CompVis, LMU Munich (GitHub)CompVis/stable-diffusion: A latent text-to-image diffusion model
  3. Stability AIStable Diffusion Public Release
  4. arXivClassifier-Free Diffusion Guidance
  5. arXivSDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesis
  6. arXivScaling Rectified Flow Transformers for High-Resolution Image Synthesis
  7. Society for Computers and LawHigh Court issues eagerly-awaited judgment in Getty v Stability AI case

계속 탐색하세요

무료 뉴스레터

일일 AI 브리핑 받기

매주 평일 아침마다 3개의 검증된 AI 스토리를 일반 영어로 작성합니다. 무료이며, 광고 없음.

매주 평일마다 한 번 이메일을 받습니다. 한 번 클릭으로 구독 해지. 주소를 판매하거나 공유하지 않습니다.

자신을 테스트해 보세요

Take the Stable Diffusion: How the Open Text-to-Image Model Works quiz

모든 답변에 즉각적인 피드백과, 과정을 통과하면 검증 가능한 ID가 있는 공유 가능한 인증서를 제공합니다.

퀴즈 시작

무료 AI 교육을 지원합니다. AI Understanding는 501(c)(3) 비영리 단체입니다 — 광고 없음, 유료 장벽 없음, 영원히. 기부하기

자주 묻는 질문

What is Stable Diffusion: How the Open Text-to-Image Model Works?

Stable Diffusion is a family of text-to-image models whose first version, released publicly on August 22, 2022, generates pictures by removing noise in a compressed latent space rather than on raw pixels. Because its weights were downloadable and ran on a single consumer graphics card, it became the base for a large ecosystem of open image tools, fine-tunes and research.

높은 수준에서 확산 모델은 어떻게 이미지를 생성합니까?

확산 모델은 노이즈 프로세스를 역전시키는 방법을 학습합니다. 즉, 노이즈에서 시작하여 일관된 이미지가 나타날 때까지 반복적으로 노이즈를 제거합니다.

원래 Stable Diffusion v1 파이프라인은 학습된 노이즈 제거 작업을 어디에서 수행합니까?

잠재 계산은 아키텍처 선택입니다. 하드웨어 적합성은 여전히 ​​설정에 따라 다릅니다.

문서화된 원본 Stable Diffusion v1 디노이저의 텍스트 조건은 어떻게 되나요?

v1 설명은 텍스트 인코더 및 교차 주의 조건을 식별합니다. 이후 버전은 다를 수 있습니다.

분류자가 없는 지침은 문서화된 샘플링 공식에 무엇을 결합합니까?

척도는 선택한 모델 및 설정에 대한 예측과 요구 평가의 조합을 제어합니다.

샘플러 단계 수 변경을 정확하게 설명하는 설명은 무엇입니까?

의도한 샘플링 방식이 중요하므로 실제 체크포인트와 솔버를 평가하세요.