Cog-Face-to-Many Project Overview
Cog-Face-to-Many is an innovative project designed to transform any face into various artistic styles, including 3D, pixel art, video game, claymation, and toy-like appearances. This versatile model can be run on two platforms: Replicate and ComfyUI.
How to Run the Model
- Replicate Platform: You can explore the features by visiting the following link: Replicate Project.
- ComfyUI Interface: For those preferring a more hands-on approach, the model can be executed using ComfyUI available here: ComfyUI Model.
To get started with ComfyUI, it is necessary to integrate a few custom nodes for optimal performance:
- ComfyUI Controlnet Aux
- ComfyUI InstantID
- ComfyUI IPAdapter Plus
- ComfyUI Essentials
- Efficiency Nodes ComfyUI
Artistic Styles - Loras
The creative loras, catering to the different styles like 3D, video game, pixel art, claymation, and toy, have been crafted by the artist artificialguybr. To support and follow artificialguybr for more creative works, you can visit:
- Patreon: Support on Patreon
- Ko-fi: Donate on Ko-fi
- Twitter: Follow on Twitter
Running Locally
For individuals interested in locally developing the project, the following steps are outlined:
-
Clone the Repository: Obtain the project files through Git:
git clone --recurse-submodules https://github.com/fofr/cog-face-to-many.git && cd cog-face-to-many/ComfyUI
-
Environment Setup: Set up a Python virtual environment and activate it:
python3 -m venv . && source bin/activate
-
Install Dependencies: Ensure all necessary files are available:
pip install -r requirements.txt
-
Download Required Files:
- AlbedobaseXL safetensor:
wget https://huggingface.co/frankjoshua/albedobaseXL_v13/resolve/main/albedobaseXL_v13.safetensors?download=true -O models/checkpoints/albedobaseXL_v13.safetensors
- Antelopev2 model:
git clone https://huggingface.co/DIAMONIK7777/antelopev2 models/insightface/models/antelopev2
- InstantID IP adapter:
wget https://huggingface.co/Aitrepreneur/InstantID-Controlnet/resolve/main/checkpoints/ip-adapter.bin?download=true -O models/instantid/instantid-ip-adapter.bin
- InstantID controlnet:
wget https://huggingface.co/Aitrepreneur/InstantID-Controlnet/resolve/main/checkpoints/ControlNetModel/diffusion_pytorch_model.safetensors?download=true -O models/controlnet/instantid-controlnet.safetensors
- AlbedobaseXL safetensor:
-
Install Custom Nodes: Run the script to configure all custom nodes:
./scripts/clone_plugins.sh
-
Run the Project: Finally, initiate the program:
python3 main.py
Web Interface via Cog Container
For more advanced setups, the project can be accessed using a Cog container equipped with a GPU:
-
Starting Cog Container: Launch the Cog environment, exposing the required port:
sudo cog run -p 8188 bash
-
Server Initialization: Inside the container, start the server:
cd ComfyUI/ python main.py --listen 0.0.0.0
-
Accessing the Web UI: Using the server's IP and the network port, connect to:
http://<gpu-machines-ip>:8188
Upon navigating to this URL, users will be greeted with the familiar ComfyUI web form, allowing them to explore the project's capabilities through a user-friendly interface.