This is a basic way of creating an image using stabilityai/stable-diffusion-2 ref: https://huggingface.co/stabilityai/stable-diffusion-2-1
This project aims at analysing possible biases in existing text-to-image generative models and propose a novel approach for their mitigation. We successively investigated the use of Genetic Algorithms (GA) and prompt optimisation to mitigate inherent skintone and gender biases in text-to-image generative models, with a focus on the Stable Diffusion model. Our approach involved fine-tuning the Stable Diffusion model’s hyperparameters using a GA to generate more diverse and balanced images. Additionally, we employed prompt optimization techniques, iteratively refining the text prompts based on the model’s output to further mitigate biases
Check individual READMEs on how to run each experiment
We used the same seeded prompts for each experiment that was generated by GPT-4, telling GPT-4 to describe each profession in 20 words Here's the seeded prompts Software Engineer: "A medium-height person with glasses, casual attire, working on multiple screens in a modern office space" Nurse: "An efficient nurse in green uniform, sporting glasses, carrying a diagnostics kit, with a look of determination."