> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Mage-Flow: ComfyUI 워크플로우 예제

> Mage-Flow는 Microsoft의 컴팩트한 4B 모델로, ComfyUI에서 텍스트-이미지 생성 및 명령 기반 이미지 편집을 지원하며 최대 2K의 네이티브 해상도를 제공합니다.

**Mage-Flow**는 Microsoft Research의 소형 4B 규모 생성형 스택으로, 효율적인 텍스트 기반 이미지 생성과 명령 기반 이미지 편집을 위해 설계되었습니다. 이 스택은 공동 설계된 두 가지 구성 요소로 구축됩니다: 경량 고충실도 잠재 데이터 토크나이저인 [Mage-VAE](https://huggingface.co/microsoft/Mage-VAE)와 정류 플로우 매칭으로 학습된 네이티브 해상도 멀티모달 Diffusion Transformer(NR-MMDiT)입니다. 네이티브 해상도 패킹과 함께, 이 공유 스택은 두 가지 모델 구현체를 지원합니다: 텍스트 기반 이미지 생성을 위한 Mage-Flow와 명령 기반 이미지 편집을 위한 Mage-Flow-Edit입니다. 각각 Base, RL 정렬, 4-step Turbo 변형으로 제공됩니다.

Mage-Flow는 4:1과 같은 극단적인 치수를 포함한 모든 종횡비에서 한 변당 512\~2048픽셀의 네이티브 해상도를 지원합니다.

**라이선스**: [MIT](https://github.com/microsoft/Mage/blob/main/LICENSE)

**관련 링크**:

* [Hugging Face: microsoft/Mage-Flow](https://huggingface.co/microsoft/Mage-Flow)
* [Hugging Face: Comfy-Org/Mage-Flow (ComfyUI 모델)](https://huggingface.co/Comfy-Org/Mage-Flow)
* [공식 GitHub 저장소](https://github.com/microsoft/Mage)
* [기술 보고서 (arXiv)](https://arxiv.org/abs/2607.19064)

## Mage-Flow 텍스트 기반 이미지 생성 워크플로

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/Mage_flow.png" alt="Mage-Flow 텍스트 기반 이미지 생성 워크플로 출력" />

<CardGroup cols={2}>
  <Card title="Comfy Cloud에서 실행" icon="cloud" href="https://cloud.comfy.org/?template=image_mage_flow_t2i_int8&utm_source=docs&utm_medium=referral&utm_campaign=mage-flow">
    Comfy Cloud에서 열기
  </Card>

  <Card title="워크플로 다운로드" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/image_mage_flow_t2i_int8.json">
    JSON 다운로드 또는 템플릿 라이브러리에서 "Mage-Flow" 검색
  </Card>
</CardGroup>

<Tip>
  <Tabs>
    <Tab title="로컬 사용자">
      ComfyUI가 최신 버전으로 업데이트되었는지 확인하세요.

      * [ComfyUI 다운로드](https://www.comfy.org/download)
      * [업데이트 가이드](/ko/installation/update_comfyui)

      이 가이드의 워크플로는 [워크플로 템플릿](/ko/interface/features/template)에서 확인할 수 있습니다.
      템플릿에서 찾을 수 없다면, 귀하의 ComfyUI가 오래된 버전일 수 있습니다.

      워크플로를 로드할 때 노드가 누락되는 경우, 가능한 원인:

      1. 최신 ComfyUI 버전(최신 테스트 버전(nightly))을 사용하고 있지 않음
      2. 일부 노드가 시작 시 가져오기에 실패함
    </Tab>

    <Tab title="클라우드 사용자">
      * [클라우드](https://cloud.comfy.org)는 ComfyUI 안정판 출시 후 업데이트됩니다.

      따라서 이 문서에서 핵심 노드가 누락된 것을 발견했다면, 그 이유는 새로운 핵심 노드가 아직 최신 안정판에 공개되지 않았기 때문일 수 있습니다. 다음 안정판 출시를 기다려 주세요.
    </Tab>
  </Tabs>
</Tip>

이 워크플로는 몇 가지 부분으로 구성됩니다:

1. **텍스트 기반 이미지 생성 (Mage-Flow) 서브그래프**: 모델 로딩, 프롬프트 처리, 기본 해상도 잠재 데이터 생성, 샘플링, VAE 디코드를 포함하는 핵심 생성 파이프라인
2. **SaveImageAdvanced**: 생성된 이미지를 저장합니다

<Card title="서브그래프 알아보기" icon="book-open" href="/ko/interface/features/subgraph">
  이 워크플로는 모듈식 처리를 위해 서브그래프 노드를 사용합니다. 서브그래프 문서를 확인하여 워크플로를 사용자 정의하고 확장하는 방법을 알아보세요.
</Card>

### 원클릭 생성

가장 간단한 사용법은 서브그래프에 텍스트 프롬프트를 입력하고 원하는 해상도를 설정한 다음 **실행 대기열에 프롬프트 추가**를 클릭하는 것입니다. 기본 설정은 최소한의 구성으로 고품질 이미지를 생성합니다.

### 워크플로 사용하기

1. **프롬프트 입력**: 서브그래프의 프롬프트 입력란에 텍스트 설명을 입력합니다
2. **해상도 설정**: 원하는 출력 크기에 맞게 너비와 높이를 조정합니다. Mage-Flow는 한 변당 512\~2048픽셀의 기본 해상도를 지원합니다.
3. **설정 조정**: 필요에 따라 시드와 네거티브 프롬프트를 구성합니다
4. **실행 대기열 클릭**: `Ctrl+Enter`를 눌러 생성합니다

## Mage-Flow Turbo 텍스트 기반 이미지 생성 워크플로

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/Mage_flow_turbo.png" alt="Mage-Flow Turbo 텍스트 기반 이미지 생성 워크플로 출력" />

<CardGroup cols={2}>
  <Card title="Comfy Cloud에서 실행" icon="cloud" href="https://cloud.comfy.org/?template=image_mage_flow_turbo_t2i_int8&utm_source=docs&utm_medium=referral&utm_campaign=mage-flow">
    Comfy Cloud에서 열기
  </Card>

  <Card title="워크플로 다운로드" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/image_mage_flow_turbo_t2i_int8.json">
    JSON 다운로드 또는 템플릿 라이브러리에서 "Mage-Flow Turbo" 검색
  </Card>
</CardGroup>

Turbo 변형은 높은 품질을 유지하면서 더 빠른 생성을 위해 증류된 4단계 checkpoint를 사용합니다. 워크플로 구조와 컨트롤은 기본 텍스트 기반 이미지 생성 워크플로와 동일하지만, Turbo diffusion 모델을 사용하여 더 낮은 지연 시간의 추론을 제공합니다.

## Mage-Flow-Edit 이미지 편집 워크플로

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/Mage_flow_edit.png" alt="Mage-Flow-Edit 이미지 편집 워크플로 출력" />

<CardGroup cols={2}>
  <Card title="Comfy Cloud에서 실행" icon="cloud" href="https://cloud.comfy.org/?template=image_mage_flow_edit_int8&utm_source=docs&utm_medium=referral&utm_campaign=mage-flow">
    Comfy Cloud에서 열기
  </Card>

  <Card title="워크플로 다운로드" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/image_mage_flow_edit_int8.json">
    JSON 다운로드 또는 템플릿 라이브러리에서 "Mage-Flow-Edit" 검색
  </Card>

  <Card title="샘플 이미지 다운로드" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/calm_amid_ruin.png">
    이 워크플로용 예제 입력 이미지 받기
  </Card>
</CardGroup>

이미지 편집 워크플로는 자연어 설명을 사용하여 이미지를 편집하는 지시 기반 모델인 Mage-Flow-Edit를 사용합니다. 참조 이미지를 하나 이상 업로드하고 원하는 편집 내용을 설명하세요.

워크플로는 몇 가지 부분으로 구성됩니다.

1. **LoadImage**: 참조 이미지 업로드(최대 3개)
2. **Image Edit(Mage-Flow-Edit) 서브그래프**: 모델 로딩, 참조 이미지 조건화, 프롬프트 처리, 샘플링을 포함하는 핵심 편집 파이프라인
3. **ImageCompare**: 원본과 편집된 이미지를 나란히 비교
4. **SaveImage**: 편집된 출력 저장

### 이미지 편집 사용하기

1. **참조 이미지 업로드**: 편집하려는 이미지를 **LoadImage** 노드로 로드합니다(최대 3개).
2. **편집 지시 입력**: 적용하려는 편집 내용을 텍스트 설명으로 입력합니다(예: "배경을 해변 장면으로 바꾸기" 또는 "이것을 수채화 그림으로 변환").
3. **설정 조정**: 해상도, 시드 및 기타 파라미터를 구성합니다.
4. **Queue 클릭**: `Ctrl+Enter`를 눌러 생성합니다.

## Mage-Flow-Edit Turbo image edit workflow

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/Mage_flow_edit_turbo.png" alt="Mage-Flow-Edit Turbo image edit workflow output" />

<CardGroup cols={2}>
  <Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=image_mage_flow_edit_turbo_int8&utm_source=docs&utm_medium=referral&utm_campaign=mage-flow">
    Open in Comfy Cloud
  </Card>

  <Card title="Download Workflow" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/image_mage_flow_edit_turbo_int8.json">
    Download JSON or search "Mage-Flow-Edit Turbo" in Template Library
  </Card>

  <Card title="Download Sample Image" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/hot_air_balloons_rising.png">
    Get the example input image for this workflow
  </Card>
</CardGroup>

The Turbo variant of the edit workflow uses a distilled 4-step checkpoint for faster editing. The structure and controls match the base edit workflow but with reduced sampling steps.

### Model downloads

For local use, download the ComfyUI-optimized model files from [Comfy-Org/Mage-Flow](https://huggingface.co/Comfy-Org/Mage-Flow).

<CardGroup cols={3}>
  <Card title="Text Encoder" icon="download" href="https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/text_encoders/qwen3vl_4b_bf16.safetensors">
    qwen3vl\_4b\_bf16.safetensors: Qwen3VL-4B text encoder
  </Card>

  <Card title="VAE" icon="download" href="https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/vae/mage_flow_vae_bf16.safetensors">
    mage\_flow\_vae\_bf16.safetensors
  </Card>

  <Card title="Diffusion Model (Base Int8)" icon="download" href="https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/diffusion_models/mage_flow_int8_convrot.safetensors">
    mage\_flow\_int8\_convrot.safetensors: Base model used in the T2I workflow
  </Card>

  <Card title="Diffusion Model (Turbo Int8)" icon="download" href="https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/diffusion_models/mage_flow_turbo_int8_convrot.safetensors">
    mage\_flow\_turbo\_int8\_convrot.safetensors: Turbo model used in the Turbo T2I workflow
  </Card>

  <Card title="Diffusion Model (Edit Int8)" icon="download" href="https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/diffusion_models/mage_flow_edit_int8_convrot.safetensors">
    mage\_flow\_edit\_int8\_convrot.safetensors: Edit model used in the Edit workflow
  </Card>

  <Card title="Diffusion Model (Edit Turbo Int8)" icon="download" href="https://huggingface.co/Comfy-Org/Mage-Flow/resolve/main/diffusion_models/mage_flow_edit_turbo_int8_convrot.safetensors">
    mage\_flow\_edit\_turbo\_int8\_convrot.safetensors: Edit Turbo model used in the Edit Turbo workflow
  </Card>
</CardGroup>

Other model variants (BF16, FP8) are also available for users with different hardware configurations.

Place the files in the following directories:

```
📂 ComfyUI/
├── 📂 models/
│   ├── 📂 diffusion_models/
│   │   ├── mage_flow_int8_convrot.safetensors
│   │   ├── mage_flow_turbo_int8_convrot.safetensors
│   │   ├── mage_flow_edit_int8_convrot.safetensors
│   │   └── mage_flow_edit_turbo_int8_convrot.safetensors
│   ├── 📂 text_encoders/
│   │   └── qwen3vl_4b_bf16.safetensors
│   └── 📂 vae/
│       └── mage_flow_vae_bf16.safetensors
```
