Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.34 KB

README.md

File metadata and controls

37 lines (24 loc) · 1.34 KB

SRT2I: Self-rewarding generative text-to-image models

INTRODUCTION

Self-rewarding mechanism selfrewarding

USAGE INSTRUCTION

INSTALLATION

  1. Clone the repository and install dependencies using
git clone /~https://github.com/safouaneelg/SRT2I.git
  1. Create a conda environment (optional but recommended) from environment.yml
conda create env
conda activate srt2i

USAGE

Step-by-step self-rewarding

  1. 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.

  1. The subsequent step is the generation of images from prompts, which can be done by using diffusion model

Licence

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