CPU 단독 구동(VRAM 0MB) 음성 STT/TTS 파이프라인 및 RTX 3060 12GB 환경 ComfyUI FLUX GGUF 이미지 & LTX-Video 동영상 생성
GPU VRAM을 1MB도 사용하지 않고 64GB 시스템 RAM과 멀티코어 CPU만을 활용하여 1시간 강의를 1분 내 전사하고 0.1초 만에 네이티브 음성을 합성합니다.
voices.bin 채택으로 json 로드 시 발생하는 피클링(Pickle) 에러 원천 차단.af_bella (기본 여성 음성), af_sarah 등 고품질 네이티브 보이스 내장.cpu_threads=8).int8 양자화 구동으로 시스템 RAM 약 3.5GB만 점유.Set-Location "C:\ai_workspace"
Invoke-WebRequest -Uri "https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/kokoro-v0_19.onnx" -OutFile "C:\ai_workspace\kokoro-v0_19.onnx"
Invoke-WebRequest -Uri "https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/voices.bin" -OutFile "C:\ai_workspace\voices.bin"
C:\ai_workspace\audio_engine.py)import os
import soundfile as sf
from faster_whisper import WhisperModel
from kokoro_onnx import Kokoro
def text_to_speech(text: str, output_wav: str = "output.wav", voice: str = "af_bella"):
print("[*] Kokoro TTS 엔진 로드 중 (CPU 구동)...")
kokoro = Kokoro("C:/ai_workspace/kokoro-v0_19.onnx", "C:/ai_workspace/voices.bin")
available_voices = kokoro.get_voices()
if voice not in available_voices:
voice = available_voices[0]
print(f"[*] 선택 음성: '{voice}' (총 {len(available_voices)}종 지원)")
samples, sample_rate = kokoro.create(text, voice=voice, speed=1.0, lang="en-us")
sf.write(output_wav, samples, sample_rate)
print(f"[+] 음성 파일 저장 완료: {output_wav}")
def transcribe_audio(audio_path: str) -> str:
print(f"\n[*] Faster-Whisper 전사 중 (CPU 8스레드 할당): {audio_path}")
model = WhisperModel("large-v3-turbo", device="cpu", compute_type="int8", cpu_threads=8)
segments, _ = model.transcribe(audio_path, beam_size=5)
full_text = " ".join([segment.text for segment in segments])
return full_text.strip()
if __name__ == "__main__":
test_wav = r"C:\ai_workspace\test_audio.wav"
sample_text = "Local AI multimedia audio subsystem is operational without GPU memory allocation."
text_to_speech(sample_text, test_wav, voice="af_bella")
result_text = transcribe_audio(test_wav)
print(f"\n=== STT 전사 결과 ===\n{result_text}")
# 가상환경 활성화 상태에서 실행
python C:\ai_workspace\audio_engine.py
12GB VRAM 제약을 극복하기 위해 ComfyUI의 동적 메모리 페이징(Dynamic Staging)을 활용하며, 내장 파이썬 환경의 필수 패키지 버전을 정확히 패치합니다.
Set-Location "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes"
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
git clone https://github.com/city96/ComfyUI-GGUF.git
git clone https://github.com/Lightricks/ComfyUI-LTXVideo.git
ComfyUI는 전역 파이썬이나 가상환경(ai_env)이 아닌 자체 python_embeded를 사용합니다. ComfyUI-GGUF 노드 검색을 위한 gguf 라이브러리와 ComfyUI-LTXVideo의 pad 함수 임포트 실패를 방지하는 kornia==0.8.2를 반드시 설치해야 합니다.
Set-Location "C:\ComfyUI_windows_portable"
.\python_embeded\python.exe -m pip install gguf
.\python_embeded\python.exe -m pip install "kornia==0.8.2"
| 모델 종류 | 실제 파일명 | 저장 경로 | 용량 | 검증된 다이렉트 직링크 |
|---|---|---|---|---|
| FLUX VAE | ae.safetensors |
ComfyUI\models\vae\ |
~335MB | camenduru/FLUX.1-dev (공개 미러) |
| CLIP-L | clip_l.safetensors |
ComfyUI\models\clip\ |
~246MB | flux_text_encoders/clip_l |
| T5XXL (FP8) | t5xxl_fp8_e4m3fn.safetensors |
ComfyUI\models\clip\ |
~4.9GB | flux_text_encoders/t5xxl_fp8 |
| FLUX UNET | flux1-dev-Q4_0.gguf |
ComfyUI\models\unet\ |
~6.79GB | city96/FLUX.1-dev-gguf/Q4_0 |
| LTX-Video | ltx-video-2b-v0.9.1.safetensors |
ComfyUI\models\checkpoints\ |
~5.5GB | Lightricks/LTX-Video |
New-Item -ItemType Directory -Path "C:\ComfyUI_windows_portable\ComfyUI\models\unet" -Force
New-Item -ItemType Directory -Path "C:\ComfyUI_windows_portable\ComfyUI\models\checkpoints" -Force
curl.exe -L --progress-bar -o "C:\ComfyUI_windows_portable\ComfyUI\models\vae\ae.safetensors" "https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/ae.safetensors"
curl.exe -L --progress-bar -o "C:\ComfyUI_windows_portable\ComfyUI\models\clip\clip_l.safetensors" "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors"
curl.exe -L --progress-bar -o "C:\ComfyUI_windows_portable\ComfyUI\models\clip\t5xxl_fp8_e4m3fn.safetensors" "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn.safetensors"
curl.exe -L --progress-bar -o "C:\ComfyUI_windows_portable\ComfyUI\models\unet\flux1-dev-Q4_0.gguf" "https://huggingface.co/city96/FLUX.1-dev-gguf/resolve/main/flux1-dev-Q4_0.gguf"
curl.exe -L --progress-bar -o "C:\ComfyUI_windows_portable\ComfyUI\models\checkpoints\ltx-video-2b-v0.9.1.safetensors" "https://huggingface.co/Lightricks/LTX-Video/resolve/main/ltx-video-2b-v0.9.1.safetensors"
# 1. 상주 중인 LLM 메모리 즉각 언로드
ollama stop student
ollama stop hermes3:8b
# 2. ComfyUI 저비디오메모리 모드 구동
Set-Location "C:\ComfyUI_windows_portable"
.\run_nvidia_gpu.bat --lowvram
12GB VRAM 환경에서 최상급 실사 디테일과 한글/영문 타이포그래피를 완벽하게 생성하기 위한 노드 결선 규칙입니다.
기존 SD 1.5/SDXL과 달리 FLUX 아키텍처는 KSampler의 cfg 값을 무조건 1.0으로 고정해야 합니다. 프롬프트 추종 강도는 FluxGuidance 노드의 guidance(기본값 3.5) 수치로만 조절합니다. (CFG를 7.0 등으로 올리면 결과물이 완전히 하얗게 타버립니다.)
unet_name → flux1-dev-Q4_0.gguf 선택.clip_name1 → t5xxl_fp8_e4m3fn.safetensors, clip_name2 → clip_l.safetensors, type → flux 지정.vae_name → ae.safetensors 선택.CLIP 출력선 연결 → 묘사 프롬프트 입력.CONDITIONING → conditioning 연결, guidance: 3.5 설정.CLIP 연결 (공란 유지).width: 1024, height: 1024, batch_size: 1 설정.model ← Unet Loader (GGUF)의 MODEL 연결positive ← FluxGuidance의 CONDITIONING 연결negative ← 부정 CLIPTextEncode의 CONDITIONING 연결latent_image ← EmptyLatentImage의 LATENT 연결steps: 20, cfg: 1.0 (고정), sampler_name: euler, scheduler: simple, denoise: 1.0LATENT → samples, VAELoader VAE → vae 연결.IMAGE 연결 후 Ctrl + Enter 실행.DiT(Diffusion Transformer) 기반 고속 비디오 생성 모델로, 12GB VRAM에서 768×512 해상도의 부드러운 고화질 클립을 생성합니다.
• 해상도 규격: 너비와 높이는 반드시 32의 배수여야 합니다 (권장: 768×512 또는 512×768).
• 프레임 수 규격: 3D VAE 압축 특성상 길이는 반드시 (8n + 1) 공식을 만족해야 합니다. (권장: 65 [8×8+1 = 25fps 기준 약 2.6초], 97 [8×12+1 = 약 3.8초]).
ckpt_name → ltx-video-2b-v0.9.1.safetensors 로드.clip_name → t5xxl_fp8_e4m3fn.safetensors, type → ltxv 지정.CLIP을 각각 연결.
cinematic camera pan, a futuristic cybernetic server room, blinking LED status lights, ultra realistic, 4klow quality, blurry, jerky motion, artifacts, watermarkframe_rate: 25 설정.width: 768, height: 512, length: 65, batch_size: 1 설정.model ← CheckpointLoaderSimple의 MODELpositive / negative ← LTXVConditioning의 CONDITIONINGlatent_image ← EmptyLTXVLatentVideo의 LATENTsteps: 25, cfg: 3.0 (LTX 표준), sampler_name: euler, scheduler: normal, denoise: 1.0LATENT 및 CheckpointLoaderSimple의 VAE 연결.IMAGE 연결, fps: 25, lossless: false, quality: 90 설정.