### Install Dependencies Source: https://github.com/bytedance/infiniteyou/blob/main/README.md Run this command to install all necessary Python packages. It is recommended to do this within a Python virtual environment. ```bash pip install -r requirements.txt ``` -------------------------------- ### Launch Local Gradio Demo Source: https://github.com/bytedance/infiniteyou/blob/main/README.md Start the local Gradio demo application by running the app.py script. This provides a user-friendly interface for interacting with the model. ```bash python app.py ``` -------------------------------- ### Combine CPU Offloading and 8-bit Quantization Source: https://github.com/bytedance/infiniteyou/blob/main/README.md Specify both `--cpu_offload` and `--quantize_8bit` arguments in test.py to further reduce peak VRAM usage to approximately 16GB with similar performance. ```python --cpu_offload --quantize_8bit ``` -------------------------------- ### Run Local Inference Script Source: https://github.com/bytedance/infiniteyou/blob/main/README.md Execute the local inference script with specified image, prompt, and output directory. Ensure all arguments are correctly provided for desired results. ```bash python test.py --id_image ./assets/examples/man.jpg --prompt "A man, portrait, cinematic" --out_results_dir ./results ``` -------------------------------- ### Enable CPU Offloading for Reduced VRAM Source: https://github.com/bytedance/infiniteyou/blob/main/README.md Specify the `--cpu_offload` argument in test.py to reduce peak VRAM usage to approximately 30GB without performance loss. ```python --cpu_offload ``` -------------------------------- ### Enable 8-bit Quantization for Reduced VRAM Source: https://github.com/bytedance/infiniteyou/blob/main/README.md Specify the `--quantize_8bit` argument in test.py to reduce peak VRAM usage to approximately 24GB with similar performance. ```python --quantize_8bit ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.