AI Personal Learning
and practical guidance
豆包Marscode1

InfiniteYou: a photo generation and editing tool that preserves facial features

General Introduction

InfiniteYou is an open source project developed by the ByteDance Intelligent Creation Team. It is based on Diffusion Transformers (DiTs) technology, using the FLUXThe core function of the .1-dev model is to allow users to upload a photo and enter a text description to generate a new image while preserving the identity of the person. The project uses InfuseNet technology to improve identity similarity, combined with multi-stage training to optimize image quality and text alignment.InfiniteYou was released in March 2025 with code, model, and an online demo, and has received a lot of attention from the technical community. It supports multiple plug-ins and is simple to use for developers, researchers, and general users.

InfiniteYou:保留人脸特征的照片生成与编辑工具-1


 

Function List

  • Identity retention remodeling: Upload a photo and text description to generate a new image and maintain the person's facial features.
  • High quality image generation: Outputs clear images and reduces blurring, hand distortion, and other problems.
  • Text alignment optimization: Generate results that are highly consistent with the description content to avoid bias.
  • Model Selection: Provided aes_stage2(aesthetics preferred) and sim_stage1(Identity first) two modes.
  • Plug-in extensions: Supports ControlNet, LoRA, IP-Adapter, etc. for increased generation flexibility.

 

Using Help

Installation process

InfiniteYou requires local installation to work. Below are the detailed steps:

  1. environmental preparation
    • Make sure Python 3.8 or later is installed on your system.
    • Install Git for downloading code.
    • NVIDIA GPUs and CUDA are recommended to improve generation speed.
  2. Cloning Code
    Enter it in the terminal:
git clone https://github.com/bytedance/InfiniteYou.git

Go to the catalog:

cd InfiniteYou
  1. Installation of dependencies
    Execute the following command to install the required libraries:
pip install -r requirements.txt

If you are using a GPU, you need to install the corresponding PyTorch version, for example:

pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu124
  1. Download model
    Visit https://huggingface.co/ByteDance/InfiniteYou to download infu_flux_v1.0 folder in the aes_stage2 maybe sim_stage1 model into the corresponding location in the project directory.
  2. Running Demo
    Install Gradio:
pip install gradio

Launch the local interface:

python app.py

The browser will open http://127.0.0.1:7860The following is an example of how to use it.

Main Functions

Identity Retention Photo Remodeling

  1. Upload photos
    Click "Upload Identity Image" in the Gradio interface and select a clear photo of your face.
  2. Input Description
    Enter a specific description in the "Prompt text" box, e.g. "A woman in a red dress in the forest".
  3. Setting parameters
  • Model Selection:aes_stage2 Focusing on aesthetics.sim_stage1 Emphasize identity similarity.
  • Parameter adjustment: default infusenet_conditioning_scale because of 1.0(math.) genusinfusenet_guidance_start because of 0.0. If the identities are not similar enough, try tuning the latter to the 0.1The
  • Seed value (Seed): keep the default or set manually.
  1. Generating images
    Click "Generate" and wait about 120 seconds for the result to be displayed on the screen.

Rapid Script Reasoning

Runs in the terminal:

python test.py --id_image ./assets/examples/yann-lecun_resize.jpg --prompt "一个男人,肖像,电影风格" --out_results_dir ./results

The generated results are saved in the results Folder.

Online Demo

Visit https://huggingface.co/spaces/ByteDance/InfiniteYou-FLUX to try it out without installation.

Plug-in use

  • ControlNet: Upload a pose reference image to control the action that generates the result.
  • LoRA: The Realism and Anti-blur plug-ins are supported, the path must be specified manually, for example <path_to_lora>The
  • IP-Adapter: Add a style reference chart for personalized styling.

Example of operation

Want to generate an image of "man in suit in conference room":

  1. Upload a photo of the man.
  2. Enter a description: "A man in a suit in a meeting room".
  3. option aes_stage2Click on "Generate".
  4. Check the results and add the words "a man" if you need to adjust the gender.

caveat

  • Photos need to be clear on the front and avoid blocking.
  • Be specific in your descriptions and avoid vague words such as "beautiful".
  • Generation time varies by hardware and can be as short as 30-60 seconds for GPUs.

 

application scenario

  1. Social Media Content
    Users upload a selfie and type in "wearing gym clothes at the gym" to generate a fitness-themed photo for sharing.
  2. art
    The artist uploads a portrait depicting a "knight in medieval costume" to generate a conceptual design.
  3. research test
    The researchers used InfiniteYou to compare identity retention effects and validate the performance of the generated models.

 

QA

  1. Is it free?
    Yes. The code and model are open source and free to use for academic research.
  2. How long does it take to generate?
    120 seconds on average, faster with the GPU.
  3. Does it support multiplayer photos?
    Currently optimized for single player, multiplayer support needs further development.
May not be reproduced without permission:Chief AI Sharing Circle " InfiniteYou: a photo generation and editing tool that preserves facial features
en_USEnglish