Taking some inspiration from [fm-ai-face-generator](https://github.com/emilmirzayev/fm-ai-face-generator), but not wanting to pay for a hosted service (I already have AI _stuff_ setup on my home server) I started to rewrite chunks to make compatible with a hosted Comfy UI instance, after awhile, I had rewritten so much, that this is now a new beast in itself..
Also taking inspiration from [NewGAN-Manager](https://github.com/franl08/NewGAN-Manager) and reworking some of thier code for my uses.
So what does this do? Why would you want to use it? (you probably wont but personally, I like a bit more personallisation 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 installed
- Git installed
- A ComfyUI installation (On hosted server, or [portable](https://github.com/YanWenKun/ComfyUI-Windows-Portable))
- My suggestion it to use the [Realistic Vision 6](https://civitai.com/models/4201/realistic-vision-v60-b1) model
If you have that, then carry on for Windows 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`
- 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. Defautls to `2024`
- output_dir - Where to save the generated set. Defaults to `./generated_images/`
- comfyui_url - HTTP location of your comfyui installation.
- model - Model to be used, by default `realisticVisionV60B1_v51HyperVAE.safetensors` is set, this is my suggested model at the moment.
- At this point you should be able to run and start to generate by running the command `python comfy_fm_newgen.py --rtf_file ExportedFile.rtf`
- ExportedFile is the name of the file that you exported and saved with your newgen list
You should get some console output of the progress, good luck!