- Clone the repository and install dependencies using
git clone /~https://github.com/safouaneelg/SRT2I.git
- Create a conda environment (optional but recommended) from environment.yml
conda create env
conda activate srt2i
Step-by-step self-rewarding
- First step is to generate the prompts for generative text-to-image diffusion model. This could be achieved using the following command:
python prompts_generator.py --model "TheBloke/Mistral-7B-Instruct-v0.2-AWQ" --class_list "llm/class_list.json" --output_prompts "generated_prompts.txt"
The default parameters are llm/class_list.json
(containing 80 classes from COCO datasets) and generated_prompts.txt
. A total of 80*5=400 prompts are generated. In case you generate new prompts for other classes please change with the appropriate names.
- The subsequent step is the generation of images from prompts, which can be done by using diffusion model
This code belongs to TOELT LLC and is open for research and development purposes only. No commercial use of this software is permitted. For additional information, contact: safouane.elghazouali@toelt.ai