OminiControl: Minimal and Universal Control for Diffusion Transformer
Zhenxiong Tan, Songhua Liu, Xingyi Yang, Qiaochu Xue, and Xinchao Wang
xML Lab, National University of Singapore
OminiControl2: Efficient Conditioning for Diffusion Transformers
Zhenxiong Tan, Qiaochu Xue, Xingyi Yang, Songhua Liu, and Xinchao Wang
xML Lab, National University of Singapore
OminiControl is a minimal yet powerful universal control framework for Diffusion Transformer models like FLUX.
-
Universal Control π: A unified control framework that supports both subject-driven control and spatial control (such as edge-guided and in-painting generation).
-
Minimal Design π: Injects control signals while preserving original model structure. Only introduces 0.1% additional parameters to the base model.
- 2026-07-02: Codebase updated for
diffusers0.38.generate()gains acondition_scaleargument to adjust condition strength, subject-driven generation now works onFLUX.1-dev(see example), and OminiControl2's KV-cache fast inference (kv_cache=True) is now documented (see Usage example). - 2025-05-12: βοΈ The code of OminiControl2 is released. It introduces a new efficient conditioning method for diffusion transformers. (Check out the training code here).
- 2025-05-12: Support custom style LoRA. (Check out the example).
- 2025-04-09: βοΈ OminiControl Art is released. It can stylize any image with an artistic style. (Check out the demo and inference examples).
- 2024-12-26: Training code is released. Now you can create your own OminiControl model by customizing any control tasks (3D, multi-view, pose-guided, try-on, etc.) with the FLUX model. Check the training folder for more details.
- Environment setup
conda create -n omini python=3.12
conda activate omini- Torch installation (pick the index URL matching your CUDA version)
pip install torch==2.8.0 --index-url https://download.pytorch.org/whl/cu128- Requirements installation
pip install -r requirements.txt- Subject-driven generation:
examples/subject.ipynb(onFLUX.1-dev:examples/subject_dev.ipynb) - Subject-driven generation at 1024x1024:
examples/subject_1024.ipynb(best quality with the 1024-trained model) - In-painting:
examples/inpainting.ipynb - Canny edge to image, depth to image, colorization, deblurring:
examples/spatial.ipynb - Combining with a custom style LoRA:
examples/combine_with_style_lora.ipynb - Image stylization (OminiControl Art):
examples/ominicontrol_art.ipynb
Note (multiple LoRAs): if you load more than one adapter via repeated
pipe.load_lora_weights(..., adapter_name=...)calls, activate them explicitly withpipe.set_adapters(["adapter_a", "adapter_b"])β otherwise only the last-loaded adapter stays active and the others are silently ignored. Seeexamples/spatial.ipynbfor the pattern.
generate() accepts a condition_scale argument (default 1.0, which reproduces the original behavior exactly). Values > 1 strengthen the condition image's influence, values < 1 weaken it, and 0 suppresses it entirely.
result = generate(pipe, prompt=prompt, conditions=[condition], condition_scale=1.3)Pass kv_cache=True to generate() to compute the condition branch's keys/values once and reuse them across all remaining steps (~1.5x end-to-end speedup at 8 steps). This requires a LoRA trained with independent_condition: true β see Efficient Generation (OminiControl2).
- Center-crop and resize your input image to the model's native resolution (512x512 for
subject/subject_512, 1024x1024 forsubject_1024_beta) before passing it in β the pipeline does not do this automatically. See the example notebooks for the preprocessing code. - When writing prompts, refer to the subject using phrases like
this item,the object, orit. e.g.- A close up view of this item. It is placed on a wooden table.
- A young lady is wearing this shirt.
- The model primarily works with objects rather than human subjects currently, due to the absence of human data in training.
Demos (Left: condition image; Right: generated image)
Text Prompts
- Prompt1: A close up view of this item. It is placed on a wooden table. The background is a dark room, the TV is on, and the screen is showing a cooking show. With text on the screen that reads 'Omini Control!.'
- Prompt2: A film style shot. On the moon, this item drives across the moon surface. A flag on it reads 'Omini'. The background is that Earth looms large in the foreground.
- Prompt3: In a Bauhaus style room, this item is placed on a shiny glass table, with a vase of flowers next to it. In the afternoon sun, the shadows of the blinds are cast on the wall.
- Prompt4: On the beach, a lady sits under a beach umbrella with 'Omini' written on it. She's wearing this shirt and has a big smile on her face, with her surfboard hehind her. The sun is setting in the background. The sky is a beautiful shade of orange and purple.
- Image Inpainting (Left: original image; Center: masked image; Right: filled image)
- Prompt: The Mona Lisa is wearing a white VR headset with 'Omini' written on it.

- Prompt: A yellow book with the word 'OMINI' in large font on the cover. The text 'for FLUX' appears at the bottom.

-
Other spatially aligned tasks (Canny edge to image, depth to image, colorization, deblurring)
Subject-driven control:
| Model | Description | Resolution |
|---|---|---|
experimental / subject |
The model used in the paper. | (512, 512) |
omini / subject_512 |
The model has been fine-tuned on a larger dataset. | (512, 512) |
omini / subject_1024_beta |
The model has been fine-tuned on a larger dataset and trained at 1024x1024. | (1024, 1024) |
oye-cartoon |
Fine-tuned on the oye-cartoon dataset by @saquib764 (for FLUX.1-dev) |
(512, 512) |
The subject LoRAs were trained on
FLUX.1-dev. When running them onFLUX.1-dev, enable real image guidance (image_guidance_scale > 1.0, keepguidance_scale=3.5) β seeexamples/subject_dev.ipynb. They also run onFLUX.1-schnell(as in the example notebooks), where no image guidance is needed.
subject_1024_betawas trained at 1024x1024 and gives its best results at that resolution. The weight currently lives in a non-main revision of the HF repo β passrevision=when loading it (seeexamples/subject_1024.ipynb).
Spatially aligned control:
| Model | Description | Resolution |
|---|---|---|
experimental / <task_name> |
Canny edge to image (canny), depth to image (depth), colorization (coloring), deblurring (deblurring), in-painting (fill). Works on both FLUX.1-dev and FLUX.1-schnell. |
(512, 512) |
- ComfyUI-Diffusers-OminiControl - ComfyUI integration by @Macoron
- ComfyUI_RH_OminiControl - ComfyUI integration by @HM-RunningHub
- The model's subject-driven generation primarily works with objects rather than human subjects due to the absence of human data in training.
- The subject-driven LoRAs were trained on
FLUX.1-dev. When running them onFLUX.1-dev, you must use real image guidance: callgenerate(...)withimage_guidance_scale > 1.0(e.g.1.5) and more steps (~20β28) β without it,FLUX.1-devtends to ignore the condition.image_guidance_scaleis the tunable CFG knob; the distilledguidance_scalemust be kept at3.5(the value used in training, for train/inference consistency β it is not a free hyperparameter). Seeexamples/subject_dev.ipynb. OnFLUX.1-schnell(as in the example notebooks), no image guidance is needed. - The
subject/subject_512and spatial LoRAs were trained at 512x512 and work best at that resolution;subject_1024_betawas trained at 1024x1024 and gives its best results there (seeexamples/subject_1024.ipynb). Non-square resolutions (e.g. 512x768) also work.
Training instructions can be found in this folder.
- Release the training code.
- Release the model for higher resolution (1024x1024).
We would like to acknowledge that the computational work involved in this research work is partially supported by NUS ITβs Research Computing group using grant numbers NUSREC-HPC-00001.
@inproceedings{tan2025ominicontrol,
title={OminiControl: Minimal and Universal Control for Diffusion Transformer},
author={Tan, Zhenxiong and Liu, Songhua and Yang, Xingyi and Xue, Qiaochu and Wang, Xinchao},
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
year={2025}
}
@inproceedings{tan2026ominicontrol2,
title={Ominicontrol2: Efficient conditioning for diffusion transformers},
author={Tan, Zhenxiong and Xue, Qiaochu and Yang, Xingyi and Liu, Songhua and Wang, Xinchao},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={4256--4265},
year={2026}
}