Using Chat-GPT to write better Image AI prompts

<p>Image generating AIs such as DAL-E or Midjourney tend to have somewhat limited language capabilities, and require short, to-the-point prompts.</p> <p>Writing such prompts can be a chore, especially since to get the right results, you may need to try different versions of the same &ldquo;image prompt&rdquo;.</p> <p>Here is where a text-based LLM such as Chat GPT can help fill the gap.</p> <p>Using prompt engineering, we can instruct Chat GPT to build a prompt aimed at an image-generating AI. The image-generating could be Chat GPT&rsquo;s sibling, DAL-E, or it could be an image generator from another organisation.</p> <p>The prompt we send to Chat GPT can generate several versions of the prompt, so we can experiment with the image generator. Also, we can ask Chat GPT to try generate a prompt such that the style of the image will suit the original text. For example, if the original text is a fantasy novel, or a financial blurb, we would want very different kinds of images for each.</p> <p>Because Chat GPT is also capable of summarizing text, the with this approach the original text can be much longer that what the image generator would normally be capable of processing. Chat GPT has a total token size of about 4000, leaving about 2000 tokens for the input, including our prompt. This could be about 500 words. Via a &lsquo;chunking&rsquo; step with a simple Python script, we can increase this limit, asking Chat GPT to summarise each chunk at a time, and then finally producing a &ldquo;summary of the summaries&rdquo;.</p> <p>In this way, we can automatically generate images for quite long input texts.</p> <p><a href="https://medium.com/@mr.sean.ryan/using-chat-gpt-to-write-better-image-ai-prompts-7e96ae143efd"><strong>Click Here</strong></a></p>
Tags: AI Prompts