Skip to content

Commit 84e5cc5

Browse files
author
Mishig
authored
Fix doc KO unconditional_image_generation.md (huggingface#5236)
Fix indent issue
1 parent cc92332 commit 84e5cc5

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

docs/source/ko/using-diffusers/unconditional_image_generation.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,32 @@ Unconditional 이미지 생성은 비교적 간단한 작업입니다. 모델이
2929

3030
이 가이드에서는 unconditional 이미지 생성에 ['DiffusionPipeline'][DDPM](https://arxiv.org/abs/2006.11239)을 사용합니다:
3131

32-
```python
32+
```python
3333
>>> from diffusers import DiffusionPipeline
3434

3535
>>> generator = DiffusionPipeline.from_pretrained("anton-l/ddpm-butterflies-128")
36-
```
36+
```
37+
3738
[diffusion 파이프라인]은 모든 모델링, 토큰화, 스케줄링 구성 요소를 다운로드하고 캐시합니다. 이 모델은 약 14억 개의 파라미터로 구성되어 있기 때문에 GPU에서 실행할 것을 강력히 권장합니다. PyTorch에서와 마찬가지로 제너레이터 객체를 GPU로 옮길 수 있습니다:
38-
```python
39+
40+
```python
3941
>>> generator.to("cuda")
40-
```
42+
```
43+
4144
이제 제너레이터를 사용하여 이미지를 생성할 수 있습니다:
42-
```python
45+
46+
```python
4347
>>> image = generator().images[0]
44-
```
48+
```
49+
4550
출력은 기본적으로 [PIL.Image](https://pillow.readthedocs.io/en/stable/reference/Image.html?highlight=image#the-image-class) 객체로 감싸집니다.
4651

4752
다음을 호출하여 이미지를 저장할 수 있습니다:
48-
```python
53+
54+
```python
4955
>>> image.save("generated_image.png")
50-
```
56+
```
5157

5258
아래 스페이스(데모 링크)를 이용해 보고, 추론 단계의 매개변수를 자유롭게 조절하여 이미지 품질에 어떤 영향을 미치는지 확인해 보세요!
5359

54-
<iframe src="https://stevhliu-ddpm-butterflies-128.hf.space" frameborder="0" width="850" height="500"></iframe>
60+
<iframe src="https://stevhliu-ddpm-butterflies-128.hf.space" frameborder="0" width="850" height="500"></iframe>

0 commit comments

Comments
 (0)