Introduction

ACE++ is an advanced model for instruction-based image creation and editing, leveraging context-aware content filling. Developed by ALI-VILAB, the model is designed to support various image editing and generation tasks, such as portrait consistency, subject-driven generation, and localized editing.

Architecture

The ACE++ model utilizes the FLUX.1-Fill-dev as its base model and focuses on maintaining consistency in generated images by applying advanced techniques like LoRA tuning. It offers different paths for portrait, subject, and local editing, each optimized for specific tasks.

Training

ACE++ is a post-training model built on the FLUX.1-dev series. It is designed for easy adaptation to various scenarios, allowing developers to fine-tune the model according to specific needs. The model supports tasks like image editing, content filling, and reference generation, making it versatile for different applications.

Guide: Running Locally

To run ACE++ locally, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/ali-vilab/ACE_plus.git
    
  2. Install Dependencies:

    cd ACE_plus
    pip install -r requirements.txt
    
  3. Set Environment Variables: Define paths for models and base model FLUX.1-Fill-dev using environment variables.

    export FLUX_FILL_PATH="hf://black-forest-labs/FLUX.1-Fill-dev"
    export PORTRAIT_MODEL_PATH="ms://iic/ACE_Plus@portrait/comfyui_portrait_lora64.safetensors"
    export SUBJECT_MODEL_PATH="ms://iic/ACE_Plus@subject/comfyui_subject_lora16.safetensors"
    export LOCAL_MODEL_PATH="ms://iic/ACE_Plus@local_editing/comfyui_local_lora16.safetensors"
    
  4. Run Inference: Execute the inference script to test and run examples.

    python infer.py
    
  5. Launch Demo: Use Gradio to launch a GUI demo.

    python demo.py
    

For optimal performance, it is recommended to use cloud GPUs, such as those provided by AWS or Google Cloud.

License

ACE++ is released under the MIT License, allowing for broad use and adaptation. Ensure to comply with the open-source licenses of the base models used, like FLUX.1-Fill-dev. If using the model for research, proper citation of related works is required.

More Related APIs