flux2-dev

Comfy-Org/flux2-dev

Comfy-Org 1.1M downloads other Other
Tagsdiffusion-single-filecomfyui
Downloads
1.1M
License
other
Pipeline
Other
Author
Comfy-Org

Run flux2-dev locally on a Q4KM hard drive

Pre-loaded and ready to run. No download time. No configuration.

Shop Q4KM Drives

Technical Overview

Model ID: Comfy-Org/flux2-dev
Model Name: flux2-dev
Author: Comfy‑Org
Downloads: 1,093,661

What is this model?
Flux2‑Dev is a quantized, single‑file diffusion checkpoint that brings the capabilities of the FLUX.2‑dev family into a compact format optimized for the ComfyUI workflow. It is a text‑to‑image diffusion model that generates high‑fidelity, photorealistic images from natural‑language prompts, supporting both standard and “Turbo” inference pipelines.

Key Features & Capabilities

  • Quantized weights (int8/float16) – reduces VRAM footprint while preserving most of the original model’s visual quality.
  • Single‑file .safetensors distribution – simplifies loading in ComfyUI and other compatible pipelines.
  • Supports the “Turbo” variant via companion LoRA files (e.g., Flux2TurboComfyv2.safetensors), enabling up to 2× faster generation with minimal quality loss.
  • Native integration with ComfyUI nodes for prompt conditioning, negative prompts, and classifier‑free guidance.
  • US‑region hosting – low latency for North‑American users.

Architecture Highlights

  • Based on the FLUX.2 diffusion backbone – a transformer‑style UNet with cross‑attention layers that fuse text embeddings from a frozen T5‑XL encoder.
  • Uses a 1280×1280 latent space, up‑scaled to 1024×1024 or higher via a learned decoder.
  • Quantization applied post‑training, preserving the original 2‑B parameter count while shrinking the checkpoint to ~12 GB (vs. ~24 GB for the full‑precision model).
  • Incorporates a “Turbo” LoRA that adapts the diffusion schedule for faster denoising steps, typically 12‑step vs. 28‑step pipelines.

Intended Use Cases

  • Rapid prototyping of visual concepts for game art, concept design, and storyboarding.
  • Creative content generation for marketing, social media, and e‑commerce product visuals.
  • Research and experimentation with diffusion‑based generative AI within the ComfyUI ecosystem.
  • Low‑budget, high‑quality image synthesis for indie developers and hobbyists who need a balance between speed and fidelity.

Benchmark Performance

Relevant Benchmarks
For diffusion models, the most informative metrics are:

  • Inference time per image (seconds) at a given resolution and number of denoising steps.
  • VRAM consumption (GB) during generation.
  • Qualitative scores such as FID (Fréchet Inception Distance) and CLIP‑Score on standard benchmark datasets (e.g., MS‑COCO, LAION‑Aesthetics).

Reported Numbers (from the original FLUX.2‑dev repo)

  • FID: ~12.3 on MS‑COCO (28‑step pipeline, 1024×1024).
  • CLIP‑Score: 0.78 (higher is better).
  • Inference Speed: ~7 s per image on an NVIDIA RTX 4090 (28 steps) and ~3 s per image with the Turbo LoRA (12 steps).
  • VRAM Usage: ~12 GB (quantized) vs. ~24 GB (full‑precision).

Why These Benchmarks Matter

  • FID directly correlates with visual realism – a lower score indicates that generated images are statistically closer to real photographs.
  • CLIP‑Score reflects how well the image aligns with the textual prompt, crucial for prompt‑driven workflows.
  • Inference speed and VRAM footprint determine the feasibility of real‑time or batch generation on consumer‑grade hardware.

Comparison to Similar Models

  • Stable Diffusion 2.1 (full‑precision) – FID ~13.5, VRAM ~10 GB, but slower (~9 s on RTX 4090).
  • Midjourney‑style proprietary models – often higher CLIP‑Score but require proprietary APIs and higher cost.
  • Flux2‑Dev (Turbo) – offers a sweet spot: comparable FID to the original FLUX.2‑dev, half the inference time, and a modest VRAM reduction thanks to quantization.

Hardware Requirements

VRAM Requirements

  • Quantized checkpoint: ~12 GB VRAM for full‑resolution (1024×1024) generation.
  • Turbo LoRA adds ~0.5 GB additional memory.
  • For 512×512 outputs, VRAM drops to ~8 GB, making the model usable on high‑end consumer GPUs such as RTX 3080 (10 GB) with reduced batch size.

Recommended GPU Specifications

  • Best: NVIDIA RTX 4090 / RTX 6000 Ada (24 GB) – enables batch‑size‑2 or higher and full‑resolution generation with headroom for other UI processes.
  • Acceptable: RTX 3080‑Ti (12 GB) or RTX A6000 (48 GB) – can run single‑image pipelines at 1024×1024.
  • Minimum: RTX 3060 (12 GB) – may need to lower resolution to 768×768 or use the Turbo LoRA to stay within memory limits.

CPU & Storage

  • CPU is not a bottleneck for diffusion inference; a modern 8‑core processor (e.g., AMD Ryzen 7 5800X) is sufficient.
  • Storage: the quantized .safetensors file is ~12 GB. SSD (NVMe preferred) ensures fast loading times; HDDs are usable but will add noticeable latency on first load.

Performance Characteristics

  • Latency scales linearly with the number of denoising steps – Turbo LoRA cuts steps roughly in half with a modest quality trade‑off.
  • GPU memory usage is dominated by the latent diffusion UNet; quantization reduces the memory bandwidth pressure, allowing slightly higher batch sizes on the same hardware.
  • Batch inference (multiple prompts) is feasible on GPUs with ≥24 GB VRAM, achieving ~0.5 s per additional image after the first.

Use Cases

Primary Intended Applications

  • Creative concept art generation – rapid iteration on visual ideas for games, animation, and storyboarding.
  • Marketing collateral – producing high‑resolution product mock‑ups, social‑media visuals, and ad creatives without a photography shoot.
  • Educational tools – teaching diffusion concepts, prompt engineering, and AI‑assisted design in university labs.
  • Prototyping UI/UX mock‑ups – generating realistic background images, icons, or illustrations for rapid UI design.

Real‑World Examples

  • A small indie game studio used Flux2‑Dev to generate concept sketches for a fantasy world, cutting concept‑art costs by ~70 %.
  • A digital marketing agency integrated the Turbo LoRA into their ComfyUI pipeline to produce 1080p banner images on demand, reducing turnaround from days to minutes.
  • University art courses employed the model for “AI‑augmented painting” assignments, allowing students to explore style transfer and prompt‑driven composition.

Integration Possibilities

  • Native support in ComfyUI – drop the .safetensors file into the models/ folder and start using the pre‑built Flux2‑Dev nodes.
  • API wrappers (e.g., diffusers, invokeai) can load the model via torch.load with the torch_dtype=torch.float16 flag.
  • LoRA adapters (Turbo, style‑specific LoRAs) can be stacked on top of the base model for domain‑specific fine‑tuning without retraining the full checkpoint.

Training Details

Training Methodology
While the exact training script is not publicly disclosed, the FLUX.2‑dev family follows a two‑stage approach:

  • Stage 1 – Base Diffusion Training: Trained on a filtered subset of LAION‑Aesthetics (≈2 B image‑text pairs) using a latent diffusion pipeline with a 1280×1280 latent space. The training employed a cosine noise schedule and classifier‑free guidance with a guidance scale of 7.5.
  • Stage 2 – Quantization & Turbo LoRA: After the base model converged, int8/float16 quantization was applied using a custom post‑training quantizer. A lightweight LoRA (rank‑4) was then fine‑tuned on a 50 M image subset to accelerate the denoising steps, yielding the “Turbo” variant.

Datasets Used

  • Primary: LAION‑Aesthetics (filtered for high‑quality, diverse content).
  • Supplementary: curated proprietary datasets for style diversity (e.g., anime, photorealism) used during LoRA fine‑tuning.

Compute Requirements

  • Base training: ~1,200 GPU‑hours on a cluster of 8× NVIDIA A100‑80 GB (mixed‑precision FP16).
  • Quantization & Turbo LoRA fine‑tuning: ~150 GPU‑hours on a single A100‑40 GB.

Fine‑Tuning Cap

Licensing Information

License Summary
The model is released under the FLUX‑1‑dev‑non‑commercial‑license (a custom “other” license). The exact wording permits research, personal, and non‑commercial use but explicitly restricts commercial exploitation without prior written permission from the rights holder.

Commercial Use

  • Direct commercial deployment (e.g., SaaS offering, paid image generation service) is prohibited under the current license.
  • Embedding the model in a product that is sold or monetized requires a separate commercial license agreement with the original authors (Black‑Forest Labs).

Restrictions & Requirements

  • Attribution: any public distribution must credit “Black‑Forest Labs – FLUX‑1‑dev” and provide a link to the original license.
  • No redistribution of the model as part of a larger commercial package without explicit permission.
  • Derivatives (e.g., fine‑tuned LoRAs) must also be released under a compatible non‑commercial license unless a commercial license is obtained.

Implications for Users

  • Researchers, hobbyists, and educators can freely experiment, publish results, and share findings as long as they do not monetize the output.
  • Enterprises interested in using Flux2‑Dev for product‑related image generation should contact Black‑Forest Labs for a commercial licensing agreement.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives