Taking inspiration from [fm-ai-face-generator](https://github.com/emilmirzayev/fm-ai-face-generator) and [NewGAN-Manager](https://github.com/franl08/NewGAN-Manager), this tool generates unique face images for Football Manager NewGens using local Stable Diffusion instead of requiring a separate ComfyUI server.
Thanks to both original projects for the inspiration!
So what does this do? Why would you want to use it? (you probably won't but personally, I like a bit more personalization from my NewGens, some I get quite attached to :) )
Things you will need that I will not be going over on how to setup.
- Python 3.8+ installed
- Git installed
- At least 4GB of RAM (8GB+ recommended for better performance)
- CUDA-compatible GPU (optional, but highly recommended for faster generation)
## Setup Instructions
- Use Git to checkout this repo
- You need to get a `rtf` file of the players you want to add images for, to do this you need the view and filter supplied with the project
- Copy the `filters` and `views` folder over to your `Football Manager 2024` data folder in `Documents`, this may create these folders, or may just add the contained files into your existing folders
- You can use `python INSTALL_VIEW_AND_FILTER.py` to do this automatically
- Included is the original `is newgen` filter created by the NewGAN-Manager team and a new view created by myself to get the needed data
- If you follow [this video](https://youtu.be/pmdIkhfmY6w?t=564) it will show you how to export the `rtf` file, you want to use our view, not the view in the video
- Once you have your `rtf` file add it to the root of the current repo
- Create a python virtual environment `python -m venv venv`
- Activate the venv `.\venv\Scripts\activate` (Windows) or `source venv/bin/activate` (Linux/Mac)
- Install the requirements `pip install -r requirements.txt`
- Copy the `user_config.cfg.sample` to `user_config.cfg` and make the needed changes
- football_manager_version - Version of FM to generate for. Defaults to `2024`
- output_dir - Where to save the generated set. Defaults to `./generated_images/`
- rtf_file - Path to your exported RTF file with player data
- model_name - Hugging Face model to use (see Model Selection section below)
- model_dir - Custom directory to store models (optional)
## Usage Options
### **🖥️ GUI Mode (Recommended)**
For the best user experience, use the graphical interface: