diffusers / flux2-modular

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: December 11 2025
text-to-image

Introduction of flux2-modular

Model Details of flux2-modular

Setup

Install the latest version of diffusers

pip install git+https://github.com/huggingface/diffusers.git

Login to your Hugging Face account

hf auth login
How to use

The following code snippet demonstrates how to use the Flux2 modular pipeline with a remote text encoder and group offloading. It requires approximately 8GB of VRAM and 64GB of CPU RAM to generate an image.

import torch
from diffusers.modular_pipelines.flux2 import ALL_BLOCKS
from diffusers.modular_pipelines import SequentialPipelineBlocks

blocks = SequentialPipelineBlocks.from_blocks_dict(ALL_BLOCKS['remote'])
pipe = blocks.init_pipeline("diffusers/flux2-modular")
pipe.load_components(torch_dtype=torch.bfloat16, device_map="cpu")
pipe.vae.to("cuda")
pipe.transformer.enable_group_offload(
    offload_type="leaf_level",
    onload_device=torch.device("cuda"),
    offload_device=torch.device("cpu"),
    use_stream=True,
    low_cpu_mem_usage=True,
)

prompt = "a photo of a cat"
output = pipe(prompt=prompt, num_inference_steps=28, output="images")
output[0].save("flux2-modular.png")

Runs of diffusers flux2-modular on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About flux2-modular huggingface.co Model

flux2-modular huggingface.co

flux2-modular huggingface.co is an AI model on huggingface.co that provides flux2-modular's model effect (), which can be used instantly with this diffusers flux2-modular model. huggingface.co supports a free trial of the flux2-modular model, and also provides paid use of the flux2-modular. Support call flux2-modular model through api, including Node.js, Python, http.

flux2-modular huggingface.co Url

https://huggingface.co/diffusers/flux2-modular

diffusers flux2-modular online free

flux2-modular huggingface.co is an online trial and call api platform, which integrates flux2-modular's modeling effects, including api services, and provides a free online trial of flux2-modular, you can try flux2-modular online for free by clicking the link below.

diffusers flux2-modular online free url in huggingface.co:

https://huggingface.co/diffusers/flux2-modular

flux2-modular install

flux2-modular is an open source model from GitHub that offers a free installation service, and any user can find flux2-modular on GitHub to install. At the same time, huggingface.co provides the effect of flux2-modular install, users can directly use flux2-modular installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

flux2-modular install url in huggingface.co:

https://huggingface.co/diffusers/flux2-modular

Url of flux2-modular

flux2-modular huggingface.co Url

Provider of flux2-modular huggingface.co

diffusers
ORGANIZATIONS

Other API from diffusers

huggingface.co

Total runs: 46.7K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 22 2024
huggingface.co

Total runs: 4.3K
Run Growth: 2.5K
Growth Rate: 58.14%
Updated:February 08 2023
huggingface.co

Total runs: 645
Run Growth: 125
Growth Rate: 19.38%
Updated:February 24 2025
huggingface.co

Total runs: 30
Run Growth: 12
Growth Rate: 40.00%
Updated:February 07 2024
huggingface.co

Total runs: 16
Run Growth: -13
Growth Rate: -81.25%
Updated:January 27 2023