DiffSynth-Studio/AttriCtrl-FLUX.1-Dev

🤗 Hugging Face 来源apache-2.0216 MBother✓ 6 个校验和今天更新
一条命令提交

在你的模型文件夹旁边运行它。它会制作种子、将文件与 Hugging Face 比对,然后提交。你只需开始做种,并粘贴你账户中的密钥。它只读取你的文件,绝不修改。如果愿意,可以先阅读脚本。

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo DiffSynth-Studio/AttriCtrl-FLUX.1-Dev ./model-folder
需要做种者 →

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

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

git clone https://github.com/modelscope/DiffSynth-Studio.git  
cd DiffSynth-Studio
pip install -e .
import torch
from diffsynth.pipelines.flux_image_new import FluxImagePipeline, ModelConfig
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")