Skip to content

Commit a1a6473

Browse files
committed
fix: restore toast.mdx closing fence and api-examples.mdx Korean comments
1 parent f4c9deb commit a1a6473

2 files changed

Lines changed: 30 additions & 28 deletions

File tree

ko/custom-nodes/js/javascript_toast.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ translationSourceHash: bb95eb58
44
translationFrom: custom-nodes/js/javascript_toast.mdx
55
---
66

7-
토스트 API는 사용자에게 비블록킹 방식의 알림 메시지를 표시하는 방법을 제공합니다. 이는 워크플로를 방해하지 않으면서 피드백을 제공하는 데 유용합니다.
7+
토스트 API는 사용자에게 비블록킹 방식의 알림 메시지를 표시하는 방법을 제공합니다. 이는 작업 흐름을 방해하지 않으면서 피드백을 제공하는 데 유용합니다.
88

99
## 기본 사용법
1010

@@ -85,4 +85,5 @@ app.extensionManager.toast.addAlert(message: string);
8585
app.extensionManager.toast.remove(toastMessage);
8686

8787
// 모든 토스트 제거
88-
app.extensionManager.toast.removeAll();
88+
app.extensionManager.toast.removeAll();
89+
```

ko/development/comfyui-server/api-examples.mdx

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,28 @@
11
---
22
title: "API 예제"
33
description: "ComfyUI 서버 API 호출을 위한 세 가지 일반적인 패턴"
4-
translationSourceHash: 5babb456
4+
translationSourceHash: 8afd49d2
55
translationFrom: development/comfyui-server/api-examples.mdx
6-
translationBlockHashes:
7-
"_intro": 9b610c63
8-
"Method 1: Submit and Forget (HTTP only)": 040a0a2d
9-
"Method 2: WebSocket + History (Monitor Completion)": ce4e5a84
10-
"Method 3: WebSocket with SaveImageWebsocket (Real-time Images)": e0bafb7d
11-
"Which Method Should I Use?": 6856579f
126
---
7+
138
이 페이지에서는 간단한 HTTP 제출부터 실시간 이미지 출력과의 완전한 WebSocket 통합까지, ComfyUI 서버 API와 상호작용하는 세 가지 방법을 보여줍니다.
149

15-
모든 예제는 설명을 위해 [기본 SD1.5 워크플로](https://github.com/Comfy-Org/ComfyUI/blob/master/script_examples)를 사용합니다. API를 사용하기 전에 [API 형식](/ko/development/api-development/workflow-api-format)으로 워크플로를 내보내야 합니다.
10+
모든 예제는 설명을 위해 [기본 SD1.5 워크플로우](https://github.com/Comfy-Org/ComfyUI/blob/master/script_examples)를 사용합니다. API를 사용하기 전에 [API 형식](/ko/development/api-development/workflow-api-format)으로 워크플로우를 내보내야 합니다.
1611

1712
<Note>
18-
이 예제들은 표준 라이브러리와 `websocket-client` 패키지를 사용한 파이썬 코드입니다(`pip install websocket-client`). 언어에 관계없이 기본 API 프로토콜은 동일합니다. TypeScript 및 curl 관련 내용은 [클라우드 API 참조](/ko/development/cloud/api-reference)를 확인하세요.
13+
이 예제들은 표준 라이브러리와 `websocket-client` 패키지를 사용한 파이썬 코드입니다(`pip install websocket-client`). 언어에 관계없이 기본 API 프로토콜은 동일합니다TypeScript 및 curl equivalent에 대한 [클라우드 API 참조](/ko/development/cloud/api-reference)를 확인하세요.
1914
</Note>
2015

16+
---
17+
2118
## 방법 1: 제출 후 잊어버리기 (HTTP 전용)
2219

2320
소스: [`basic_api_example.py`](https://github.com/Comfy-Org/ComfyUI/blob/master/script_examples/basic_api_example.py)
2421

25-
가장 간단한 방식: 워크플로를 제출하고 결과를 기다리지 않습니다. 나중에 출력물을 확인하는 일회성 작업에 유용합니다.
22+
가장 간단한 방식: 워크플로우를 제출하고 결과를 기다리지 않습니다. 나중에 출력물을 확인하는 일회성 작업에 유용합니다.
2623

2724
```python
28-
"""basic_api_example.py: HTTP만을 통해 워크플로를 제출합니다."""
25+
"""basic_api_example.pyHTTP만을 통해 워크플로우를 제출합니다."""
2926

3027
import json
3128
from urllib import request
@@ -43,7 +40,7 @@ def queue_prompt(prompt):
4340

4441

4542
if __name__ == "__main__":
46-
# API 형식으로 내보낸 워크플로를 로드합니다
43+
# API 형식으로 내보낸 워크플로우를 로드합니다
4744
prompt_text = """{
4845
"3": {
4946
"class_type": "KSampler",
@@ -94,7 +91,7 @@ if __name__ == "__main__":
9491
```
9592

9693
<Info>
97-
이 방법은 `SaveImage` 노드를 사용하며, 이 노드는 이미지를 서버의 디스크에 저장합니다. 이를 가져오려면 `GET /view?filename=...` 호출을 추가로 실행해야 합니다.
94+
이 방법은 `SaveImage` 노드를 사용하며, 이 노드는 이미지를 서버의 디스크에 저장합니다. 이를 가져오려면 `/view?filename=...` 호출을 추가로 실행해야 합니다.
9895
</Info>
9996

10097
---
@@ -106,7 +103,7 @@ if __name__ == "__main__":
106103
WebSocket을 사용해 실행이 완료될 때까지 기다린 후, `/history` 엔드포인트를 통해 출력물을 가져옵니다. 대부분의 사용 사례에 권장되는 방식입니다.
107104

108105
```python
109-
"""websockets_api_example.py: Monitor execution via WebSocket, download via /history."""
106+
"""websockets_api_example.py — WebSocket을 통해 실행 상태를 모니터링하고, /history를 통해 다운로드합니다."""
110107

111108
import websocket # pip install websocket-client
112109
import uuid
@@ -157,8 +154,8 @@ def get_images(ws, prompt):
157154
if message["type"] == "executing":
158155
data = message["data"]
159156
if data["node"] is None and data["prompt_id"] == prompt_id:
160-
break # Execution done
161-
# Binary frames are preview images; skip them here
157+
break # 실행 완료
158+
# 이진 프레임은 미리보기 이미지이므로 여기서 건너뜁니다
162159
continue
163160

164161
history = get_history(prompt_id)[prompt_id]
@@ -191,9 +188,9 @@ if __name__ == "__main__":
191188
images = get_images(ws, prompt)
192189
ws.close()
193190

194-
print(f"Got {len(images)} output node(s) with images.")
191+
print(f"{len(images)}개의 출력 노드에서 이미지를 받았습니다.")
195192

196-
# Display the images (requires Pillow):
193+
# 이미지 표시(필요한 경우 Pillow 사용):
197194
# for node_id in images:
198195
# for image_data in images[node_id]:
199196
# from PIL import Image
@@ -203,9 +200,11 @@ if __name__ == "__main__":
203200
```
204201

205202
<Tip>
206-
WebSocket 이진 프레임에는 생성 중인 미리보기 이미지가 포함됩니다. 이를 디코딩하여 실시간 미리보기를 볼 수 있습니다([서버 메시지](/ko/development/comfyui-server/comms_messages) 페이지에서 이진 형식을 확인하세요).
203+
WebSocket 이진 프레임에는 생성 중인 미리보기 이미지가 포함됩니다. 이를 디코딩하여 실시간 미리보기를 볼 수 있습니다([서버 메시지](/ko/development/comfyui-server/comms_messages) 페이지에서 이진 형식을 확인하세요).
207204
</Tip>
208205

206+
---
207+
209208
## 방법 3: SaveImageWebsocket을 사용한 WebSocket (실시간 이미지)
210209

211210
소스: [`websockets_api_example_ws_images.py`](https://github.com/Comfy-Org/ComfyUI/blob/master/script_examples/websockets_api_example_ws_images.py)
@@ -288,21 +287,23 @@ if __name__ == "__main__":
288287
```
289288

290289
<Info>
291-
워크플로는 일반 `SaveImage` 노드 대신 `class_type: "SaveImageWebsocket"`(내장 노드)를 가진 노드를 사용해야 합니다.
290+
워크플로우는 일반 `SaveImage` 노드 대신 `class_type: "SaveImageWebsocket"`를 가진 노드를 사용해야 합니다.
292291
</Info>
293292

294-
## 어떤 방법을 사용해야 하나요?
293+
---
294+
295+
## 어떤 방법을 사용해야 할까요?
295296

296297
<CardGroup cols={3}>
297298
<Card title="방법 1: HTTP 전용" icon="paper-plane">
298-
**실행 후 잊어버리기.** 즉시 출력이 필요하지 않거나 나중에 결과를 가져와도 되는 경우에 사용하세요.
299+
**즉시 처리 후 잊어버리기.** 즉각적인 출력이 필요하지 않거나, 나중에 결과를 가져오는 것이 괜찮을 때 사용하세요.
299300
</Card>
300-
<Card title="방법 2: WebSocket + 이력" icon="chart-line" href="#method-2-websocket--history-monitor-completion">
301-
**권장.** 완료를 기다린 후 출력을 다운로드합니다. 간편성과 신뢰성의 최적 균형입니다.
301+
<Card title="방법 2: WebSocket + 히스토리" icon="chart-line" href="#method-2-websocket--history-monitor-completion">
302+
**권장.** 실행이 완료될 때까지 기다렸다가 출력물을 다운로드하세요. 간편함과 신뢰성의 최적 조화입니다.
302303
</Card>
303304
<Card title="방법 3: SaveImageWebsocket" icon="images" href="#method-3-websocket-with-saveimagewebsocket-real-time-images">
304-
**실시간 이미지.** 디스크 쓰기 없이 이미지를 전달받고 싶은 대화형 앱에 가장 적합합니다.
305+
**실시간 이미지.** 디스크 쓰기 없이 이미지를 전달받고자 하는 인터랙티브 앱에 가장 적합합니다.
305306
</Card>
306307
</CardGroup>
307308

308-
전체 API 참조(엔드포인트, 페이로드 형식, 오류 처리)는 [서버 라우트](/ko/development/comfyui-server/comms_routes)[서버 메시지](/ko/development/comfyui-server/comms_messages) 페이지를 확인하세요.
309+
전체 API 참조(엔드포인트, 페이로드 형식, 오류 처리)는 [서버 라우트](/ko/development/comfyui-server/comms_routes)[서버 메시지](/ko/development/comfyui-server/comms_messages) 페이지를 참고하세요.

0 commit comments

Comments
 (0)