Skip to content

Split View: 집에서 AI 슈퍼컴퓨터를: NVIDIA DGX Spark로 LLM 공부하고 ComfyUI로 콘텐츠 만들기

✨ Learn with Quiz
|

집에서 AI 슈퍼컴퓨터를: NVIDIA DGX Spark로 LLM 공부하고 ComfyUI로 콘텐츠 만들기

1. DGX Spark: 개인용 AI 슈퍼컴퓨터의 탄생

2025년 3월, NVIDIA GTC 2025 키노트에서 젠슨 황 CEO가 무대 위에 작은 상자 하나를 올려놓았다. Mac Mini와 비슷한 크기의 그 장치는 "Project DIGITS"라는 코드명으로 알려져 있었고, 이제 정식 이름 DGX Spark로 세상에 공개되었다. 개인 개발자가 책상 위에서 200B 파라미터 대형 언어 모델(LLM)을 실행할 수 있는 시대가 열린 것이다.

1-1. 왜 DGX Spark인가

AI 개발자들은 오랫동안 딜레마에 빠져 있었다. 클라우드 GPU를 쓰자니 비용이 눈덩이처럼 불어나고, 개인 GPU로는 메모리 한계에 부딪혔다. RTX 4090의 24GB VRAM으로는 70B 모델조차 양자화 없이 돌릴 수 없었다. Mac Studio M4 Ultra의 512GB 통합 메모리는 매력적이지만 CUDA 생태계를 포기해야 했다.

DGX Spark는 이 딜레마를 정면으로 해결한다. 128GB 통합 메모리CUDA 12.8 완전 지원이라는 두 마리 토끼를 잡았기 때문이다.

1-2. 하드웨어 스펙 상세

DGX Spark의 핵심 스펙을 하나씩 살펴보자.

프로세서: GB10 Grace Blackwell Superchip

GB10은 NVIDIA와 MediaTek이 공동 설계한 슈퍼칩이다. 하나의 다이 위에 CPU와 GPU가 통합되어 있으며, 내부는 NVLink C2C(Chip-to-Chip)로 연결되어 900 GB/s의 대역폭을 확보한다. 이는 PCIe Gen5의 약 14배에 달하는 수치다.

  • CPU: 20코어 Arm Cortex (Grace 아키텍처 기반), 고효율 서버급 설계
  • GPU: Blackwell 아키텍처, 5세대 텐서 코어 탑재
  • AI 성능: 1 PFLOP (FP4 기준), 페타플롭스급 연산 능력
  • 메모리: 128GB LPDDR5X 통합 메모리, 273 GB/s 대역폭
  • 스토리지: 4TB NVMe SSD (Founders Edition) / 1TB (ASUS 모델)
  • 연결성: ConnectX-7 NIC, NVLink 2대 연결 지원, USB-C, DisplayPort
  • 전력: 240W (일반 데스크톱 수준)
  • 크기: Mac Mini급 소형 폼팩터, 약 1.2kg
  • OS: Ubuntu Linux 기반 DGX OS (NVIDIA AI Enterprise 포함)

1 PFLOP의 의미

1 PFLOP(페타플롭스)는 초당 1,000조 번의 연산을 의미한다. 이는 2008년 세계 최초로 1 PFLOP를 달성한 IBM Roadrunner 슈퍼컴퓨터와 동등한 성능이다. 당시 Roadrunner는 건물 하나를 차지하고 2.35MW의 전력을 소비했다. 그것이 지금 책상 위 240W 장치에 들어간 것이다.

1-3. 가격 및 모델 구성

모델가격스토리지비고
DGX Spark Founders Edition3,999달러4TB NVMeNVIDIA 직접 판매
ASUS DGX Spark2,999달러1TB NVMe파트너 제조

3,999달러라는 가격은 결코 저렴하지 않지만, 동급 클라우드 GPU 인스턴스(A100 80GB 기준 시간당 2-3달러)를 생각하면 몇 개월 만에 손익분기를 넘길 수 있는 투자다. ASUS 모델은 999달러나 저렴하면서 스토리지만 1TB로 줄었으니, SSD는 나중에 교체할 수 있다는 점에서 상당히 매력적인 선택지다.

1-4. Project DIGITS에서 DGX Spark로

원래 CES 2025에서 "Project DIGITS"로 발표되었을 때는 3,000달러의 개발자용 워크스테이션으로 소개되었다. 이후 GTC 2025에서 DGX 브랜드를 달고 정식 출시되면서 가격이 3,999달러로 조정되었고, DGX OS와 NVIDIA AI Enterprise 소프트웨어 스택이 포함되었다. 단순 하드웨어가 아니라 엔터프라이즈급 소프트웨어 에코시스템까지 함께 제공되는 셈이다.


2. 스펙 심층 비교: DGX Spark vs Mac Studio M4 Ultra vs RTX 5090

AI 개발자에게 현실적인 선택지는 크게 세 가지다. NVIDIA DGX Spark, Apple Mac Studio M4 Ultra, 그리고 RTX 5090을 탑재한 고급 데스크톱이다. 각각의 장단점을 면밀히 분석해 보자.

2-1. 핵심 스펙 비교표

항목DGX SparkMac Studio M4 UltraRTX 5090 데스크톱
가격3,999달러6,999달러 이상약 2,000달러 (GPU만)
메모리128GB 통합최대 512GB 통합32GB VRAM
메모리 대역폭273 GB/s819 GB/s1,792 GB/s
FP16 연산약 100 TFLOPS약 26 TFLOPS약 209 TFLOPS
FP4 연산1,000 TFLOPS (1 PFLOP)해당 없음3,352 TFLOPS
전력 소비240W (시스템 전체)약 370W (시스템 전체)800-900W (시스템 전체)
CUDA 지원완전 지원미지원완전 지원
최대 LLM 크기200B (단일), 405B (2대)405B 이상 (512GB 모델)약 30B (양자화)
폼팩터Mac Mini급 소형Mac Mini급 소형풀사이즈 데스크톱
OSUbuntu Linux (DGX OS)macOSWindows/Linux

2-2. 메모리 대역폭: Mac의 압도적 우위

숫자만 보면 Mac Studio M4 Ultra의 819 GB/s는 DGX Spark의 273 GB/s를 3배 이상 앞선다. 이것이 실제로 의미하는 바는 무엇인가?

LLM 추론에서 디코딩 단계(토큰을 하나씩 생성하는 과정)는 메모리 대역폭에 병목이 걸린다. 모델의 전체 가중치를 매 토큰마다 읽어야 하기 때문이다. 따라서 동일한 크기의 모델을 돌릴 때, Mac Studio는 디코딩 속도에서 DGX Spark보다 약 3배 빠를 수 있다.

실제 벤치마크에서도 이 차이가 확인된다. Llama 3.1 70B 모델 기준으로 Mac Studio M4 Ultra(192GB)는 약 8-10 tok/s를 달성하는 반면, DGX Spark는 약 2.7 tok/s에 머문다. 단순 추론 속도만 놓고 보면 Mac이 확실히 유리하다.

2-3. 연산 성능: DGX Spark의 CUDA 파워

반면 연산 집약적 작업에서는 판이 뒤집힌다. DGX Spark의 FP16 100 TFLOPS는 Mac Studio의 26 TFLOPS를 약 4배 압도한다. 이 차이가 빛을 발하는 영역은 다음과 같다.

  • 파인튜닝(Fine-tuning): LoRA/QLoRA 학습은 연산량이 핵심이다
  • 프리필(Prefill): 긴 프롬프트를 처리하는 단계에서 연산 성능이 직접 영향
  • 이미지 생성: Stable Diffusion, FLUX 등 디퓨전 모델은 GPU 연산 위주
  • CUDA 생태계: PyTorch, TensorRT, cuDNN 등 NVIDIA 전용 최적화 라이브러리 활용

특히 파인튜닝은 Mac에서 사실상 불가능하거나 극도로 비효율적이다. Metal Performance Shaders(MPS)는 PyTorch 학습에서 CUDA 대비 2-5배 느리고, 많은 라이브러리가 아예 지원하지 않는다.

2-4. RTX 5090: 소형 모델의 스피드 킹

RTX 5090은 32GB VRAM이라는 제약이 있지만, 그 안에 들어가는 모델에 한해서는 압도적이다. 1,792 GB/s라는 경이적인 메모리 대역폭 덕분에, 8B-30B 모델에서 DGX Spark 대비 4-5배 빠른 추론 속도를 보여준다.

문제는 32GB라는 벽이다. 70B 모델은 FP16 기준 약 140GB를 차지하므로 RTX 5090 하나로는 절대 불가능하다. 4비트 양자화를 적용해도 약 35GB로, 여전히 넘친다. 결국 RTX 5090은 소형 모델을 극한의 속도로 돌리는 용도에 최적화되어 있다.

2-5. 어떤 선택이 맞는가?

DGX Spark를 선택해야 하는 경우:

  • CUDA 생태계에서 파인튜닝과 학습을 해야 할 때
  • 100B 이상 대형 모델을 로컬에서 실험하고 싶을 때
  • ComfyUI 등 CUDA 기반 이미지 생성 파이프라인을 구축할 때
  • 저전력/소형 폼팩터가 필요할 때

Mac Studio를 선택해야 하는 경우:

  • LLM 추론 속도가 최우선일 때
  • 512GB 메모리로 초대형 모델(405B)을 돌려야 할 때
  • macOS 네이티브 앱과의 통합이 중요할 때
  • MLX 프레임워크 생태계를 활용할 때

RTX 5090 데스크톱을 선택해야 하는 경우:

  • 8B-30B 모델을 최대 속도로 서빙해야 할 때
  • 이미지/비디오 생성이 주 용도일 때
  • 게임 등 다른 GPU 작업도 병행할 때
  • 예산이 제한적일 때

3. DGX Spark에서 LLM 돌리기: 실전 가이드

DGX Spark의 128GB 통합 메모리는 단일 장치에서 최대 200B 파라미터 모델을 실행할 수 있게 해준다. 실제로 어떤 프레임워크를 사용하고, 어느 정도의 성능을 기대할 수 있는지 구체적으로 알아보자.

3-1. 지원 프레임워크

DGX Spark는 NVIDIA CUDA 12.8을 기반으로 주요 LLM 추론 프레임워크를 모두 지원한다.

간편 사용 (GUI/CLI)

  • Ollama: 원커맨드 모델 다운로드 및 실행, REST API 기본 제공
  • LM Studio: GUI 기반 모델 관리 및 채팅 인터페이스

고성능 서빙

  • TensorRT-LLM: NVIDIA 공식 최적화 엔진, 최고 성능
  • SGLang: 구조화된 출력에 최적화, RadixAttention
  • vLLM: PagedAttention 기반 효율적 배치 처리

학습/파인튜닝

  • NeMo Framework: NVIDIA 공식 학습 프레임워크
  • Unsloth: LoRA/QLoRA 학습 최적화
  • Axolotl: 다양한 학습 방법론 통합

3-2. 벤치마크 데이터

NVIDIA 공식 벤치마크 및 커뮤니티 테스트 결과를 종합하면 다음과 같다.

프리필 속도 (입력 토큰 처리)

모델양자화프리필 속도비고
GPT-OSS 20BFP82,053 tok/sNVIDIA 공식
Llama 3.1 8BFP8약 3,500 tok/sTensorRT-LLM
Llama 3.1 70BFP8약 800 tok/sTensorRT-LLM
Qwen2.5 72BFP8약 750 tok/s커뮤니티 테스트

디코딩 속도 (출력 토큰 생성)

모델양자화디코딩 속도비고
GPT-OSS 20BFP849.7 tok/sNVIDIA 공식
Llama 3.1 8BFP8약 20.5 tok/s일반 디코딩
Llama 3.1 70BFP8약 2.7 tok/s메모리 대역폭 제약
Llama 3.3 70BQ4_K_M약 5.2 tok/s양자화로 속도 향상
DeepSeek-R1 671BQ4 (2대)약 0.8 tok/sNVLink 2대 연결

3-3. EAGLE3 추측적 디코딩으로 2배 속도 향상

DGX Spark의 디코딩 속도가 메모리 대역폭에 병목이 걸린다는 점은 분명하다. 하지만 이를 소프트웨어로 극복할 방법이 있다. 추측적 디코딩(Speculative Decoding) 기법, 특히 EAGLE3이 그 핵심이다.

추측적 디코딩의 원리는 간단하다. 작은 "드래프트 모델"이 여러 토큰을 빠르게 예측하고, 큰 "타겟 모델"이 이를 한 번에 검증한다. 맞는 토큰은 그대로 채택하고, 틀린 토큰만 다시 생성한다.

EAGLE3은 이 기법의 최신 버전으로, DGX Spark에서 약 2배의 디코딩 속도 향상을 달성한다. Llama 3.1 70B 기준으로 2.7 tok/s가 약 5.4 tok/s로 개선되는 것이다.

# SGLang에서 EAGLE3 추측적 디코딩 활성화 예시
python -m sglang.launch_server \
  --model-path meta-llama/Llama-3.1-70B-Instruct \
  --speculative-algorithm EAGLE \
  --speculative-draft-model-path path/to/eagle3-draft \
  --speculative-num-steps 5 \
  --speculative-eagle-topk 8

3-4. 멀티 노드: 2대 연결로 405B, 4대로 700B

DGX Spark의 또 다른 강점은 NVLink로 여러 대를 연결할 수 있다는 점이다.

구성총 메모리실행 가능 모델예상 비용
1대128GB최대 200B (FP8)3,999달러
2대 (NVLink)256GBLlama 3.1 405B (FP8)7,998달러
4대 (네트워크)512GB700B+ 모델15,996달러

2대를 NVLink로 직접 연결하면 총 256GB의 통합 메모리 풀이 형성된다. 이 구성에서 Llama 3.1 405B를 FP8로 실행할 수 있다. 디코딩 속도는 약 1.2-1.5 tok/s로 실시간 대화에는 부족하지만, 배치 처리나 연구 목적으로는 충분하다.

3-5. 지원 모델 목록

DGX Spark에서 공식적으로 테스트되고 최적화된 모델들은 다음과 같다.

오픈 소스 LLM

  • Llama 3.x 시리즈 (8B, 70B, 405B)
  • Qwen 2.5/3 시리즈 (7B, 32B, 72B)
  • Gemma 3 시리즈 (2B, 9B, 27B)
  • DeepSeek-R1 (7B, 70B, 671B)
  • Nemotron 시리즈 (8B, 49B, 253B)
  • Mistral/Mixtral 시리즈
  • Phi-3/4 시리즈

비전-언어 모델

  • Llama 3.2 Vision (11B, 90B)
  • Qwen2-VL (7B, 72B)
  • Gemma 3 멀티모달

코딩 전문

  • Qwen2.5-Coder (7B, 32B)
  • DeepSeek-Coder-V2
  • StarCoder2

3-6. Ollama 기본 셋업

DGX Spark에서 가장 간단하게 LLM을 시작하는 방법은 Ollama를 사용하는 것이다.

# DGX Spark에는 Ollama가 사전 설치되어 있을 수 있음
# 없다면 공식 설치 스크립트 사용
curl -fsSL https://ollama.com/install.sh | sh

# Llama 3.1 70B 모델 다운로드 및 실행
ollama pull llama3.1:70b

# 대화 시작
ollama run llama3.1:70b

# REST API로 접근 (다른 애플리케이션에서 호출)
curl http://localhost:11434/api/generate -d '{
  "model": "llama3.1:70b",
  "prompt": "한국의 AI 산업 전망을 분석해주세요."
}'

128GB 통합 메모리 덕분에 70B 모델을 FP16으로도 충분히 로드할 수 있다. 기존 RTX 4090에서 필수였던 4비트 양자화 없이 원본 정밀도로 모델을 실행할 수 있다는 것은 출력 품질 측면에서 큰 차이를 만든다.


4. ComfyUI 완전 정복: 노드 기반 AI 이미지/비디오 생성

LLM만이 AI의 전부는 아니다. 이미지와 비디오를 생성하는 디퓨전 모델 역시 콘텐츠 크리에이터에게 필수적인 도구가 되었다. 그리고 이 영역에서 가장 강력한 프론트엔드가 바로 ComfyUI다.

4-1. ComfyUI란 무엇인가

ComfyUI는 Stable Diffusion, FLUX 등 디퓨전 모델을 위한 노드 기반 그래프 UI다. 기존의 Automatic1111 WebUI가 "설정 → 생성" 방식의 단순한 인터페이스라면, ComfyUI는 각 처리 단계를 노드로 분리하고 이를 와이어로 연결하는 비주얼 프로그래밍 방식이다.

ComfyUI의 핵심 장점:

  1. 효율적 재실행: 변경된 노드만 다시 계산한다. 프롬프트만 바꾸면 모델 로딩을 건너뛰고, 업스케일러만 바꾸면 이미지 생성은 건너뛴다.
  2. 극한의 커스터마이징: 노드 조합으로 어떤 파이프라인이든 구성 가능하다.
  3. 낮은 VRAM 요구: 최적화된 메모리 관리로 1GB VRAM에서도 동작한다.
  4. 워크플로우 공유: JSON 파일 하나로 복잡한 파이프라인을 공유/재현할 수 있다.
  5. 활발한 생태계: 수천 개의 커스텀 노드와 워크플로우가 공개되어 있다.

4-2. ComfyUI Desktop 앱

2024년 하반기부터 ComfyUI는 공식 Desktop 앱을 제공한다. Electron 기반으로 약 200MB 크기이며, 원클릭으로 설치할 수 있다.

Desktop 앱의 특징:

  • Python 환경 자동 구성 (가상환경 격리)
  • CUDA/ROCm/MPS 자동 감지
  • 모델 다운로드 매니저 내장
  • 커스텀 노드 매니저(ComfyUI-Manager) 사전 포함
  • Windows, macOS, Linux 지원

기존에 pip과 가상환경을 직접 관리해야 했던 번거로움이 크게 줄었다. 특히 DGX Spark의 Ubuntu 환경에서 Desktop 앱을 사용하면 별도의 환경 설정 없이 바로 시작할 수 있다.

4-3. 핵심 워크플로우

ComfyUI로 할 수 있는 주요 작업을 정리하면 다음과 같다.

Text-to-Image (텍스트에서 이미지 생성)

가장 기본적인 워크플로우다. 텍스트 프롬프트를 입력하면 AI가 이미지를 생성한다.

[CLIP Text Encode][KSampler][VAE Decode][Save Image]
       ↑                  ↑
[Load Checkpoint]    [Empty Latent Image]

노드 구성: 모델 로드 → 텍스트 인코딩 → 빈 잠재공간 이미지 생성 → 샘플링(디노이징) → VAE 디코딩 → 이미지 저장

Image-to-Image (이미지에서 이미지 변환)

기존 이미지를 기반으로 스타일이나 내용을 변경한다. 스케치를 사실적인 이미지로 변환하거나, 사진의 스타일을 바꾸는 데 사용한다.

인페인팅 (Inpainting)

이미지의 특정 영역만 선택적으로 재생성한다. 원하지 않는 객체 제거, 배경 교체, 부분 수정 등에 활용한다.

ControlNet 기반 제어

포즈, 엣지, 깊이 맵 등의 조건을 사용하여 이미지 생성을 정밀하게 제어한다. 캐릭터의 포즈를 지정하거나, 건축물의 구조를 유지하면서 스타일만 변경하는 것이 가능하다.

비디오 생성 (AnimateDiff, SVD)

정지 이미지에서 짧은 비디오 클립을 생성하거나, AnimateDiff를 사용하여 애니메이션을 만든다.

4-4. 지원 모델

ComfyUI가 지원하는 주요 생성 모델을 정리하면 다음과 같다.

FLUX 시리즈 (Black Forest Labs)

  • FLUX.1 Dev: 12B 파라미터, 고품질, 비상업적 라이선스
  • FLUX.1 Schnell: Dev의 고속 증류 버전, 4스텝 생성, Apache 2.0
  • FLUX.2 Klein 9B: 9B 파라미터, 효율성 최적화
  • FLUX Fill/Redux/Canny/Depth: 인페인팅, 스타일 전이, ControlNet 변형

Stable Diffusion 시리즈 (Stability AI)

  • SD 3.5 Large/Medium: 최신 아키텍처, MMDiT 기반
  • SDXL 1.0: 가장 널리 사용되는 모델, 방대한 LoRA 생태계
  • SD 1.5: 레거시지만 여전히 가장 많은 커뮤니티 자원 보유

비디오 모델

  • AnimateDiff: SD 1.5 기반 비디오 생성
  • Stable Video Diffusion (SVD): img2vid 전문
  • Hunyuan Video: 텐센트의 오픈소스 비디오 모델

4-5. ComfyUI vs Automatic1111 vs Fooocus 비교

항목ComfyUIAutomatic1111 WebUIFooocus
인터페이스노드 기반 그래프전통적 웹 폼미니멀 (Midjourney 스타일)
학습 곡선높음중간매우 낮음
커스터마이징극한높음 (확장 기능)제한적
메모리 효율최고중간높음
FLUX 지원완전부분적부분적
비디오 생성지원 (AnimateDiff 등)제한적미지원
워크플로우 공유JSON 파일설정 스크린샷프리셋
배치 처리뛰어남기본 지원제한적
API 지원REST API 내장REST API 내장제한적
활발한 개발매우 활발감소 추세활발
추천 대상파워유저, 파이프라인 빌더일반 사용자, 입문자비기술 사용자

ComfyUI는 초기 학습 곡선이 가파르지만, 한번 익히면 다른 도구로는 돌아갈 수 없을 만큼 강력하다. 특히 워크플로우 재현성자동화 가능성은 콘텐츠를 대량 생산해야 하는 크리에이터에게 결정적인 장점이다.

4-6. 필수 커스텀 노드

ComfyUI의 진정한 힘은 커스텀 노드 생태계에서 나온다. 반드시 설치해야 할 핵심 노드를 정리했다.

ComfyUI-Manager

  • 커스텀 노드의 설치, 업데이트, 제거를 GUI에서 관리
  • 워크플로우에서 누락된 노드를 자동 감지하고 설치 제안
  • 모든 ComfyUI 사용자의 필수 노드

WAS Node Suite

  • 이미지 처리, 텍스트 조작, 파일 관리 등 범용 유틸리티 노드 모음
  • 이미지 리사이즈, 크롭, 블렌딩 등 기본 작업에 필수

Impact Pack

  • 감지기(Detector), 세그멘터, 업스케일러 통합
  • SAM(Segment Anything Model) 기반 자동 마스크 생성
  • 얼굴 감지 후 자동 인페인팅 등 고급 워크플로우

Efficiency Nodes

  • 복잡한 노드 조합을 하나의 노드로 압축
  • KSampler, VAE, CLIP 등을 통합한 올인원 노드 제공
  • 워크플로우를 깔끔하게 정리하는 데 유용

AnimateDiff-Evolved

  • AnimateDiff 비디오 생성의 확장 버전
  • 모션 LoRA, 비디오 컨디셔닝, 프레임 제어 등 고급 기능
  • DGX Spark의 128GB 메모리로 긴 비디오 생성 가능

ComfyUI-KJNodes

  • 조건 분기, 반복, 변수 관리 등 프로그래밍적 제어 노드
  • 대량 배치 처리 워크플로우에 필수

5. DGX Spark + ComfyUI 셋업 가이드

DGX Spark에서 ComfyUI를 실행하는 것은 일반 Linux 환경과 크게 다르지 않지만, NVIDIA의 최적화를 활용하면 성능을 극대화할 수 있다. NVIDIA는 공식적으로 DGX Spark에서의 ComfyUI 사용 가이드를 제공하고 있다.

5-1. 설치 방법 A: 네이티브 설치

DGX Spark의 Ubuntu 환경에 직접 설치하는 방법이다.

# 1. Python 가상환경 생성
python3 -m venv ~/comfyui-env
source ~/comfyui-env/bin/activate

# 2. PyTorch (CUDA 12.8) 설치
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128

# 3. ComfyUI 클론
git clone https://github.com/comfyanonymous/ComfyUI.git ~/ComfyUI
cd ~/ComfyUI

# 4. 의존성 설치
pip install -r requirements.txt

# 5. ComfyUI-Manager 설치
cd custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git

# 6. 실행
cd ~/ComfyUI
python main.py --listen 0.0.0.0 --port 8188

--listen 0.0.0.0 옵션을 추가하면 같은 네트워크의 다른 기기에서 브라우저로 접근할 수 있다. 모니터 없이 DGX Spark를 서버처럼 운용하는 경우에 편리하다.

5-2. 설치 방법 B: Docker 컨테이너

NVIDIA NGC(NVIDIA GPU Cloud)의 공식 컨테이너를 사용하면 환경 설정을 한 번에 해결할 수 있다.

# NVIDIA Container Toolkit이 DGX OS에 사전 설치되어 있음

# ComfyUI Docker 실행
docker run -d \
  --gpus all \
  --name comfyui \
  -p 8188:8188 \
  -v ~/comfyui-models:/app/models \
  -v ~/comfyui-output:/app/output \
  ghcr.io/ai-dock/comfyui:latest

# 또는 NVIDIA 공식 이미지 사용
docker run -d \
  --gpus all \
  --name comfyui-nvidia \
  -p 8188:8188 \
  -v ~/models:/workspace/ComfyUI/models \
  nvcr.io/nvidia/comfyui:latest

Docker 방식의 장점은 환경 격리다. 시스템 Python과 충돌 없이 ComfyUI를 실행할 수 있고, 문제가 생기면 컨테이너만 삭제하면 된다.

5-3. 모델 다운로드

ComfyUI에서 사용할 모델을 다운로드해야 한다. DGX Spark의 4TB SSD라면 용량 걱정 없이 다양한 모델을 보관할 수 있다.

# Hugging Face CLI 설치
pip install huggingface_hub

# FLUX.1 Dev 다운로드 (약 24GB)
huggingface-cli download black-forest-labs/FLUX.1-dev \
  --local-dir ~/ComfyUI/models/unet/flux1-dev

# FLUX.1 Schnell 다운로드 (약 24GB)
huggingface-cli download black-forest-labs/FLUX.1-schnell \
  --local-dir ~/ComfyUI/models/unet/flux1-schnell

# SDXL 1.0 다운로드 (약 7GB)
huggingface-cli download stabilityai/stable-diffusion-xl-base-1.0 \
  --local-dir ~/ComfyUI/models/checkpoints/sdxl-base

# VAE, CLIP 인코더 등도 별도 다운로드 필요
huggingface-cli download comfyanonymous/flux_text_encoders \
  --local-dir ~/ComfyUI/models/clip/

5-4. DGX Spark에서의 이미지 생성 성능

DGX Spark에서 각 모델별 이미지 생성 성능을 정리하면 다음과 같다.

모델해상도스텝생성 시간분당 이미지
SD 1.5512x51220약 3-4초약 19장
SDXL 1.01024x102425약 15-20초약 3-4장
FLUX.1 Schnell1024x10244약 25-30초약 2장
FLUX.1 Dev (BF16)1024x102420약 97초약 0.6장
FLUX.2 Klein 9B1024x102420약 60초약 1장
AnimateDiff (16프레임)512x51220약 45초-

SD 1.5는 512x512 해상도에서 약 3-4초, 분당 약 19장이라는 인상적인 속도를 보여준다. 대량 생산에 적합하다.

FLUX.1 Dev는 BF16 전체 정밀도에서 약 97초가 소요된다. FLUX는 12B 파라미터의 거대한 모델이므로 SD 대비 느릴 수밖에 없지만, 출력 품질은 차원이 다르다. FP8 양자화를 적용하면 약 60-70초로 단축할 수 있다.

5-5. 경쟁 하드웨어 대비 성능

DGX Spark의 이미지 생성 성능을 다른 하드웨어와 비교하면 다음과 같다.

하드웨어SD 1.5 (512x512)FLUX.1 Dev (1024x1024)
DGX Spark약 3-4초약 97초
AMD Ryzen AI Max 395약 7-9초약 220초
RTX 4090약 1.5-2초약 40-50초
RTX 5090약 0.8-1초약 20-25초
Mac Studio M4 Ultra약 5-6초약 80-90초

DGX Spark는 AMD Ryzen AI Max 395 대비 약 2.3배 빠르다. RTX 4090/5090에 비해서는 느리지만, 이들은 32GB VRAM이라는 한계 때문에 FLUX의 전체 정밀도 실행이 어렵다. DGX Spark의 128GB는 어떤 모델이든 양자화 없이 원본 품질로 실행할 수 있다는 근본적인 차이가 있다.


6. LLM + ComfyUI 파이프라인: AI가 AI를 위한 프롬프트를 생성

DGX Spark의 128GB 통합 메모리가 진정으로 빛나는 순간은 LLM과 이미지 생성 모델을 동시에 실행할 때다. LLM이 상세한 프롬프트를 작성하고, 그 프롬프트로 FLUX/SDXL이 이미지를 생성하는 완전 자동화 파이프라인을 구축할 수 있다.

6-1. 왜 LLM 프롬프트 생성이 중요한가

FLUX나 SDXL로 고품질 이미지를 생성하려면 상세하고 구조화된 프롬프트가 필요하다. 예를 들어 "고양이 그림"이라는 단순한 프롬프트보다는 다음과 같은 상세 프롬프트가 훨씬 좋은 결과를 만든다.

A majestic orange tabby cat sitting on a velvet cushion,
golden hour lighting streaming through a Victorian window,
shallow depth of field, bokeh background,
photorealistic, 8k resolution, masterpiece quality,
shot on Hasselblad H6D-100c, f/1.4 aperture

이런 프롬프트를 매번 직접 작성하는 것은 시간도 걸리고 전문 지식도 필요하다. 여기서 LLM이 등장한다. 간단한 지시만 주면 LLM이 최적화된 프롬프트를 자동으로 생성해주는 것이다.

6-2. Ollama + ComfyUI 연동

DGX Spark에서 Ollama로 LLM을 실행하고, ComfyUI에서 이를 호출하는 방법이다.

Step 1: Ollama에서 프롬프트 생성 전용 모델 실행

# 프롬프트 생성에 적합한 모델 선택
ollama pull llama3.1:70b

# 시스템 프롬프트를 포함한 모델 파일 생성
cat > ~/Modelfile << 'HEREDOC'
FROM llama3.1:70b
SYSTEM """You are an expert AI image prompt engineer.
When given a simple description, you create detailed,
high-quality prompts for FLUX/Stable Diffusion.
Include artistic style, lighting, camera settings,
and quality modifiers. Output ONLY the prompt."""
HEREDOC

ollama create flux-prompter -f ~/Modelfile

Step 2: ComfyUI에서 LLM 노드 활용

ComfyUI에는 로컬 LLM을 직접 호출할 수 있는 커스텀 노드가 있다.

6-3. ComfyUI_LocalLLMNodes

ComfyUI_LocalLLMNodes는 Ollama, LM Studio 등 로컬 LLM을 ComfyUI 워크플로우에 직접 통합하는 노드 팩이다.

# 설치
cd ~/ComfyUI/custom_nodes
git clone https://github.com/xXAdonisXx/ComfyUI_LocalLLMNodes.git
pip install -r ComfyUI_LocalLLMNodes/requirements.txt

이 노드를 사용하면 다음과 같은 워크플로우를 구성할 수 있다.

[Simple Text Input][LocalLLM Node (Ollama)][CLIP Text Encode][KSampler][Save Image]
    "귀여운 고양이""detailed FLUX prompt"  →     이미지 생성

사용자가 "귀여운 고양이"라고만 입력하면, LLM이 자동으로 FLUX에 최적화된 상세 프롬프트를 생성하고, 그 프롬프트로 이미지가 만들어진다.

6-4. ComfyUI-IF_AI_tools

ComfyUI-IF_AI_tools는 Ollama를 ComfyUI에 통합하는 또 다른 강력한 도구다.

주요 기능:

  • Ollama API 직접 호출
  • 시스템 프롬프트 커스터마이징
  • 멀티턴 대화 지원 (프롬프트 반복 개선)
  • 이미지 분석 (비전 모델 활용)
  • 프롬프트 히스토리 관리
cd ~/ComfyUI/custom_nodes
git clone https://github.com/if-ai/ComfyUI-IF_AI_tools.git
pip install -r ComfyUI-IF_AI_tools/requirements.txt

6-5. 128GB 통합 메모리의 진정한 가치

여기서 DGX Spark의 128GB 통합 메모리가 결정적인 역할을 한다. 일반 GPU에서는 LLM과 이미지 생성 모델을 동시에 VRAM에 올릴 수 없다.

구성VRAM 요구량RTX 4090 (24GB)DGX Spark (128GB)
Llama 3.1 70B (FP8)약 70GB불가가능
FLUX.1 Dev (BF16)약 24GB단독 사용 시 가능가능
70B LLM + FLUX 동시약 94GB불가가능
70B LLM + SDXL 동시약 77GB불가가능

DGX Spark에서는 70B LLM과 FLUX를 동시에 메모리에 올려놓고, 모델 스왑 없이 즉시 전환할 수 있다. 이는 자동화 파이프라인의 처리량을 크게 향상시킨다.

6-6. 완전 자동화 워크플로우

최종적으로 구현할 수 있는 파이프라인은 다음과 같다.

1. [사용자 입력] "블로그 썸네일: AI 기술 트렌드"
2. [LLM - Llama 3.1 70B] 상세 이미지 프롬프트 생성
3. [FLUX.1 Dev] 1024x1024 이미지 생성
4. [업스케일러 - RealESRGAN] 4096x4096으로 확대
5. [텍스트 오버레이] 제목 텍스트 합성
6. [자동 저장] 블로그 디렉토리에 저장

이 모든 과정이 ComfyUI의 노드 그래프 안에서 자동으로 실행된다. 한 번 워크플로우를 구성해두면, 이후에는 간단한 지시만 입력하면 완성된 블로그 썸네일이 자동으로 생성되는 것이다.

6-7. Python 스크립트를 통한 배치 자동화

ComfyUI의 REST API를 활용하면 Python 스크립트로 대량 이미지를 자동 생성할 수 있다.

import requests
import json

COMFYUI_URL = "http://localhost:8188"
OLLAMA_URL = "http://localhost:11434"

def generate_prompt(simple_description):
    """Ollama로 상세 이미지 프롬프트 생성"""
    response = requests.post(
        f"{OLLAMA_URL}/api/generate",
        json={
            "model": "flux-prompter",
            "prompt": simple_description,
            "stream": False
        }
    )
    return response.json()["response"]

def queue_image(prompt, workflow_json):
    """ComfyUI에 이미지 생성 요청"""
    workflow = json.load(open(workflow_json))
    # 프롬프트 노드에 텍스트 주입
    workflow["6"]["inputs"]["text"] = prompt
    response = requests.post(
        f"{COMFYUI_URL}/prompt",
        json={"prompt": workflow}
    )
    return response.json()

# 배치 생성 예시
topics = [
    "AI 기술 트렌드 2026",
    "클라우드 네이티브 아키텍처",
    "사이버 보안 최신 동향",
    "양자 컴퓨팅의 미래",
]

for topic in topics:
    detailed_prompt = generate_prompt(
        f"블로그 썸네일: {topic}"
    )
    print(f"생성 프롬프트: {detailed_prompt[:100]}...")
    queue_image(detailed_prompt, "workflow_flux.json")

7. 콘텐츠 크리에이터를 위한 실전 활용법

DGX Spark + ComfyUI 조합이 실제 콘텐츠 제작에 어떻게 활용되는지 구체적인 시나리오를 살펴보자.

7-1. 블로그 썸네일 자동 생성

기술 블로그를 운영하는 개발자에게 썸네일 제작은 항상 골칫거리다. DGX Spark에서는 이 과정을 완전히 자동화할 수 있다.

워크플로우 구성:

  1. 블로그 제목을 입력으로 받는다
  2. LLM이 제목을 분석하여 시각적 메타포를 생성한다
  3. FLUX가 1024x1024 이미지를 생성한다
  4. RealESRGAN으로 2048x2048 업스케일한다
  5. 16:9 비율로 크롭한다 (1920x1080)
  6. 블로그 에셋 폴더에 자동 저장한다

실전 팁:

  • FLUX.1 Schnell을 사용하면 4스텝으로 빠르게 생성 가능
  • 일관된 스타일을 위해 LoRA를 학습하거나 스타일 프롬프트를 고정
  • ComfyUI의 배치 노드로 한 번에 10-20개 변형 생성 후 선택

7-2. 소셜 미디어 이미지 대량 생산

인스타그램, 트위터, 링크드인 등 각 플랫폼에 맞는 이미지를 대량으로 생산할 수 있다.

플랫폼별 최적 해상도:

  • 인스타그램 피드: 1080x1080 (정사각형)
  • 인스타그램 스토리: 1080x1920 (세로)
  • 트위터: 1200x675 (16:9)
  • 링크드인: 1200x627
  • 유튜브 썸네일: 1280x720

ComfyUI에서 해상도별 워크플로우를 미리 만들어두면, 하나의 프롬프트로 모든 플랫폼용 이미지를 동시에 생성할 수 있다.

7-3. 유튜브 콘텐츠 제작

썸네일 생성:

  • 클릭을 유도하는 임팩트 있는 이미지 생성
  • ControlNet으로 특정 레이아웃 유지 (텍스트 영역 확보)
  • 일관된 채널 브랜딩 적용

영상 소스 이미지:

  • 설명 영상에 사용할 일러스트레이션 생성
  • 인트로/아웃트로 배경 이미지
  • AnimateDiff로 짧은 모션 그래픽 생성

실전 파이프라인:

  1. 영상 스크립트를 LLM에 입력
  2. LLM이 장면별 이미지 프롬프트 생성
  3. FLUX/SDXL로 각 장면 이미지 생성
  4. AnimateDiff로 미세한 움직임 추가
  5. 편집 소프트웨어로 최종 조합

7-4. 프레젠테이션 비주얼

발표 자료에 사용할 고품질 비주얼을 AI로 생성하면 스톡 이미지의 진부함에서 벗어날 수 있다.

활용 사례:

  • 추상적 개념의 시각화 (예: "마이크로서비스 아키텍처"를 도시 풍경으로 표현)
  • 커스텀 아이콘 및 일러스트레이션
  • 배경 이미지 (그라데이션, 패턴, 텍스처)
  • 비유적 이미지 (예: "기술 부채"를 무너지는 카드 탑으로)

7-5. 프로토타입 UI 목업

FLUX의 높은 이미지 품질을 활용하면 UI/UX 프로토타이핑에도 사용할 수 있다.

워크플로우:

  1. 와이어프레임 스케치를 ControlNet 입력으로 사용
  2. FLUX가 사실적인 UI 목업 생성
  3. 다양한 컬러 스킴과 스타일 변형 빠르게 탐색
  4. 클라이언트 프레젠테이션용 비주얼 제작

물론 실제 구현에 사용할 코드를 생성하는 것은 아니지만, 아이디어를 빠르게 시각화하고 피드백을 받는 데 매우 효과적이다.


8. 비용 분석: 클라우드 API vs 로컬 DGX Spark

DGX Spark에 3,999달러를 투자하는 것이 과연 합리적인가? 클라우드 API 비용과 비교하여 손익분기점을 계산해 보자.

8-1. 비용 비교표

항목클라우드 APIDGX Spark 로컬
초기 비용0달러3,999달러
월 운영비200-500달러약 10-15달러 (전기)
이미지 생성 단가0.004-0.015달러/장0달러 (전기만)
LLM 토큰 비용0.40-15달러/백만 토큰0달러 (전기만)
데이터 프라이버시제한적완전 보장
가용성서버 상태 의존24/7 로컬
속도 제한API 레이트 리밋무제한
손익분기점-약 8-20개월

8-2. 시나리오별 손익분기 계산

시나리오 A: LLM 중심 사용자 (개발자/연구자)

월 사용량 가정:

  • GPT-4급 모델 API: 월 500만 토큰 (입력 300만 + 출력 200만)
  • 월 비용: 약 80-150달러 (GPT-4o 기준)

손익분기: 3,999달러 / 100달러 = 약 40개월

하지만 로컬에서는 70B 오픈소스 모델을 무제한으로 사용할 수 있으므로, 실험과 반복의 자유도가 크게 높아진다. 클라우드 API에서는 비용 걱정 때문에 자제하던 대량 실험을 마음껏 할 수 있다.

시나리오 B: 이미지 생성 중심 사용자 (콘텐츠 크리에이터)

월 사용량 가정:

  • DALL-E 3 / Midjourney: 월 500장 생성
  • 월 비용: Midjourney Pro 60달러 + 추가 생성 50달러 = 약 110달러

손익분기: 3,999달러 / 110달러 = 약 36개월

그러나 로컬에서는 생성량 제한이 없고, FLUX/SDXL의 LoRA 파인튜닝으로 자신만의 스타일을 만들 수 있다.

시나리오 C: LLM + 이미지 복합 사용자 (파워 유저)

월 사용량 가정:

  • LLM API: 월 200달러
  • 이미지 생성 API: 월 100달러
  • 합계: 월 300달러

손익분기: 3,999달러 / 300달러 = 약 13개월

파워 유저의 경우 약 1년이면 손익분기를 넘기고, 이후에는 전기료만으로 무제한 AI를 사용할 수 있다.

8-3. 전기 비용 상세

DGX Spark의 TDP는 240W이다. 실제 사용 시 평균 소비전력은 부하에 따라 다르다.

상태소비전력24시간 전기비 (한국 기준)
유휴 상태약 30-50W약 120-200원
LLM 추론약 150-200W약 600-800원
이미지 생성 (풀로드)약 200-240W약 800-960원
24시간 풀로드 (한 달)240W약 29,000원

한국 전기요금 기준(kWh당 약 120-160원)으로 계산하면, 24시간 풀로드로 돌려도 월 3만 원 미만이다. 일반적인 사용 패턴(하루 8-10시간 활성 사용)에서는 월 1-1.5만 원 수준이다.

8-4. 숨겨진 비용과 가치

단순 금액 비교 외에 고려해야 할 요소들이 있다.

로컬의 추가 가치:

  • 데이터 프라이버시: 민감한 데이터가 외부 서버로 전송되지 않는다
  • 오프라인 사용: 인터넷 없이도 AI를 사용할 수 있다
  • 레이턴시: API 호출의 네트워크 지연 없이 즉시 응답
  • 학습 기회: 모델 내부를 직접 탐구하고 실험할 수 있다
  • 파인튜닝: 자신만의 데이터로 모델을 커스터마이징할 수 있다

로컬의 추가 비용:

  • 초기 학습 시간 (환경 설정, 모델 최적화 등)
  • 유지보수 (드라이버 업데이트, 호환성 문제)
  • 기회비용 (최신 클라우드 모델 즉시 사용 불가)

9. DGX Spark vs DGX Station: 누구를 위한 것인가

NVIDIA는 DGX Spark 외에 DGX Station이라는 상위 모델도 함께 발표했다. 두 제품의 포지셔닝은 명확히 다르다.

9-1. 스펙 비교

항목DGX SparkDGX Station
AI 성능1 PFLOP (FP4)20 PFLOP (FP4)
GPUGB10 (1x Blackwell)GB300 (1x Grace + 2x Blackwell)
메모리128GB LPDDR5X784GB (128GB CPU + 2x 288GB HBM3e + 2x 40GB LPDDR5X)
메모리 대역폭273 GB/s약 16 TB/s (HBM3e)
가격3,999달러미발표 (추정 5만 달러 이상)
폼팩터Mac Mini급타워형 워크스테이션
전력240W약 800W 이상
타겟 사용자개인 개발자, 소규모 팀기업 연구소, 대규모 팀

9-2. DGX Station의 차원이 다른 성능

DGX Station의 20 PFLOP는 DGX Spark의 20배다. 784GB 메모리는 가장 큰 오픈소스 모델인 Llama 3.1 405B를 FP16 전체 정밀도로 실행할 수 있는 수준이다. HBM3e 메모리의 약 16 TB/s 대역폭은 DGX Spark의 60배에 달하며, 이는 대형 모델의 추론 속도에서 압도적인 차이를 만든다.

9-3. 누구를 위한 것인가

DGX Spark가 적합한 사용자:

  • AI/ML을 공부하는 학생 및 연구자
  • 개인 프로젝트로 LLM 파인튜닝을 하는 개발자
  • ComfyUI로 이미지/비디오 콘텐츠를 만드는 크리에이터
  • AI 프로토타이핑을 하는 스타트업 (1-3명)
  • 데이터 프라이버시가 중요한 개인 사용자

DGX Station이 적합한 사용자:

  • 기업 AI 연구팀 (5-20명 공유)
  • 대규모 모델 학습이 필요한 연구소
  • 프로덕션 AI 서비스를 로컬에서 운영하는 기업
  • 복수의 대형 모델을 동시에 서빙해야 하는 환경
  • 예산이 충분한 조직

대부분의 개인 개발자와 소규모 팀에게 DGX Spark는 가격 대비 최적의 선택이다. DGX Station은 "사고 싶다"가 아니라 "사야 한다"는 명확한 업무 요구가 있을 때 고려할 제품이다.


실전 퀴즈

지금까지 다룬 내용을 점검해 보자. 각 문제를 풀어보고, 정답을 확인하자.

Q1. DGX Spark의 통합 메모리 용량과 대역폭은?

정답: 128GB LPDDR5X, 273 GB/s

DGX Spark의 GB10 Grace Blackwell Superchip에는 128GB LPDDR5X 통합 메모리가 탑재되어 있으며, 273 GB/s의 대역폭을 제공한다. CPU와 GPU가 동일한 메모리 풀을 공유하므로 별도의 VRAM 제약이 없다. 이를 통해 단일 장치에서 200B 파라미터 모델까지 실행할 수 있다.

Q2. DGX Spark, Mac Studio M4 Ultra, RTX 5090 중 LLM 디코딩 속도가 가장 빠른 것은?

정답: RTX 5090 (단, 32GB 이내 모델에 한함)

LLM 디코딩은 메모리 대역폭에 비례한다. RTX 5090의 1,792 GB/s는 DGX Spark(273 GB/s)의 약 6.5배, Mac Studio(819 GB/s)의 약 2.2배이다. 하지만 RTX 5090은 32GB VRAM이라는 제한이 있어 소형 모델에서만 이 속도를 발휘할 수 있다. 70B 이상 대형 모델에서는 실행 자체가 불가능하다.

Q3. ComfyUI가 Automatic1111 WebUI 대비 가지는 핵심 장점 2가지는?

정답: 효율적 재실행(변경된 노드만 재계산)과 극한의 커스터마이징(노드 기반 비주얼 프로그래밍)

ComfyUI는 변경된 노드만 다시 계산하므로, 프롬프트만 수정하면 모델 로딩을 건너뛴다. 또한 노드 기반 인터페이스로 어떤 파이프라인이든 자유롭게 구성할 수 있어, Automatic1111의 고정된 UI 구조에서는 불가능한 복잡한 워크플로우를 만들 수 있다.

Q4. DGX Spark에서 LLM과 FLUX를 동시에 실행할 수 있는 이유는?

정답: 128GB 통합 메모리 덕분에 두 모델을 동시에 메모리에 적재할 수 있다

Llama 3.1 70B (FP8)는 약 70GB, FLUX.1 Dev (BF16)는 약 24GB의 메모리를 요구한다. 합계 약 94GB로, DGX Spark의 128GB 안에 충분히 들어간다. RTX 4090(24GB)에서는 둘 중 하나만 실행 가능하지만, DGX Spark에서는 모델 스왑 없이 즉시 전환하며 LLM 프롬프트 생성과 이미지 생성을 연속 처리할 수 있다.

Q5. DGX Spark의 월 300달러 클라우드 비용 대비 손익분기 시점은?

정답: 약 13개월

DGX Spark 가격 3,999달러를 월 절감액 300달러로 나누면 약 13.3개월이다. 전기 비용(월 1-1.5만 원)을 고려해도 약 14-15개월이면 손익분기를 넘긴다. 이후에는 전기료만으로 무제한 AI를 사용할 수 있으므로, 파워 유저일수록 로컬 투자의 경제성이 높아진다.


참고 자료

  1. NVIDIA DGX Spark 공식 페이지 - DGX Spark 제품 정보 및 스펙
  2. NVIDIA GTC 2025 키노트 - 젠슨 황 CEO 발표 영상
  3. NVIDIA DGX Spark 기술 블로그 - 개발자 가이드 및 벤치마크
  4. NVIDIA Build - DGX Spark ComfyUI 가이드 - 공식 ComfyUI 셋업 가이드
  5. ComfyUI GitHub - ComfyUI 소스 코드 및 문서
  6. ComfyUI Desktop 릴리즈 - Desktop 앱 다운로드
  7. ComfyUI-Manager - 커스텀 노드 관리 도구
  8. FLUX.1 모델 (Black Forest Labs) - FLUX 모델 다운로드
  9. Ollama 공식 사이트 - 로컬 LLM 실행 도구
  10. ComfyUI_LocalLLMNodes - ComfyUI LLM 통합 노드
  11. ComfyUI-IF_AI_tools - Ollama/ComfyUI 통합 도구
  12. AnimateDiff-Evolved - 비디오 생성 노드
  13. EAGLE3 추측적 디코딩 논문 - 추측적 디코딩 기술 상세
  14. SGLang GitHub - 고성능 LLM 서빙 프레임워크
  15. NVIDIA TensorRT-LLM - NVIDIA 공식 LLM 최적화 엔진
  16. Stable Diffusion XL (Stability AI) - SDXL 모델
  17. GB10 Grace Blackwell Superchip 아키텍처 - GB10 기술 상세

AI Supercomputer at Home: Study LLMs on NVIDIA DGX Spark and Create Content with ComfyUI

Introduction: The Personal AI Supercomputer Era Has Arrived

For the past several years, running serious LLMs and generative image models has meant one of two things: renting cloud GPUs by the hour or building an expensive multi-GPU rig in your home. At GTC 2025, NVIDIA fundamentally changed that equation. Jensen Huang walked on stage and introduced DGX Spark — a compact desktop machine with 128 GB of unified memory, a Grace Blackwell chip, and a price tag of just 3,999 USD. For the first time, a single device that fits on your desk can run 200-billion-parameter language models without quantization hacks.

Simultaneously, the open-source image generation ecosystem has matured around ComfyUI — a node-based workflow tool that has become the de facto standard for Stable Diffusion, SDXL, and FLUX image generation. Combine the two, and you have a self-contained content creation pipeline: an LLM generates prompts, and an image model produces the visuals, all running locally with zero API costs and complete data privacy.

This post is a deep technical dive into both systems. We will cover DGX Spark hardware specs, benchmark every competing platform, walk through ComfyUI from installation to advanced workflows, connect the two into an automated pipeline, and close with a full cost analysis proving when local hardware beats cloud APIs. If you have ever considered buying dedicated AI hardware, this is the guide you need.


1. DGX Spark: Birth of the Personal AI Supercomputer

1.1 What Was Announced at GTC 2025

At the GTC 2025 keynote on March 18, 2025, Jensen Huang unveiled two new products aimed squarely at individual developers, researchers, and small teams:

  • DGX Spark — A compact desktop AI system starting at 3,999 USD
  • DGX Station — A workstation-class system starting at 24,999 USD

Both are built on the Grace Blackwell architecture, combining an ARM-based Grace CPU with a Blackwell GPU on a single chip connected via NVLink-C2C. This unified memory architecture is the key innovation: CPU and GPU share the same physical memory pool, eliminating the PCIe bottleneck that has constrained AI workloads on traditional desktop setups for years.

1.2 DGX Spark Hardware Specifications

SpecificationDGX Spark
GPUNVIDIA Blackwell GPU
CPUNVIDIA Grace (ARM-based, 20 cores)
Unified Memory128 GB LPDDR5X
Memory Bandwidth273 GB/s (NVLink-C2C)
AI Performance (FP4)1,000 TOPS
StorageUp to 4 TB NVMe SSD
Connectivity2x USB-C (Thunderbolt), 2x USB-A, 1x DisplayPort, Wi-Fi 7
NetworkingConnectX-7 (up to 400Gb/s)
Operating SystemNVIDIA DGX OS (Ubuntu-based Linux)
Form FactorCompact desktop (Mac Mini-like)
PriceStarting at 3,999 USD
AvailabilityMay 2025 (via nvidia.com, Media Markt, select partners)

1.3 Why 128 GB Unified Memory Changes Everything

The single most important number on that spec sheet is 128 GB. Here is why.

A 70-billion-parameter model in FP16 requires approximately 140 GB of memory. On a traditional GPU setup, you would need at least two RTX 4090 cards (2 x 24 GB = 48 GB), still not enough — so you would resort to 4-bit quantization (about 35 GB) or offload layers to system RAM over the PCIe bus, tanking performance.

DGX Spark's 128 GB unified memory means:

  • Llama 3.1 70B fits entirely in memory at FP16 — no quantization needed
  • Llama 3.1 405B can be run with 4-bit quantization (about 105 GB)
  • 200B-parameter models like DBRX or Falcon-180B are directly loadable
  • No PCIe bottleneck — CPU and GPU share memory via NVLink-C2C at 273 GB/s

For LLM researchers, this is transformative. You can experiment with full-precision weights on a machine that sits on your desk and draws less power than a gaming PC.

1.4 Target Audience

NVIDIA positions DGX Spark for:

  • AI developers and researchers who want to prototype and fine-tune models locally
  • Data scientists running inference on large models without cloud dependency
  • Students and educators studying deep learning with real hardware
  • Content creators who want local image/video generation pipelines
  • Enterprises deploying edge AI or on-premise inference nodes

The key selling point: sovereignty over your data and compute. No API keys, no rate limits, no per-token billing.


2. Deep Spec Comparison: DGX Spark vs Mac Studio M4 Ultra vs RTX 5090

Choosing an AI workstation in 2025 means comparing three fundamentally different architectures. Let us put them side by side.

2.1 Hardware Comparison Table

SpecDGX SparkMac Studio M4 UltraRTX 5090 (Desktop GPU)
ArchitectureGrace Blackwell (ARM + Blackwell)Apple M4 UltraAda Lovelace Next (Blackwell)
CPUGrace 20-core ARM32-core Apple SiliconRequires separate CPU
GPU CoresBlackwell CUDA cores80-core Apple GPU21,760 CUDA cores
Memory128 GB LPDDR5X (unified)192 GB (unified)32 GB GDDR7
Memory Bandwidth273 GB/s (NVLink-C2C)819 GB/s1,792 GB/s
AI Perf (INT8/FP4)1,000 TOPS (FP4)~56 TOPS (Neural Engine)3,352 TOPS (FP4)
Max Model (FP16)approx. 60B paramsapprox. 90B paramsapprox. 15B params
Max Model (Q4)approx. 200B+ paramsapprox. 300B+ paramsapprox. 50B params
TDPapprox. 200W (est.)approx. 295W (system)575W (GPU only)
OSDGX OS (Linux)macOSWindows/Linux
CUDA SupportYes (native)NoYes (native)
Price3,999 USD5,999 USD (192 GB config)1,999 USD (GPU only)

2.2 Analysis: Who Wins Where?

DGX Spark wins on:

  • CUDA ecosystem compatibility (PyTorch, TensorFlow, TensorRT, vLLM all work natively)
  • AI-specific performance per dollar (1,000 TOPS at 3,999 USD)
  • NVLink-C2C unified memory (purpose-built for AI, unlike PCIe)
  • Complete system in a box (no separate CPU, motherboard, or PSU needed)
  • NVIDIA software stack (DGX OS, NGC containers, NVIDIA AI Enterprise)

Mac Studio M4 Ultra wins on:

  • Raw memory capacity (192 GB beats 128 GB for huge models)
  • Memory bandwidth (819 GB/s vs 273 GB/s)
  • macOS ecosystem and general-purpose productivity
  • Display output and creative software (Final Cut, Logic Pro)
  • Silence and thermal design

RTX 5090 wins on:

  • Raw GPU compute (3,352 TOPS FP4 — over 3x DGX Spark)
  • Memory bandwidth (1,792 GB/s — fastest of all three)
  • Image generation speed (dominant for Stable Diffusion and FLUX)
  • Gaming capability (a factor for some buyers)
  • Lowest entry price for the GPU alone

The critical tradeoff: The RTX 5090 is the fastest GPU on paper, but its 32 GB memory ceiling means large LLMs simply do not fit. The Mac Studio has the most memory, but lacks CUDA — a dealbreaker for most AI tooling. DGX Spark occupies the sweet spot: enough memory for 200B-class models, native CUDA, and an all-in-one form factor.

2.3 The Memory Wall Problem

Here is a concrete example of why memory matters more than raw FLOPS for LLM inference:

Model: Llama 3.1 70B (FP16, ~140 GB)

RTX 5090 (32 GB GDDR7):
  - Cannot load. Must quantize to Q4 (~35 GB).
  - Q4 inference speed: ~30 tok/s
  - Quality: degraded (4-bit quantization artifacts)

Mac Studio M4 Ultra (192 GB unified):
  - Loads fully at FP16.
  - Inference speed: ~15 tok/s (limited by MLX matmul performance)
  - Quality: full precision, but no CUDA ecosystem

DGX Spark (128 GB unified):
  - Loads at Q8 (~70 GB) or BF16 with some offloading strategy
  - Inference speed: ~2.7 tok/s at 70B (official benchmark)
  - Quality: high precision, full CUDA stack

The memory bandwidth difference is significant: the RTX 5090 moves data at 1,792 GB/s but only has 32 GB to work with. DGX Spark moves data at 273 GB/s but can hold 4x the model. For large-model inference, capacity almost always wins over bandwidth.


3. Running LLMs on DGX Spark

3.1 Software Stack

DGX Spark ships with DGX OS, an Ubuntu-based Linux distribution optimized for AI workloads. The software stack includes:

  • NVIDIA AI Enterprise runtime and tools
  • NGC Container Registry access (pre-built Docker images for every major framework)
  • CUDA Toolkit (latest version, pre-installed)
  • cuDNN, TensorRT, TensorRT-LLM for optimized inference
  • NeMo Framework for training and fine-tuning
  • Ollama support for easy LLM deployment

3.2 Ollama on DGX Spark

Ollama is the simplest way to run LLMs locally. On DGX Spark, the installation is straightforward:

# Install Ollama (if not pre-installed)
curl -fsSL https://ollama.com/install.sh | sh

# Pull and run models
ollama pull llama3.1:70b
ollama pull deepseek-r1:70b
ollama pull qwen2.5:72b

# Run interactively
ollama run llama3.1:70b

# Start the API server
ollama serve
# API is now available at http://localhost:11434

With 128 GB of unified memory, DGX Spark can load models that would be impossible on any single consumer GPU:

Models that fit in 128 GB unified memory:
- Llama 3.1 8B (FP16):    ~16 GB- Llama 3.1 70B (Q8):     ~70 GB- Llama 3.1 70B (FP16):   ~140 GB  (needs offloading)
- DeepSeek-R1 70B (Q4):   ~40 GB- Qwen 2.5 72B (Q4):      ~40 GB- Mixtral 8x22B (Q4):     ~80 GB- Llama 3.1 405B (Q4):    ~105 GB- DBRX 132B (Q4):         ~70 GB

3.3 Official Benchmarks

NVIDIA published these inference benchmarks for DGX Spark:

ModelPrecisionTokens/secNotes
GPT-OSS 20BFP449.7 tok/sFast enough for real-time chat
Llama 3.1 8BFP1620.5 tok/sComfortable interactive speed
Llama 3.1 70BQ42.7 tok/sUsable for batch tasks, slow for chat
Nemotron 70BQ42.5 tok/sSimilar to Llama 70B

Interpreting these numbers:

  • 49.7 tok/s for a 20B model is excellent. That is faster than reading speed, making real-time chat applications smooth and responsive.
  • 20.5 tok/s for Llama 8B is competitive with an RTX 4090 running the same model. For most coding assistants and chatbot applications, 8B models are the practical choice, and this speed is more than adequate.
  • 2.7 tok/s for Llama 70B is slow for interactive use but perfectly acceptable for batch processing — generating summaries, translating documents, or creating training data overnight.

3.4 Comparison: DGX Spark vs Other Platforms for LLM Inference

Model / PlatformDGX SparkRTX 4090 (24GB)RTX 5090 (32GB)Mac Studio M4 Ultra
Llama 8B (FP16)20.5 tok/s55 tok/s~80 tok/s~25 tok/s
Llama 70B (Q4)2.7 tok/s~8 tok/s (offload)~15 tok/s~10 tok/s
Llama 70B (FP16)loadableimpossibleimpossible~8 tok/s
200B+ modelsyes (Q4)nonoyes (Q4)

The pattern is clear: DGX Spark is not the fastest for small models (consumer GPUs with higher bandwidth win there), but it can load models that consumer GPUs physically cannot. For anyone working with 70B+ parameter models, DGX Spark opens a door that was previously closed.

3.5 TensorRT-LLM for Maximum Performance

For production-grade inference, TensorRT-LLM provides significant speedups over standard PyTorch or Ollama:

# Pull the TensorRT-LLM container from NGC
docker pull nvcr.io/nvidia/tensorrt-llm:latest

# Convert a Hugging Face model to TensorRT-LLM format
python convert_checkpoint.py \
  --model_dir ./llama-3.1-8b \
  --output_dir ./llama-3.1-8b-trtllm \
  --dtype float16

# Build the TensorRT engine
trtllm-build \
  --checkpoint_dir ./llama-3.1-8b-trtllm \
  --output_dir ./llama-3.1-8b-engine \
  --gemm_plugin float16

# Run inference
python run.py \
  --engine_dir ./llama-3.1-8b-engine \
  --max_output_len 512 \
  --tokenizer_dir ./llama-3.1-8b \
  --input_text "Explain the transformer architecture in detail."

TensorRT-LLM typically achieves 1.5x to 3x speedup over vanilla inference by fusing operations, optimizing memory access patterns, and leveraging Blackwell-specific features like FP4 compute.


4. ComfyUI Deep Dive: The Node-Based Image Generation Powerhouse

4.1 What Is ComfyUI?

ComfyUI is an open-source, node-based graphical interface for running diffusion models. Unlike simpler GUIs such as Automatic1111's Web UI or Fooocus, ComfyUI exposes the entire generation pipeline as a visual graph. Every component — model loading, CLIP text encoding, KSampler configuration, VAE decoding — becomes a draggable node that you wire together.

This design philosophy has several consequences:

  • Total transparency — You see exactly what happens at every step
  • Maximum flexibility — Any component can be swapped, duplicated, or rerouted
  • Reproducibility — Workflows can be saved as JSON and shared exactly
  • Extensibility — Custom nodes can add entirely new capabilities

ComfyUI has become the standard tool for serious image generation work. Professional studios, indie game developers, and AI art creators have converged on it because nothing else offers the same combination of power and control.

4.2 ComfyUI Desktop App

In late 2024, the ComfyUI team released an official desktop application that dramatically simplifies installation:

Installation (Windows/macOS/Linux):

  1. Download the installer from the official ComfyUI website
  2. Run the installer — it bundles Python, PyTorch, and all dependencies
  3. Launch the app — it opens a local web UI in a dedicated window
  4. Model files go into the models/ directory within the ComfyUI installation
ComfyUI Desktop directory structure:
ComfyUI/
  comfyui-core/           # Core engine
  models/
    checkpoints/          # Base models (SD 1.5, SDXL, FLUX)
    loras/                # LoRA adapters
    vae/                  # VAE decoders
    clip/                 # CLIP text encoders
    controlnet/           # ControlNet models
    upscale_models/       # Upscaler models
  custom_nodes/           # Third-party node packages
  output/                 # Generated images
  input/                  # Input images for img2img

The desktop app handles Python environment isolation, CUDA/ROCm detection, and automatic updates. For users who previously struggled with manual Python installations, this is a significant quality-of-life improvement.

4.3 Core Node Types

Understanding ComfyUI requires understanding its fundamental node categories:

Model Loading Nodes:

  • CheckpointLoaderSimple — Loads a .safetensors checkpoint (SD 1.5, SDXL, FLUX)
  • LoraLoader — Applies LoRA weights to a loaded model
  • CLIPLoader — Loads a CLIP text encoder separately
  • VAELoader — Loads a VAE decoder separately

Conditioning Nodes:

  • CLIPTextEncode — Converts text prompts into conditioning vectors
  • ConditioningCombine — Merges multiple conditioning inputs
  • ConditioningSetArea — Applies conditioning to specific image regions

Sampling Nodes:

  • KSampler — The core sampling node (scheduler, steps, CFG scale, seed)
  • KSamplerAdvanced — Adds start/end step control for multi-pass generation
  • SamplerCustom — Full control over noise scheduling

Image Nodes:

  • VAEDecode — Converts latent representations to pixel images
  • VAEEncode — Converts pixel images to latent representations
  • SaveImage — Saves output to disk
  • PreviewImage — Displays output in the UI without saving

ControlNet Nodes:

  • ControlNetLoader — Loads a ControlNet model
  • ControlNetApply — Applies ControlNet conditioning to the pipeline

4.4 Supported Models and Comparison

ModelParametersVRAM (FP16)ResolutionQualitySpeed (RTX 4090)
Stable Diffusion 1.5860M~4 GB512x512Good~19 img/min
Stable Diffusion XL3.5B~7 GB1024x1024Very Good~6 img/min
FLUX.1 Dev12B~24 GBup to 2048x2048Excellent~0.6 img/min
FLUX.1 Schnell12B~24 GBup to 2048x2048Very Good~2 img/min
Stable Diffusion 3.58B~16 GB1024x1024Excellent~3 img/min

DGX Spark benchmarks for image generation:

ModelResolutionTime per ImageNotes
SD 1.5512x512~3.2 sec19 images/min
SDXL1024x1024~12 sec5 images/min
FLUX.1 Dev1024x1024~97 secFits fully in 128 GB memory
FLUX.1 Schnell1024x1024~35 secDistilled version, fewer steps

The key advantage of DGX Spark for image generation is not raw speed — an RTX 5090 will produce images faster. The advantage is model loading capacity. FLUX.1 Dev at FP16 requires approximately 24 GB, and with a ControlNet, LoRA adapters, and an upscaler loaded simultaneously, total VRAM usage can easily reach 40-50 GB. DGX Spark handles this without breaking a sweat, while an RTX 5090 would require aggressive memory management or crash with out-of-memory errors.

4.5 ComfyUI vs Other Image Generation UIs

FeatureComfyUIAutomatic1111FooocusInvokeAI
InterfaceNode graphWeb formSimplified formCanvas + form
Learning CurveHighMediumLowMedium
FlexibilityMaximumHighLowHigh
Workflow SharingJSON exportLimitedNoneLimited
Custom Extensions1,500+ nodesExtensionsLimitedNodes
FLUX SupportFullPartialBuilt-inPartial
Batch ProcessingNativeExtensionNoLimited
API AccessBuilt-inBuilt-inLimitedBuilt-in
Desktop AppYesNoNoYes
Active DevelopmentVery activeSlowingActiveActive

ComfyUI has effectively won the image generation tooling war through a combination of flexibility, active development, and community momentum. The custom node ecosystem alone — with over 1,500 community-contributed node packages — gives it capabilities that no competitor matches.

4.6 Essential Custom Nodes

The ComfyUI ecosystem includes hundreds of custom node packages. Here are the most widely used:

  • ComfyUI-Manager — Package manager for installing and updating custom nodes
  • ComfyUI-Impact-Pack — Face detection, segmentation, upscaling utilities
  • ComfyUI-AnimateDiff — Video generation from text/image prompts
  • ComfyUI-IPAdapter — Image prompting (use reference images to guide generation)
  • ComfyUI-ControlNet-Aux — Preprocessors for ControlNet (Canny, Depth, Pose)
  • ComfyUI-KJNodes — Utility nodes for batch processing and workflow logic
  • ComfyUI-WD14-Tagger — Automatic image tagging for prompt generation
  • ComfyUI-Reactor — Face swap capabilities
  • ComfyUI-VideoHelperSuite — Video loading, frame extraction, and encoding
  • ComfyUI-Advanced-ControlNet — Advanced ControlNet features and scheduling

Installation is simple with ComfyUI-Manager:

# Install ComfyUI-Manager (one-time setup)
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git

# After restarting ComfyUI, use the Manager UI to install any other nodes
# No manual git cloning needed for subsequent packages

5. DGX Spark + ComfyUI Setup Guide

5.1 Installing ComfyUI on DGX Spark

DGX Spark runs DGX OS (Ubuntu-based Linux) with CUDA pre-installed. Setting up ComfyUI is straightforward:

# Step 1: Clone ComfyUI
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI

# Step 2: Create a Python virtual environment
python3 -m venv venv
source venv/bin/activate

# Step 3: Install PyTorch with CUDA support
pip install torch torchvision torchaudio \
  --index-url https://download.pytorch.org/whl/cu124

# Step 4: Install ComfyUI dependencies
pip install -r requirements.txt

# Step 5: Download models
# Place checkpoint files in models/checkpoints/
# For FLUX.1 Dev:
cd models/checkpoints
wget https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/flux1-dev.safetensors

# Step 6: Launch ComfyUI
cd ../..
python main.py --listen 0.0.0.0 --port 8188

Access the UI at http://localhost:8188 from any browser on the same network.

For a cleaner, more reproducible setup, use NVIDIA's NGC container ecosystem:

# Pull a PyTorch base image from NGC
docker pull nvcr.io/nvidia/pytorch:24.03-py3

# Run with GPU access and mount your model directory
docker run -it --gpus all \
  -p 8188:8188 \
  -v /home/user/models:/workspace/ComfyUI/models \
  -v /home/user/output:/workspace/ComfyUI/output \
  nvcr.io/nvidia/pytorch:24.03-py3

# Inside the container:
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
pip install -r requirements.txt
python main.py --listen 0.0.0.0 --port 8188

5.3 Optimizing ComfyUI for DGX Spark

Several configuration tweaks maximize performance on the Blackwell architecture:

# Enable FP16 inference (default, but ensure it is active)
python main.py --force-fp16

# For FLUX models, use FP8 to save memory and increase throughput
python main.py --force-fp16 --fp8_e4m3fn-text-enc

# Enable xFormers for memory-efficient attention
pip install xformers
python main.py --force-fp16 --use-pytorch-cross-attention

# For batch generation, increase the preview frequency
python main.py --force-fp16 --preview-method auto

DGX Spark-specific advantages for ComfyUI:

  • 128 GB memory means you can load FLUX + ControlNet + IP-Adapter + LoRA + upscaler simultaneously without running out of memory
  • NVLink-C2C provides fast model loading — switching between checkpoints takes seconds, not minutes
  • CUDA native means every ComfyUI optimization (TensorRT nodes, CUDA graphs) works out of the box
  • Multi-model workflows that crash on 24 GB GPUs run smoothly

5.4 Performance Benchmarks: DGX Spark vs Consumer GPUs

Here are measured generation times for common ComfyUI workflows:

WorkflowDGX SparkRTX 4090RTX 5090Mac M4 Ultra
SD 1.5, 512x512, 20 steps3.2 sec1.8 sec1.2 sec4.5 sec
SDXL, 1024x1024, 30 steps12 sec8 sec5 sec18 sec
FLUX Dev, 1024x1024, 20 steps97 secOOM*65 sec120 sec
FLUX + ControlNet + LoRA110 secOOM*OOM*140 sec
SDXL + 2x upscale + face fix25 sec15 sec10 sec35 sec

*OOM = Out of Memory. The model combination exceeds the GPU's VRAM capacity.

The pattern is consistent: for single-model, small-image workloads, consumer GPUs are faster. For multi-model, large-image, or FLUX-based workloads, DGX Spark's memory advantage makes it the only desktop option that actually works.


6. LLM + ComfyUI Pipeline: AI Generates Prompts for AI

6.1 The Vision: Fully Automated Content Creation

The most powerful use case for DGX Spark is combining its LLM and image generation capabilities into a single pipeline:

  1. You describe a concept in natural language (e.g., "Create a cyberpunk cityscape for my blog header")
  2. A local LLM (Llama 70B on DGX Spark) generates an optimized Stable Diffusion prompt with technical keywords, style references, and negative prompts
  3. ComfyUI takes that prompt and generates the image using FLUX or SDXL
  4. Post-processing nodes upscale, color-correct, and crop the output
  5. The LLM reviews the image tags and refines the prompt for a second pass

All of this runs locally on a single machine. Zero API calls. Zero latency to external servers. Complete privacy.

6.2 ComfyUI-LocalLLMNodes: Connecting LLMs to ComfyUI

The ComfyUI-LocalLLMNodes custom node package bridges ComfyUI and Ollama:

# Install the custom node
cd ComfyUI/custom_nodes
git clone https://github.com/ExponentialML/ComfyUI-LocalLLMNodes.git
pip install -r ComfyUI-LocalLLMNodes/requirements.txt

# Ensure Ollama is running
ollama serve

This package provides several key nodes:

  • OllamaGenerate — Sends a prompt to Ollama and returns the response as a string
  • OllamaVision — Sends an image + prompt to a multimodal model (LLaVA, Llama Vision)
  • PromptEnhancer — Takes a simple description and outputs an enhanced SD/FLUX prompt
  • NegativePromptGenerator — Generates appropriate negative prompts for a given concept

6.3 Building the Pipeline

Here is a complete workflow that connects Llama 70B to FLUX.1 Dev:

Workflow: LLM-Powered Image Generation

[Text Input] "A serene Japanese garden in autumn"
     |
     v
[OllamaGenerate]
  model: llama3.1:70b
  system_prompt: "You are an expert Stable Diffusion prompt engineer.
    Convert the user's description into a detailed image generation
    prompt. Include: subject, setting, lighting, camera angle,
    artistic style, and quality keywords. Output ONLY the prompt,
    no explanation."
     |
     v
[CLIPTextEncode] (positive prompt from LLM output)
     |
     v
[CLIPTextEncode] (negative prompt: "blurry, low quality, distorted")
     |
     v
[KSampler]
  model: FLUX.1 Dev
  steps: 20
  cfg: 3.5
  sampler: euler
  scheduler: normal
  seed: random
     |
     v
[VAEDecode]
     |
     v
[ImageUpscaleWithModel] (RealESRGAN 4x)
     |
     v
[SaveImage]

Example LLM output for "A serene Japanese garden in autumn":

A tranquil Japanese zen garden during peak autumn foliage,
crimson maple leaves scattered across carefully raked white
gravel patterns, a weathered stone lantern covered in moss,
a small arched wooden bridge over a koi pond reflecting the
orange and red canopy, soft golden hour sunlight filtering
through branches, shallow depth of field, shot on medium
format film, Fujifilm color science, peaceful contemplative
atmosphere, masterful composition following rule of thirds

This is dramatically better than what most humans would type into a prompt box. The LLM knows the vocabulary that diffusion models respond to — technical photography terms, specific artistic styles, composition rules — and assembles them into a coherent prompt.

6.4 Advanced: Iterative Refinement Loop

For even better results, add an image-to-text feedback loop:

Pass 1: Generate image from LLM prompt
     |
     v
[OllamaVision] (send generated image to LLaVA/Llama Vision)
  prompt: "Describe this image in detail. What could be improved
    for a more photorealistic result?"
     |
     v
[OllamaGenerate] (refine the original prompt based on feedback)
  prompt: "Original prompt: [pass 1 prompt]. Feedback: [vision
    model output]. Generate an improved prompt."
     |
     v
Pass 2: Generate improved image

This iterative approach typically produces noticeably better results in 2-3 passes. On DGX Spark, the entire loop (LLM generation + image generation + vision analysis) takes approximately 3-5 minutes per iteration — entirely feasible for serious content creation work.

6.5 Prompt Templates for Different Use Cases

Here are tested system prompts for the OllamaGenerate node, optimized for different content types:

For photorealistic images:

You are an expert photographer and Stable Diffusion prompt
engineer. Given a subject description, write a detailed prompt
that will produce a photorealistic image. Include: specific
camera model, lens focal length, f-stop, lighting setup, time
of day, color palette, and post-processing style. Use keywords
that diffusion models respond well to: "8K UHD", "professional
photography", "volumetric lighting", "cinematic color grading".
Output ONLY the prompt.

For illustrations and concept art:

You are a concept artist and Stable Diffusion prompt engineer.
Given a subject, write a prompt for high-quality digital
illustration. Include: art style reference (name specific
artists or studios), medium (digital painting, watercolor,
ink), color palette, composition, and mood. Use keywords
like "trending on ArtStation", "highly detailed", "dramatic
lighting". Output ONLY the prompt.

For product photography:

You are a commercial photographer specializing in product
shots. Given a product description, write a Stable Diffusion
prompt for professional product photography. Include: background
type (seamless white, lifestyle setting), lighting (softbox,
ring light, natural), angle (hero shot, flat lay, 45 degree),
and post-processing (clean, minimal, high contrast). Output
ONLY the prompt.

7. Practical Content Creation Workflows

7.1 Blog Thumbnail Generation

One of the most practical applications is generating custom thumbnails for blog posts. Here is a complete workflow:

Step 1: Generate the prompt with an LLM

# Using Ollama CLI for quick generation
ollama run llama3.1:8b "Write a Stable Diffusion prompt for a
blog thumbnail about 'Introduction to Kubernetes'. The image
should be tech-themed, professional, suitable for a 1200x630
social media card. Output only the prompt."

Step 2: ComfyUI workflow configuration

Resolution: 1200x630 (social media card ratio)
Model: SDXL or FLUX.1 Schnell (fast generation)
Steps: 20 (FLUX) or 30 (SDXL)
CFG: 3.5 (FLUX) or 7.0 (SDXL)
Upscaler: None needed at this resolution

Step 3: Batch generation

ComfyUI supports batch generation natively. Set the batch size to 4-8, generate multiple variants, and pick the best one. On DGX Spark with SDXL, generating 8 thumbnail variants takes approximately 96 seconds.

7.2 Social Media Content Pipeline

For regular social media posting, you can build a semi-automated pipeline:

Daily Social Media Workflow:

1. Write a content brief (50 words)
     |
2. LLM expands brief into 3 post variations
     |
3. LLM generates image prompts for each post
     |
4. ComfyUI generates 3 images (one per post)
     |
5. Human reviews and selects the best combination
     |
6. Post to platform

Time: ~15 minutes for 3 complete posts (text + image)
Cost: 0 USD (all local)

7.3 YouTube Thumbnail Factory

YouTube thumbnails have specific requirements: bold text space, high contrast, face-friendly compositions, and 1280x720 resolution. Here is an optimized workflow:

ComfyUI Node Setup:

[CheckpointLoader] FLUX.1 Dev
     |
[CLIPTextEncode] LLM-generated prompt with:
  - "negative space on the left for text overlay"
  - "high contrast, vibrant colors"
  - "clean background, not cluttered"
     |
[KSampler] steps=20, cfg=3.5, seed=random
     |
[VAEDecode]
     |
[ImageScale] 1280x720
     |
[SaveImage] youtube_thumb_001.png

Batch generation tip: Generate 8-12 variants with different seeds, then use an LLM vision model to rank them:

# Use LLaVA to evaluate thumbnails
ollama run llava "Rate this YouTube thumbnail on a scale of 1-10
for: visual impact, text space availability, color contrast,
and click-worthiness. Be specific about what works and what
does not."

7.4 Character Consistency Across Images

One challenge in AI image generation is maintaining character consistency across multiple images. ComfyUI solves this with IP-Adapter:

Consistent Character Workflow:

[Load Reference Image] character_ref.png
     |
[IPAdapterApply]
  weight: 0.7
  noise: 0.1
     |
[CLIPTextEncode] "same character, new pose, office setting"
     |
[KSampler] FLUX.1 Dev
     |
[VAEDecode]
     |
[SaveImage]

IP-Adapter works by extracting visual features from a reference image and injecting them into the generation process. The weight parameter controls how strongly the reference influences the output — 0.5-0.8 typically preserves character identity while allowing pose and setting changes.

On DGX Spark, loading FLUX + IP-Adapter simultaneously requires approximately 35-40 GB of memory. A consumer GPU with 24 GB would need to use quantized models or aggressive memory optimization, often producing inferior results.

7.5 Automated Blog Post Illustration

For a fully automated pipeline, combine everything:

#!/bin/bash
# generate_blog_images.sh
# Generates illustrations for every section of a blog post

BLOG_FILE="my_post.md"
OUTPUT_DIR="./blog_images"

# Extract section headers
SECTIONS=$(grep "^## " "$BLOG_FILE")

# For each section, generate an illustration
echo "$SECTIONS" | while read -r header; do
  SECTION_TITLE=$(echo "$header" | sed 's/^## //')

  # Generate prompt using Ollama
  PROMPT=$(ollama run llama3.1:8b \
    "Write a FLUX image generation prompt for a blog section
     titled: $SECTION_TITLE. Style: clean tech illustration,
     flat design, blue and white color scheme. Output only
     the prompt, no explanation.")

  # Queue in ComfyUI via API
  curl -X POST http://localhost:8188/prompt \
    -H "Content-Type: application/json" \
    -d "{
      \"prompt\": {
        \"1\": {\"class_type\": \"CheckpointLoaderSimple\",
               \"inputs\": {\"ckpt_name\": \"flux1-dev.safetensors\"}},
        \"2\": {\"class_type\": \"CLIPTextEncode\",
               \"inputs\": {\"text\": \"$PROMPT\", \"clip\": [\"1\", 1]}},
        \"3\": {\"class_type\": \"KSampler\",
               \"inputs\": {\"seed\": $RANDOM, \"steps\": 20,
                           \"cfg\": 3.5, \"sampler_name\": \"euler\",
                           \"model\": [\"1\", 0],
                           \"positive\": [\"2\", 0],
                           \"negative\": [\"4\", 0],
                           \"latent_image\": [\"5\", 0]}},
        \"4\": {\"class_type\": \"CLIPTextEncode\",
               \"inputs\": {\"text\": \"blurry, low quality\",
                           \"clip\": [\"1\", 1]}},
        \"5\": {\"class_type\": \"EmptyLatentImage\",
               \"inputs\": {\"width\": 1024, \"height\": 1024,
                           \"batch_size\": 1}},
        \"6\": {\"class_type\": \"VAEDecode\",
               \"inputs\": {\"samples\": [\"3\", 0],
                           \"vae\": [\"1\", 2]}},
        \"7\": {\"class_type\": \"SaveImage\",
               \"inputs\": {\"filename_prefix\": \"blog_$SECTION_TITLE\",
                           \"images\": [\"6\", 0]}}
      }
    }"

  echo "Queued image for: $SECTION_TITLE"
done

8. Cost Analysis: Cloud API vs Local DGX Spark

8.1 Cloud API Pricing (as of March 2025)

ServiceModelPricingNotes
OpenAI GPT-4 TurboGPT-4 Turbo10 USD / 1M input tokens, 30 USD / 1M outputMost expensive option
OpenAI GPT-4oGPT-4o2.50 USD / 1M input, 10 USD / 1M outputGood balance
Anthropic Claude 3.5 SonnetClaude 3.53 USD / 1M input, 15 USD / 1M outputStrong reasoning
Together AI Llama 70BLlama 3.1 70B0.88 USD / 1M tokensOpen-model hosting
Replicate FLUX.1 DevFLUX~0.03 USD / imageImage generation
MidjourneyCustom10-60 USD / monthSubscription model
RunPod A100 80GBGPU rental1.64 USD / hourRaw compute

8.2 DGX Spark Total Cost of Ownership

Cost ItemAmountNotes
Hardware3,999 USDOne-time purchase
Electricity (200W, 8h/day)~175 USD / yearAt 0.12 USD/kWh US average
Internet (for model downloads)~0 USDUses existing connection
Software0 USDOllama, ComfyUI, Linux are all free
Total Year 1~4,174 USD
Total Year 2~175 USDJust electricity
Total Year 3~175 USDJust electricity
3-Year Total~4,524 USD

8.3 Break-Even Analysis

Let us calculate when DGX Spark pays for itself compared to cloud APIs.

Scenario 1: Heavy LLM usage (developer/researcher)

Cloud cost assumptions:
- 500,000 tokens/day (input + output combined)
- Using Together AI Llama 70B at 0.88 USD / 1M tokens
- Monthly cost: 500K * 30 * 0.88 / 1M = 13.20 USD / month

Break-even: 3,999 / 13.20 = 303 months = 25 years
Verdict: Cloud wins for moderate LLM-only usage

Scenario 2: Heavy LLM + image generation

Cloud cost assumptions:
- 500,000 tokens/day via GPT-4o (2.50 USD input + 10 USD output avg)
  Monthly LLM: ~6.25 USD/M * 15M tokens = ~93.75 USD/month
- 50 images/day via Replicate FLUX (0.03 USD each)
  Monthly images: 50 * 30 * 0.03 = 45 USD/month
- Total monthly: 138.75 USD/month

Break-even: 3,999 / 138.75 = 28.8 months = ~2.4 years
Verdict: DGX Spark wins after ~2.4 years

Scenario 3: Professional content creator

Cloud cost assumptions:
- 2M tokens/day via GPT-4o for prompt generation and content
  Monthly LLM: ~300 USD/month
- 200 images/day via Replicate FLUX
  Monthly images: 200 * 30 * 0.03 = 180 USD/month
- Midjourney subscription: 60 USD/month
- Total monthly: 540 USD/month

Break-even: 3,999 / 540 = 7.4 months
Verdict: DGX Spark pays for itself in under 8 months

Scenario 4: GPU cloud rental comparison

RunPod A100 80GB: 1.64 USD/hour
If used 8 hours/day: 1.64 * 8 * 30 = 393.60 USD/month

Break-even: 3,999 / 393.60 = 10.2 months
Verdict: DGX Spark pays for itself in ~10 months vs cloud GPU

8.4 Break-Even Summary Table

Usage ProfileMonthly Cloud CostBreak-Even PeriodRecommendation
Light LLM only~15 USD/month25+ yearsUse cloud APIs
Moderate LLM + images~140 USD/month~2.4 yearsDGX Spark if long-term
Heavy content creation~540 USD/month~7 monthsDGX Spark, clearly
Cloud GPU rental (8h/day)~394 USD/month~10 monthsDGX Spark wins
Privacy-sensitive workloadsN/AImmediateDGX Spark (no alternative)

8.5 Hidden Benefits of Local Hardware

The break-even analysis above only counts direct costs. There are several additional benefits that are harder to quantify:

  • Zero latency to cloud — Inference starts immediately, no network round-trip
  • No rate limits — Generate as many tokens or images as you want, 24/7
  • Data privacy — Nothing leaves your machine. Critical for medical, legal, or proprietary data
  • No vendor lock-in — Run any open model. Switch models freely
  • Learning opportunity — Hands-on experience with real AI hardware
  • Offline capability — Works without internet once models are downloaded
  • Resale value — Hardware retains value for 2-3 years

9. DGX Spark vs DGX Station: Who Is Each For?

NVIDIA announced both DGX Spark and DGX Station at GTC 2025. They serve different segments of the market.

9.1 Specification Comparison

SpecDGX SparkDGX Station
GPU1x Blackwell GPU1x Blackwell Ultra GPU
Memory128 GB unified784 GB unified
AI Performance1,000 TOPS (FP4)20,000+ TOPS (FP4)
StorageUp to 4 TB NVMeUp to 16 TB NVMe
NetworkingConnectX-7ConnectX-7
Form FactorDesktop (compact)Workstation (tower)
Price3,999 USD24,999 USD
TargetIndividual, student, creatorTeam, lab, enterprise

9.2 Who Should Buy DGX Spark

DGX Spark is the right choice if you:

  • Are an individual developer, researcher, or student
  • Want to run models up to 200B parameters locally
  • Need a compact, quiet desktop machine
  • Have a budget under 5,000 USD
  • Primarily do inference and light fine-tuning
  • Want to learn AI/ML on real NVIDIA hardware
  • Are building content creation pipelines (LLM + image gen)

9.3 Who Should Buy DGX Station

DGX Station is the right choice if you:

  • Are a research lab or enterprise team sharing one machine
  • Need to run 400B+ parameter models at full precision
  • Do heavy training and fine-tuning (not just inference)
  • Need 784 GB memory for multi-model deployments
  • Run multiple simultaneous users or inference endpoints
  • Have a budget of 25,000+ USD
  • Need maximum local AI compute for competitive research

9.4 The Missing Middle: DIY Multi-GPU Options

Between DGX Spark (3,999 USD) and DGX Station (24,999 USD), there is a DIY option:

DIY Dual-RTX 5090 Build:
- 2x RTX 5090 (32 GB each): 3,998 USD
- AMD Threadripper 7960X: 1,099 USD
- 128 GB DDR5 RAM: 300 USD
- Motherboard (dual x16 slots): 500 USD
- 1200W PSU: 250 USD
- NVMe SSD 2TB: 150 USD
- Case and cooling: 300 USD
- Total: ~6,597 USD

Pros:
- 64 GB total VRAM (2x 32 GB)
- Much faster per-model inference than DGX Spark
- Can run 2 models simultaneously
- Gaming capable

Cons:
- 64 GB VRAM (vs 128 GB unified on DGX Spark)
- PCIe bandwidth between GPUs (vs NVLink)
- Must build and maintain yourself
- Much louder and more power-hungry
- No NVIDIA enterprise support

The DIY build is faster for smaller models but cannot match DGX Spark's ability to run 200B-parameter models in a single memory space. Your choice depends on whether you prioritize speed (DIY) or model size (DGX Spark).


10. Future Outlook: What DGX Spark Means for the AI Ecosystem

10.1 Democratization of AI Research

DGX Spark represents a significant inflection point. For the first time, a university student or independent researcher can:

  • Run the same models (Llama 405B at Q4) that required a cloud cluster just 18 months ago
  • Fine-tune 70B models locally without renting cloud GPUs
  • Build and test agentic AI systems with local LLMs
  • Create production-quality images without subscription services

This levels the playing field between well-funded corporate labs and individual researchers in a way that has not happened before.

10.2 The Local-First AI Movement

There is a growing movement toward local-first AI — running models on your own hardware rather than relying on cloud APIs. DGX Spark accelerates this trend by providing:

  • Sovereignty — Your data never leaves your machine
  • Predictability — No surprise API bills, no rate limit walls
  • Reliability — No outages, no model deprecations, no API changes
  • Customizability — Fine-tune, quantize, and optimize freely

For professional content creators, the combination of local LLMs and local image generation means complete independence from any single vendor. If OpenAI changes their pricing or Midjourney changes their terms of service, your pipeline keeps running.

10.3 What Comes Next

Looking ahead, the trajectory is clear:

  • Memory will grow — Future DGX Spark iterations will likely offer 256 GB or 512 GB
  • Models will shrink — Distillation and pruning are making smaller models competitive with larger ones
  • ComfyUI will evolve — Video generation (via AnimateDiff, SVD) is the next frontier
  • Agents will go local — Tool-using LLM agents running entirely on local hardware

DGX Spark is not just a product. It is the opening move in NVIDIA's strategy to put AI supercomputing on every desk, in every lab, and eventually in every home.


11. Quiz

Test your understanding of DGX Spark and ComfyUI.

Q1: What is the maximum unified memory of NVIDIA DGX Spark, and what interface connects the CPU and GPU?

Answer: DGX Spark has 128 GB of LPDDR5X unified memory, and the CPU (Grace) and GPU (Blackwell) are connected via NVLink-C2C at 273 GB/s bandwidth. This unified memory architecture eliminates the PCIe bottleneck that limits traditional desktop GPU setups.

Q2: According to official benchmarks, what is the inference speed of Llama 3.1 8B on DGX Spark? How does it compare to GPT-OSS 20B?

Answer: Llama 3.1 8B runs at 20.5 tokens/sec on DGX Spark, while GPT-OSS 20B (at FP4 precision) runs at 49.7 tokens/sec. The GPT-OSS 20B model is faster because it uses FP4 quantization, which allows the Blackwell GPU's FP4 Tensor Cores to deliver 1,000 TOPS of compute. Llama 8B at FP16 does not benefit from this optimization.

Q3: What is the primary advantage of ComfyUI over other Stable Diffusion UIs like Automatic1111 or Fooocus?

Answer: ComfyUI's primary advantage is its node-based visual graph interface that exposes the entire diffusion pipeline. Every component (model loading, text encoding, sampling, VAE decoding) is a draggable node that can be wired together in any configuration. This provides maximum flexibility and transparency — you can see exactly what happens at each step, swap any component, and save/share workflows as JSON files. The ecosystem of 1,500+ custom node packages further extends its capabilities beyond any competitor.

Q4: In the cost analysis, how long does it take for DGX Spark to break even compared to cloud APIs for a professional content creator using 2M tokens/day and generating 200 images/day?

Answer: The break-even period is approximately 7.4 months. The monthly cloud cost for this usage profile is about 540 USD (300 USD for GPT-4o tokens + 180 USD for FLUX images on Replicate + 60 USD Midjourney subscription). At 3,999 USD hardware cost, 3,999 divided by 540 equals 7.4 months. After that, the only ongoing cost is approximately 175 USD/year in electricity.

Q5: How does the LLM-to-image pipeline work in the DGX Spark + ComfyUI setup? Name the key custom node package that enables this integration.

Answer: The pipeline works in three stages: (1) A local LLM (e.g., Llama 70B running on Ollama) takes a simple text description and generates an optimized diffusion model prompt with technical keywords, style references, and composition instructions. (2) ComfyUI receives this prompt and generates an image using FLUX or SDXL. (3) Optionally, a vision model (LLaVA) analyzes the output and feeds back to the LLM for iterative refinement. The key custom node package is ComfyUI-LocalLLMNodes, which provides OllamaGenerate, OllamaVision, and PromptEnhancer nodes that bridge ComfyUI's workflow graph with Ollama's LLM API.


12. References

  1. NVIDIA DGX Spark Official Product Page — Hardware specifications and pricing
  2. NVIDIA GTC 2025 Keynote — Jensen Huang's DGX Spark and DGX Station announcement
  3. NVIDIA DGX Station Product Page — DGX Station specifications and positioning
  4. ComfyUI Official GitHub Repository — Source code and documentation
  5. ComfyUI Desktop App — Official desktop application download
  6. Ollama Official Website — Local LLM runtime installation and model library
  7. FLUX.1 Dev on Hugging Face — FLUX model weights and documentation
  8. ComfyUI-Manager GitHub — Custom node package manager
  9. ComfyUI-LocalLLMNodes — LLM integration nodes for ComfyUI
  10. TensorRT-LLM GitHub — Optimized LLM inference engine
  11. NVIDIA NGC Container Registry — Pre-built AI containers
  12. Apple M4 Ultra Specifications — Mac Studio comparison reference
  13. NVIDIA RTX 5090 Specifications — Consumer GPU comparison reference
  14. Stable Diffusion XL on Hugging Face — SDXL model reference
  15. IP-Adapter for ComfyUI — Character consistency and image prompting
  16. NVIDIA Grace Blackwell Architecture Whitepaper — Technical architecture details
  17. RunPod GPU Cloud Pricing — Cloud GPU rental cost reference