Video

ComfyUI Automation

Run ComfyUI through its API to batch-generate images and video, with resume and safe stop.

ComfyUI Automation
Works with Claude, GPT and GeminiInstall any one of them in VS Code →ClaudeClaude CodeGPTCodexGeminiAntigravity

How to use

  1. 1

    Download the ZIP

    Get the skill file with the button below. No sign-up.

  2. 2

    Unzip and open

    Unzip it into a folder and open that folder in VS Code.

  3. 3

    Just ask

    Tell your AI agent ‘Run the automation pipeline in this folder’.

When to use it

Try saying

“ComfyUI로 영상 배치 돌려줘”
“큐 상태 확인하고 생성 중단해줘”

What you get

  1. 01A Python client for upload, submit, wait and save
  2. 02Resume and safe-stop procedures

Tips

Get it free now

No sign-up, just one ZIP. Edit it freely for personal or commercial use.

Download ZIP (5KB)

Installation

Claude.ai / Desktop app (ZIP upload)

  1. Download the ZIP below.
  2. Upload it under Settings → Capabilities → Skills.
  3. Turn the skill on and start a chat with one of the "Try saying" lines.

Claude Code (copy the folder)

  1. Unzip it. You'll get a folder named after the skill.
  2. Put that folder inside ~/.claude/skills/ (or .claude/skills/ for a single project).
  3. Restart Claude Code.

Menu names may differ slightly depending on your environment. If you can't see the menu, check that skills are enabled on your plan.

Files and preview

Included files

SKILL.md
scripts/comfy_client.py
README.txt

Preview of SKILL.md

---
name: comfyui-automation
description: ComfyUI를 API로 자동화해 이미지·영상을 배치 생성할 때 쓰는 스킬. "ComfyUI 배치", "워크플로 API로 돌려", "MiniMax H3 첫·끝프레임 영상", "Qwen Image 2.1 이미지 생성", "큐 상태 확인", "생성 중단" 같은 요청에 사용. 서버 확인→워크플로 JSON 조립→업로드·제출→대기→저장→이어하기까지의 표준 절차와 실제 겪은 함정을 담았다.
---

# ComfyUI 자동화

ComfyUI(기본 `http://127.0.0.1:8189`)의 HTTP API로 작업을 제출하고 결과를 저장하는 표준 절차. 같은 폴더의 `scripts/comfy_client.py`가 업로드·제출·대기·저장·중단 함수를 제공한다.

## 1. 시작 전 점검
- 서버가 살아 있는지, 다른 작업이 큐를 쓰는지 먼저 본다: `queue_status()` → (실행중, 대기중). 남의 작업이 돌고 있으면 끼어들 수는 있지만 순서대로 밀린다.
- 모델 파일과 커스텀 노드가 서버에 있는지 `GET /object_info/<노드명>`으로 확인한다. 없으면 제출이 400으로 거부된다.
- 같은 서버를 여러 세션이 쓸 수 있다. 큐를 비우거나 인터럽트하기 전에 누구 작업인지 확인한다.

## 2. 워크플로 조립
- API 형식 JSON(노드 id → `class_type` + `inputs`)을 파이썬 dict로 만든다. 연결은 `["노드id", 출력인덱스]`.
- 입력 이미지는 `upload_image()`로 서버 input 폴더에 올리고, 돌려받은 이름을 `LoadImage`에 넣는다.
- 시드는 `int.from_bytes(os.urandom(4), "big")`로 매번 새로 뽑는다.
- 결과를 받을 저장 노드(`SaveVideo`/`SaveImage`)의 id를 기억해 `save_outputs(hist, node_id, out_dir)`에 넘긴다.

## 3. 검증된 구성
**MiniMax H3 첫·끝프레임 영상 (FL2VA, 터보 8스텝)**
UNETLoader(`minimax_h3_fl2va_pruned_int8_convrot`) → MiniMaxH3TurboLoRA(`minimaxh3\minimax_h3_fl2v_turbo_8step_v1.0_comfyui_bf16.safetensors`) / CLIPLoader(`qwen3vl_32b_minimax_h3_nvfp4_awq`, type `minimax`) / VAELoader 2개(video fp16, audio fp32) / LoadImage×2 → MiniMaxH3ImageToVideo → RandomNoise + KSamplerSelect(`res_multistep`) + BasicScheduler(`simple`, steps 8) + BasicGuider → SamplerCustomAdvanced → VAEDecode·VAEDecodeAudio → CreateVideo(24fps) → SaveVideo.
- 해상도 1536×864. 길이는 프레임 수: 175f ≈ 7초, 243f ≈ 10초.
- 8스텝 LoRA는 MiniMax 터보 전용이다. 다른 모델에 8스텝을 쓰지 않는다.
- 10초(243f)는 약 70% 지점에서 끝프레임에 수렴해 마지막 2.5~3초가 정지한다. 7초는 꼬리가 없다. 정지 구간은 끝프레임과 같으므로 편집에서 잘라도 이음새는 안 끊긴다.
- 프롬프트는 스타일 고정 + 시대 고정 한 줄 + 모션 본문 + 카메라 규칙 순으로 붙인다. `dissolve`, `fade`, `morph` 같은 전환어와 "no X" 식 부정문은 쓰지 않는다.

**Qwen Image 2.1 (이미지 생성·편집)**
TextEncodeQwenImage21(`images.image_1…` 참조 입력 + vae) + QwenImage21Cache, euler/simple, cfg 1.0. 참조 이미지를 여러 장 줄 수 있다.

## 4. 배치 운영 규칙
- 출력 파일 존재 여부로 건너뛰게 만든다(이어하기 안전). 예: `glob(f"MiniMax_B{block:02d}_{x}to{y}*.mp4")`.
- 제출 후 10초 간격으로 `/history/<id>`를 폴링한다. `status_str == "error"`면 실패로 기록하고 다음으로 넘어간다.
- 프롬프트 파서가 여러 컷이 섞인 텍스트를 읽을 때는 해당 컷 문단의 끝(빈 줄)에서 반드시 잘라낸다. 안 자르면 다음 컷 프롬프트가 섞여 들어간다.
- 긴 배치는 `nohup python ... > run.log 2>&1 &`로 백그라운드 실행하고 로그로 진행을 본다.

## 5. 중단
1. 해당 python 프로세스를 종료한다. 체인으로 묶인 셸이 있으면 부모 셸도 종료한다(안 그러면 다음 편이 시작된다).
2. `stop_all()`(= `POST /interrupt` + `POST /queue {"clear": true}`).

You may also like

This skill is a set of instructions Claude loads on its own. You are responsible for how you use the results. The instructions inside the ZIP are written in Korean. Terms of Use