8GB VRAM Local Setup: Z-Image-Turbo & MatAnyone 2 Video Matting
Run crisp quantized image generation and hair-level video background removal on mainstream 8GB cards without Out-Of-Memory errors.
Mainstream 8GB GPUs like an RTX 3070 or 4060 handle serious visual work locally once you pair quantized weights with memory-safe processing bounds. Using FP8/GGUF Z-Image-Turbo alongside MatAnyone 2 (with internal resolution capping or sparse MatAnyone-E propagation), creators produce clean stills and transparent video cutouts completely offline.
How It Fits Together
1. One-Click Base Setup
Install ComfyUI cleanly via Pinokio or LocModel so Python, PyTorch, and CUDA stay isolated.
2. 8GB Fast Image Pass
Load Z-Image-Turbo (FP8 or Q4/Q6 GGUF) or FLUX.2 [klein] 4B for sub-15-second bilingual stills.
3. MatAnyone 2 Cutout Pass
Install pq-yang/MatAnyone2 or FuouM/ComfyUI-MatAnyone and cap internal size cleanly to avoid OOM.
VRAM Sizing: Safe Settings for 8GB vs 12GB vs 24GB Cards
OOM crashes happen when users leave 1080p/4K defaults untouched on 8GB cards. Keep Z-Image-Turbo in quantized FP8/GGUF form and constrain MatAnyone 2 internal propagation size.
| GPU VRAM Tier | Image Model & Quant | MatAnyone 2 Settings | Expected Result |
|---|---|---|---|
| 8GB VRAM (RTX 3070 / 4060) | Z-Image-Turbo FP8/GGUF (~6GB) or FLUX.2 [klein] 4B | max_internal_size=480, max_mem_frames=5, use_long_term=True | ~10–18s per 1024px image; smooth 720p–1080p matting |
| 12GB VRAM (RTX 3060 12G / 4070) | Z-Image-Turbo FP8 / Qwen-Image Quant | max_internal_size=720, standard frame window | Room for LoRA stacking & faster batch rendering |
| 16GB–24GB VRAM (RTX 4080 / 4090) | MiniMax-H3-Image (16MP) / FLUX.2 [dev] 32B | MatAnyone-E sparse propagation up to 4K | 4K native stills and crisp 4K video alpha mattes |
Pinokio One-Click Path vs Manual MatAnyone 2 Install
Beginners should install ComfyUI inside Pinokio or LocModel first and search for FuouM/ComfyUI-MatAnyone from ComfyUI Manager. Power users preferring the standalone Gradio demo can clone pq-yang/MatAnyone2 directly.
git clone https://github.com/pq-yang/MatAnyone2
cd MatAnyone2
conda create -n matanyone2 python=3.10 -y && conda activate matanyone2
pip install -e .
# Weights (matanyone2.pth) auto-download into pretrained_models/ on first run Before You Start
- Do NOT leave max_internal_size uncapped at 1080/2160 on an 8GB card—lowering internal propagation size to 360–480 saves massive VRAM while preserving sharp final output.
- Always check whether long-term memory compression (use_long_term = True) is enabled when processing clips longer than 10 seconds.
- Use Comfy-Org or widely verified FP8/GGUF Z-Image-Turbo builds instead of random unverified 20GB checkpoints on 8GB hardware.