File size: 2,406 Bytes
334a6cc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
---
license: apache-2.0
---
# AttriCtrl Numerical Image Generation Control Model
## Introduction
AttriCtrl enables fine-grained control of numerical image attributes during image generation.
For more details, please refer to our paper: [AttriCtrl: Fine-Grained Control of Aesthetic Attribute Intensity in Diffusion Models](https://arxiv.org/abs/2508.02151)
## Result Demonstration
### Brightness
|scale = 0.1|scale = 0.3|scale = 0.5|scale = 0.7|scale = 0.9|
|-|-|-|-|-|
||||||
### Detail
|scale = 0.1|scale = 0.3|scale = 0.5|scale = 0.7|scale = 0.9|
|-|-|-|-|-|
||||||
### Realism
|scale = 0.1|scale = 0.3|scale = 0.5|scale = 0.7|scale = 0.9|
|-|-|-|-|-|
||||||
## Inference Code
```shell
git clone https://github.com/modelscope/DiffSynth-Studio.git
cd DiffSynth-Studio
pip install -e .
```
```python
import torch
from diffsynth.pipelines.flux_image_new import FluxImagePipeline, ModelConfig
```
```python
pipe = FluxImagePipeline.from_pretrained(
torch_dtype=torch.bfloat16,
device="cuda",
model_configs=[
ModelConfig(model_id="black-forest-labs/FLUX.1-dev", origin_file_pattern="flux1-dev.safetensors"),
ModelConfig(model_id="black-forest-labs/FLUX.1-dev", origin_file_pattern="text_encoder/model.safetensors"),
ModelConfig(model_id="black-forest-labs/FLUX.1-dev", origin_file_pattern="text_encoder_2/"),
ModelConfig(model_id="black-forest-labs/FLUX.1-dev", origin_file_pattern="ae.safetensors"),
ModelConfig(model_id="DiffSynth-Studio/AttriCtrl-FLUX.1-Dev", origin_file_pattern="models/detail.safetensors")
],
)
for i in [0.1, 0.3, 0.5, 0.7, 0.9]:
image = pipe(prompt="a cat on the beach", seed=2, value_controller_inputs=[i])
image.save(f"value_control_{i}.jpg")
``` |