Running image and video AI models locally: ComfyUI, memory and licenses
How to run open image and video generators such as FLUX, Z-Image, Krea 2, MOSS-Image, Anima, Wan, LTX and Cosmos 3 on your own GPU: ComfyUI basics, memory, offloading, LoRAs and license checks.
Short answer. Use ComfyUI, or the Diffusers library if you prefer Python. Pick a model whose full set of files fits your graphics memory, and prefer INT8 or distilled builds on smaller cards. Expect video to need far more memory than images, and read the license first, because several of the best image and video models are not free for every business. Z-Image and MOSS-Image (images) and Wan 2.2 (video) are Apache 2.0, and Cosmos 3 (video for robotics) uses the equally permissive OpenMDW-1.1.
How these models differ from chat models
A chat model is one set of weights. An image or video generator is a pipeline of several parts: the main generator (a diffusion model), a text encoder that turns your prompt into numbers, and a decoder that turns the result into pixels. Together they are what you must download and fit in memory, so look at the total download size, not only the headline parameter count.
They also work differently. A diffusion model builds a picture or clip over a number of sampling steps, so results take seconds to minutes instead of streaming word by word. More steps, higher resolution and longer clips all need more time and memory. Distilled variants cut the number of steps, and they are the usual choice for local use. Many models also have a guidance setting, classifier-free guidance, which trades prompt-following against speed, and distilled versions often build it in.
The tools
- ComfyUI is the usual starting point. You build a graph of nodes, for example one for the model, one for the prompt and one for the sampler, and you can save, share and reuse workflows. It manages memory aggressively and can offload or stream weights, which is how it runs large models on modest cards. It runs on NVIDIA, AMD, Intel and Apple silicon, with a desktop app for Windows and macOS.
- Diffusers is Hugging Face’s Python library for diffusion models, and model cards often show example code for it.
- SGLang includes a built-in engine for image and video generation, which suits serving models for other people on a server.
ComfyUI lists FLUX Klein, Qwen-Image, Wan and LTX among the models it supports, and its project says that even the biggest open models can run on as little as 4 GB of VRAM with 8 GB of RAM, although more memory is much faster.
What fits
| Model | What it makes | Memory notes | License |
|---|---|---|---|
| FLUX 3 Image Klein (5.6B) | Images and edits from up to 10 references | About 20 GB to download; the developer states a 22 GB minimum; an INT8 build is meant for 8 GB, and the text encoder is extra | FLUX Kommunity, free below US$5 million of revenue, gated |
| Z-Image (6B) | Images from text, with English and Chinese text inside them | The developer says Turbo fits in 16 GB; the Turbo download is about 33 GB because the transformer is stored in FP32, and the base model is about 20.5 GB | Apache 2.0 |
| MOSS-Image (5B) | Images from text, with long English and Chinese passages and JSON layouts that fix where things go | The repository is 27.2 GB because of a 16.8 GB text encoder; the developer’s low-memory profile peaked at 3.65 GiB of GPU memory and 14 GiB of system RAM, and we expect it to be slower | Apache 2.0 |
| Krea 2 (12.8B) | Varied, artistic images from text, with a Raw base for LoRA training and an 8-step Turbo | About 36 GB for the pipeline with its text encoder, which we estimate at about 41 GB of GPU memory without offloading | Krea 2 Community, free below US$1 million of revenue, gated |
| FIBO 2.0 (8B) | Images and edits from structured JSON prompts | About 25.5 GB for the pipeline with its text encoder; it needs Diffusers 0.42 or newer, and a language model to write the prompts | CC BY-NC 4.0, non-commercial, gated |
| Anima (2B) | Anime and illustration images from tags or sentences; the Turbo version needs 8 to 12 steps | About 5.6 GB for the transformer, text encoder and VAE | CircleStone Non-Commercial, non-commercial weights; the images you generate are free to use |
| Qwen-Image-2.1 (7.1B) | Images, edits and real transparent backgrounds | About 33 GB for the BF16 pipeline because of an 8B text encoder; an INT8 repack is about 17 GB | Qwen Research, research and evaluation only |
| MiniMax H3-Image (33B) | 16-megapixel images and edits with up to 16 references | About 135 GB for the full set; MiniMax publishes no minimum GPU memory | MiniMax H3-Image Community, not licensed in the US, EU, UK or South Korea; US$1 million revenue cap |
| Wan 2.2 (5B and 27B) | About five seconds of video, without sound | 5B: a 24 GB GPU. 27B text-to-video and image-to-video: about 80 GB | Apache 2.0 |
| Cosmos 3 (4B, 16B, 64B) | Short video with sound, images and robot actions, and answers about video | 9.2 GB (Edge), 35 GB (Nano) and 133 GB (Super); only BF16 is tested, on Linux with NVIDIA GPUs | OpenMDW-1.1, permissive |
| LTX-2.5 (22B) | Video with synchronized sound and multi-shot scenes | About 71 GB to download and 80 GB or more of GPU memory in full form; a distilled INT8 build needs about 16 GB | LTX-2.x Community, free below US$10 million of revenue, gated |
| MiniMax H3 (33B) | Up to 15 seconds of video with stereo sound; local output is 768p | One checkpoint is about 144 GB; MiniMax publishes no minimum memory, and its self-hosting guide uses 8 B200 GPUs | MiniMax H3 Community, not licensed in the US, EU, UK or South Korea; authorization needed above US$20 million |
| Pika H3 Flex (adapters on H3) | Up to 15 seconds of video with sound in six steps, from text, frames or up to 12 references | About 147 GB with the H3 base files; Pika tested an 80 GB H100, with CPU offload for 768p, 15-second clips | MiniMax H3 Community, the same territory limits and US$20 million threshold |
These figures come from the developers’ instructions and the files they publish. See how much memory do I need for how to reason about them.
Tips for a first run
- Start from an official workflow. Use the example workflow or template that comes with ComfyUI or the model’s own repository, and change one thing at a time.
- Start small. Try a low resolution, a short clip and a distilled or turbo variant. FLUX Klein has a 16-step distilled version, Qwen-Image-2.1, Z-Image and Krea 2 have 8-step Turbo variants, Anima has a Turbo version for 8 to 12 steps, and H3-Image and Pika H3 Flex are distilled to 6 steps.
- Choose a lighter build for a smaller card. INT8 and FP8 repacks cut the download and the memory, usually with a small quality cost. Quantization explained covers the trade-offs.
- Let ComfyUI offload, and accept that generation slows down when weights move between GPU and system memory.
- Fix the seed when comparing settings, so that only one thing changes between runs.
- Prompt in the model’s own style. MOSS-Image accepts JSON layouts that fix where text and objects go, FIBO 2.0 was trained on long JSON captions that its helper package writes for you, and Anima was trained on Danbooru-style tags, with artist names written after an @ sign, so read the prompting section of the model card.
- Keep software up to date. New models often need recent versions. The Qwen-Image-2.1 model card asks for Transformers 5.17 or newer and Diffusers installed from source.
- Treat custom nodes as code you are installing. They are community-made, so install them with the same care as any software.
- Use LoRAs to add a style or a character. A handful of pictures can teach one, and fine-tuning for beginners explains how.
Licenses matter more here
Several of the strongest open image and video models come with conditions:
- FLUX 3 Image Klein is free for commercial use only below US$5 million of annual revenue. Commercial users must filter or review outputs, add AI disclosures where the law requires them, and may not use outputs to train competing models.
- LTX-2.5 is free below US$10 million, counted with affiliates. You must keep its watermark and provenance features, and removing them can end your license.
- Krea 2 is free for commercial use only below US$1 million of annual revenue, counted with affiliates, and anything you share must start with “Krea” in its name.
- FIBO 2.0’s weights are CC BY-NC 4.0, so any commercial use needs an agreement with Bria.
- Qwen-Image-2.1 is research and evaluation only, so any commercial use needs a separate license from Qwen.
- The two MiniMax models do not cover the United States, the European Union, the United Kingdom or South Korea (a territory restriction). H3-Image needs MiniMax’s authorization above US$1 million of yearly revenue and H3 above US$20 million, and both forbid using their outputs to train other AI models. Pika H3 Flex is a post-trained version of H3, so it inherits the H3 license, territory limits included.
- Anima’s weights are non-commercial. You may not host it behind a paid service or build it into a monetized product without a separate license, although you can sell the pictures it generates. It is also a derivative of NVIDIA’s Cosmos model, so the NVIDIA Open Model License applies as well.
- Z-Image, MOSS-Image and Wan 2.2 are Apache 2.0 with no revenue limit. Z-Image and MOSS-Image only make images from text, and Wan 2.2 makes short silent clips and is more than a year old. Cosmos 3 is also permissive, but it is built for robotics and driving research and runs on NVIDIA GPUs only.
AI licenses explained shows how to read these terms. FLUX 3 Image Klein, Krea 2, FIBO 2.0 and LTX-2.5 are also gated on Hugging Face, so you need an account and an access token to download them.
Use them responsibly
Do not create misleading images or videos of real people, and respect copyright and personal rights. Many places now require AI-generated media to be labeled, and some licenses, such as LTX-2.5’s, make provenance features a condition of use. When in doubt, label the work as AI-generated.
Frequently asked questions
- How much VRAM do I need for FLUX 3 Image Klein?
- The developer's stated minimum for the standard builds is 22 GB. An INT8 build for ComfyUI is meant for 8 GB of VRAM, and the text encoder is extra weight on top of that.
- Can I run Wan 2.2 on a smaller GPU?
- The 5B model is meant for a 24 GB card. Alibaba's instructions ask for 80 GB for the 27B models, although quantized community builds and offloading can reduce that, at a cost in speed.
- Is ComfyUI free and open source?
- Yes, it is licensed under GPL-3.0. Its core runs fully offline. Optional partner nodes call paid external APIs, and you can disable them.
- Can I use the images and videos I generate commercially?
- It depends on the model's license. Z-Image, MOSS-Image and Wan 2.2 are Apache 2.0, and Cosmos 3 uses the equally permissive OpenMDW-1.1. Anima's weights are non-commercial, but the pictures you generate with it can be used commercially, while FIBO 2.0's weights are non-commercial and need an agreement with Bria for commercial use. FLUX 3 Image Klein is free for commercial use below US$5 million of annual revenue and comes with output-filtering duties, Krea 2 below US$1 million, LTX-2.5 below US$10 million, Qwen-Image-2.1 is research-only, and the MiniMax H3 models and Pika H3 Flex are not licensed in the US, the EU, the UK or South Korea.
- Do I need an NVIDIA GPU?
- ComfyUI also supports AMD, Intel, Apple silicon and Ascend hardware, but some optimized builds, such as NVFP4, need recent NVIDIA GPUs. Check the model page and the model's own instructions.
- Can I run MiniMax H3, H3-Image or Pika H3 Flex on one GPU?
- MiniMax publishes no minimum GPU memory for H3 or H3-Image. One H3 video checkpoint with its encoders is about 144 GB, and its self-hosting guide uses eight B200 GPUs. The H3-Image set is roughly 135 GB. SGLang lists offloaded H3 recipes for much smaller cards, which MiniMax does not verify, so expect slow runs. Pika H3 Flex builds on the same base files, about 147 GB with an adapter, and Pika tested one-GPU requests on an 80 GB H100, with CPU offload and about 94 GiB of host memory for 768p, 15-second clips.
Key terms in this guide
- Classifier-free guidance (CFG) Classifier-free guidance, usually called CFG, is a setting in diffusion models that controls how strictly the result follows your prompt, at the price of extra computation.
- Diffusion model A diffusion model generates images or video by starting from random noise and removing the noise step by step until a picture emerges.
- Gated model A gated model is an open model whose download on Hugging Face requires you to log in and accept its terms, or request access, first.
- LoRA LoRA, short for low-rank adaptation, fine-tunes a model by training a small set of added weights instead of changing all of its parameters.
- Quantization Quantization stores a model's weights with fewer bits, for example 4 instead of 16, to cut memory use and speed up inference at a small cost in quality.
- Sampling steps Sampling steps are the number of passes a diffusion model makes to turn noise into an image or video. Fewer steps mean faster results, usually with some loss of detail or variety.
- Text encoder In an image or video generator, the text encoder is a separate language model that turns your prompt into numbers the generator can use. It adds to the download and to memory use.
- VRAM VRAM is the memory on a graphics card; it decides which models a GPU can hold, because the weights must fit in memory for the model to run quickly.
Models mentioned in this guide
| Model | Released | Parameters | Context | License | Smallest variant needs |
|---|---|---|---|---|---|
| FLUX 3 Image Klein Black Forest Labs | 5.6B | – | FLUX Kommunity (Conditional) | 8 GB Laptop or phone | |
| Z-Image Tongyi MAI | 6.15B | – | Apache 2.0 (Permissive) | 16 GB Laptop or phone | |
| Krea 2 Krea | 12.8B | – | Krea 2 Community (Conditional) | 41 GB Workstation | |
| MOSS-Image OpenMOSS | 5.08B | – | Apache 2.0 (Permissive) | 4.2 GB Laptop or phone | |
| FIBO 2.0 Bria AI | 8.13B | – | CC BY-NC (Non-commercial) | 29 GB Gaming GPU | |
| Anima CircleStone Labs | 2.09B | – | CircleStone Non-Commercial (Non-commercial) | 6.44 GB Laptop or phone | |
| Qwen-Image-2.1 Alibaba Qwen | 7.1B | – | Qwen Research License (Non-commercial) | 20 GB Gaming GPU | |
| MiniMax H3-Image MiniMax | 33.1B | – | MiniMax H3-Image Community (Conditional) | 155 GB Big-memory desktop | |
| Wan 2.2 Alibaba Wan | 5B – 27B 14B active | – | Apache 2.0 (Permissive) | 24 GB Gaming GPU | |
| Cosmos 3 NVIDIA | 3.86B – 64.6B | – | OpenMDW-1.1 (Permissive) | 11 GB Laptop or phone | |
| LTX-2.5 LTX (Lightricks) | 22B | – | LTX-2.x Community (Conditional) | 16 GB Laptop or phone | |
| MiniMax H3 MiniMax | 33.1B | – | MiniMax H3 Community (Conditional) | 166 GB Big-memory desktop | |
| Pika H3 Flex Pika | 33.1B | – | MiniMax H3 Community (Conditional) | 169 GB Big-memory desktop |