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.
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) andsim_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:
- 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.
- Cloning Code
Enter it in the terminal:
git clone https://github.com/bytedance/InfiniteYou.git
Go to the catalog:
cd InfiniteYou
- 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
- Download model
Visit https://huggingface.co/ByteDance/InfiniteYou to downloadinfu_flux_v1.0
folder in theaes_stage2
maybesim_stage1
model into the corresponding location in the project directory. - Running Demo
Install Gradio:
pip install gradio
Launch the local interface:
python app.py
The browser will open http://127.0.0.1:7860
The following is an example of how to use it.
Main Functions
Identity Retention Photo Remodeling
- Upload photos
Click "Upload Identity Image" in the Gradio interface and select a clear photo of your face. - Input Description
Enter a specific description in the "Prompt text" box, e.g. "A woman in a red dress in the forest". - Setting parameters
- Model Selection:
aes_stage2
Focusing on aesthetics.sim_stage1
Emphasize identity similarity. - Parameter adjustment: default
infusenet_conditioning_scale
because of1.0
(math.) genusinfusenet_guidance_start
because of0.0
. If the identities are not similar enough, try tuning the latter to the0.1
The - Seed value (Seed): keep the default or set manually.
- 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":
- Upload a photo of the man.
- Enter a description: "A man in a suit in a meeting room".
- option
aes_stage2
Click on "Generate". - 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
- Social Media Content
Users upload a selfie and type in "wearing gym clothes at the gym" to generate a fitness-themed photo for sharing. - art
The artist uploads a portrait depicting a "knight in medieval costume" to generate a conceptual design. - research test
The researchers used InfiniteYou to compare identity retention effects and validate the performance of the generated models.
QA
- Is it free?
Yes. The code and model are open source and free to use for academic research. - How long does it take to generate?
120 seconds on average, faster with the GPU. - Does it support multiplayer photos?
Currently optimized for single player, multiplayer support needs further development.