January 28, 2024

Reducing prompt to AI without losing the original meaning

Principles of prompt construction

We have all encountered the fact that our prompt could become too large and with the slightest change in the request parameters, the image no longer turns out the way we need. It is for this reason that it is very important to understand the basics of constructing prompts and their abbreviation.

First of all, I want to remind you of the principle of constructing a prompt. I talked about this in more detail here:

RU: https://teletype.in/@ai2goschool/ai-everyone-lesson-3-2

EN: https://teletype.in/@ai2goschool/ai-everyone-lesson-3-2-en

In general it looks like this. The example is general and is aimed at understanding the sequence of parameters in a prompt.

[OBJECT] [LOCATION] [LIGHTING PARAMETERS] [TECHNICAL PARAMETERS (if any) - such as --ar 16:9(Midjourney), etc.].

Understanding these basics, you can easily build your prompt and not get confused in it.

Prompt abbreviation

Having analyzed and remembered the basics of constructing a prompt, we can proceed directly to studying the basics of abbreviating a prompt. In the vastness of seaart, I found a very long prompt (I specifically found a very long one to show you how not to do it).

  • SFW:2, 1girl, top quality, masterpiece, illustration, very delicate and beautiful,(Gigantic Breasts:1.5)Intricate Body Details(Milf: 1.5)(breasts squeeze: 1.3)(bimbo 1.5)(Disproportional Tits: 1.3)Rangiku Matsumoto,Orange Hair[Long Hair],gray eyes, highly detailed, CG, unity, 8k wallpaper, amazing, detailed, masterpiece, top quality, official art, highly detailed CG unity 8k wallpaper, silly, incredibly silly, huge breasts, super detailed, high resolution, highly detailed, beautiful detailed girls, highly detailed eyes and faces, beautiful detailed eyes, (RAW photos, best Quality), (realistic, photorealistic: 1.3), light on face, full body, full body shot, no white pattern, slingshot bikini, smooth, glossy, side breasts, lower breasts, waist, thighs gap, ((triangular face)), (orange hair: 1.3), long hair, (big governor's eyes), ((puffy eyes)), (( (huge breasts:1.5))), ((delusion milk)) , (K-pop idol), (Aegyo monkey), bangs, ((beach Scenes)), skinny,Sexy Pose,Alluring[[[[intricate-perfect-fingers-on-hands]]]], [Perfect-Hyper-Detailed Blue-Eyes],hand101, platform heels, (smile), happy, looking at viewer, facing front , (( (cleavage))), sexy, blue eye, temptation, gray eyeliner, long eyelashes, blushing cheeks, smile, shy, breast enhancement, young,orange hair, Matsumoto Rangiku, ((orange Stocking color)),((Bra orange color)),(thigh high stockings: 1.3),

As a result, we will get this image

https://www.seaart.ai/explore/detail/cia2ut94msb3rugsr2e0?u_code=46RK7R

As we can see the image turns out good. But it is clear that the request to obtain such a result is too large and it can and should be reduced.

First of all, we format the request elements. After studying the entire request, removing duplicate elements from it and highlighting the main components, it became clear what blocks the prompt consists of.

In general, a prompt consists of several main parts:

  • Image quality
  • SFW:2,  top quality, masterpiece, high resolution, highly detailed, CG, unity, 8k wallpaper,  (realistic, photorealistic: 1.3),  illustration,
  • Character
  • 1girl,  Rangiku Matsumoto, 
  • Face
  • Long Hair, Orange Hair,  gray eyes, (smile), happy, looking at viewer, facing front,
  • Body
  • (Gigantic Breasts:1.5), side breasts, lower breasts,  slingshot bikini,  ((Bra orange color)),
  • Camera
  • full body shot,
  • Background
  • ((beach Scenes)),

Knowing all this, we can rebuild the prompt as follows

  • SFW:2,  top quality, masterpiece, high resolution, highly detailed, CG, unity, 8k wallpaper,  (realistic, photorealistic: 1.3),  illustration, 1girl,  Rangiku Matsumoto,  Long Hair, Orange Hair,  gray eyes, (smile), happy, looking at viewer, facing front, (Gigantic Breasts:1.5), side breasts, lower breasts,  slingshot bikini,  ((Bra orange color)), full body shot, ((beach Scenes))

But that’s not all that can be done with this request. First of all, we can shorten the "Face" block by combining the elements into one:

  • long orange hair, gray eyes, (smile), happy, looking at viewer, facing front,

We can also shorten the “Physique” block by also combining the elements into one and removing the double brackets (they are used to increase the significance of half a meter in the query):

  • (gigantic side breasts:1.5), lower breasts, orange slingshot bikini

We can also remove all double brackets from the rest of the prompt and replace them with regular brackets.

So the request should look like this:

  • SFW:2, top quality, masterpiece, high resolution, highly detailed, CG, unity, 8k wallpaper, (realistic, photorealistic: 1.3), illustration, 1girl, Rangiku Matsumoto, long orange hair, gray eyes, smile, happy, looking at viewer, facing front, (gigantic side breasts:1.5), lower breasts, (orange bikini), full body shot, (beach scenes)
https://www.seaart.ai/explore/detail/cmr4k9de878c73fbcb60?u_code=46RK7R

As you can see, after changing the prompt, its meaning was not lost, and the final result is even better than it was before.

In conclusion to this tutorial, I want to show what structure was used to build this prompt:

  • Image quality
  • Character
  • Face
  • Body
  • Camera
  • Background

Mainly I want to draw your attention to the sequence of elements. For seaart, this sequence is universal and gives the best result. If you adhere to the rules laid out in this tutorial, then you should not have any problems with composing requests.

You can also see examples of how to use prompts in my telegram group, where I share ready-made algorithms and image creation tweaks every day.