Skip to content

liuxiaoyu1104/SmartControl

Repository files navigation

SmartControl: Enhancing ControlNet for Handling Rough Visual Conditions

arXiv Project


1. Abstract

arch

For handling the disagreements between the text prompts and rough visual conditions, we propose a novel text-to-image generation method dubbed SmartControl, which is designed to align well with the text prompts while adaptively keeping useful information from the visual conditions. Specifically, we introduce a control scale predictor to identify conflict regions between the text prompt and visual condition and predict spatial adaptive scale based on the degree of conflict. The predicted control scale is employed to adaptively integrate the information from rough conditions and text prompts to achieve the flexible generation.

Release

  • [2024/3/31] 🔥 We release the code and models for depth condition.

Installation

pip install -r requirements.txt
# please install diffusers==0.25.1 to align with our forward

Download Models

you can download our control scale predictor models from here. To run the demo, you should also download the following models:

How to Use

  • If you are interested in SmartControl, you can refer to smartcontrol_demo

  • For integration our SmartControl to IP-Adapter, please download the IP-Adapter models and refer to smartcontrol_ipadapter_demo

    # download IP-Adapter models
    cd SmartControl
    git lfs install
    git clone https://huggingface.co/h94/IP-Adapter
    mv IP-Adapter/models models
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published