Emphasis, weighting () and down-weighting ⚠️ You might be doing it wrong! 😳
Hey 🙂TL;DR:Be careful when using weighting with SD 1.5. Use keyword order and detail instead (see below), then on SD 1.5 use weighting as an optional, complementary method.Barely use it or don't use it at all with SDXL (including Pony-based models and Illustrious) or SD 3.5. Use keyword order and detail instead.Don't use it at all with Flux! Weighting was developed for use with Stable Diffusion, which is an entirely different diffusion model. Flux uses natural language prompts, so correct punctuation is vital. Weighting is not natural language, so using weighting with Flux may damage image quality.With AI image generation, a lot has been written and discussed about how and when to use weighting, also known as attention, which is used in prompts in the following formats:(keyword:1.2)or((((keyword))))or[[keyword]]Unfortunately, much of the information in circulation is incorrect. The misuse of weighting risks damaging your image quality. See below for tips on how to best use weighting, including on when not to use it.Emphasis via keyword order and detailBy default, AI image-generation diffusion models on Tensor (both SD and Flux) use 2 techniques for understanding what are the most important elements of your image:Keyword order: what you put at the beginning of a prompt is given more attention by the AI than what goes at the end of the prompt; andDetail: the AI logically assumes that what you describe in the most detail is what you want most to see. Even if you add a specific, detailed image element near the end of the prompt, the AI will nevertheless pay more attention to it.Weighting with parentheses, e.g., (keyword:1.2)Like many of its competitors, for Stable Diffusion (SD), Tensor.Art has installed a plugin which allows you to "add weight" to a keyword in order to make the AI emphasize it when generating the image.⚠️ Ideally, adding weight should be used only after first optimizing the keyword order and detailed elements as described above — and IMO it should used sparingly.Also:Avoid using weighting with SDXL and SD 3.5. You might be able to get away with one minimally weighted keyword (using simple parentheses), but anything stronger will often damage image quality. The maker of SDXL (Stability AI) has expressly advised against using weighting with versions of SD more recent than 1.5 (SDXL and SD 3.5).Don't use curly brackets {}. On other installations of Stable Diffusion, curly brackets can be used for weighting — but not on Tensor.Art!Don't use weighting with Flux. Not only will it not work, it may damage your image!In any case, you can add weight in 2 different ways:Method #1: Enclose keywords within multiple consecutive parentheses, e.g., ((((keyword))))Method #2: Enclose keywords in parentheses and apply a "weight" (value) between 1 and 2, e.g., (keyword:1.2)For Method 1, each set of parentheses (keyword) multiplies the weight by 1.1, so:(keyword) = (keyword:1.1)((keyword)) = (keyword:1.21) = (1.1 x 1.1)(((keyword))) = (keyword:1.331) = (1.1 x 1.1 x 1.1)((((keyword)))) = (keyword:1.4641) = (1.1 x 1.1 x 1.1 x 1.1)etc.So which one to use? IMO use Method #2, which allows more precise, incremental control. I've found that even changing the value from, say, (keyword:1.1) to (keyword:1.11) or even (keyword:1.105) can make all the difference.(Why does Method #1 even exist? My assumption is that it was developed first, then left in the code for backward compatibility so that existing prompts still worked after the plugin was updated with Method 2.)Making things even more complicated is the fact that Methods 1 and 2 are cumulative, so ((((keyword:1.4)))) = (keyword:1.4) x 1.1 x 1.1 x 1.1 x 1.1 = (keyword:2.05).However, any value over 1.7 can severely damage image quality, often to point where the image will be a garbled mess. Moreover, even lower weights like 1.4 and 1.3 can degrade image quality. This is known as "overcooking the gen".Overcooking the genWeighting is a very powerful plugin for SD. Even adding weight to one keyword can change your image dramatically, sometimes for the worse: the image becomes blurry or low-resolution, or extra limbs or unidentifiable objects appear, or bodies become laughably twisted. In other words, the image can get "overcooked".So again: when weighting with SD 1.5, it's important to use a light touch, and with SDXL, avoid using weighting at all, as even a little weighting will often fry the gen.⚠️ On SD 1.5, a common rule is to avoid any weight over 1.5. And it's a good rule — however, the number of weighted keywords also matters, so I advise avoiding a total weight of all weighted keywords above 1.4, otherwise the gen may get overcooked.How can I avoid overcooking?Follow the ideal workflow for emphasis below.Avoid using weighting with SDXL and SD 3.5.It's also possible to overcook the gen by adding too many LoRAs or by weighting LoRAs too heavily.A similar "overcooked" effect can also occur when Clip Skip is not set to 2. This is true for all Pony-based models, for example. Always use a checkpoint's recommended settings for optimal results.Ideal workflow for telling the AI what you really want to seeDescribe in greater detail those elements you want to appear prominently in the image;Place the most important keywords near the front of the prompt;Leaving everything unweighted, click Generate. (Even better: generate several different images, one after the other. Then choose the best of the lot. This is known as "seed hunting" 😉);If a certain keyword isn't showing (enough) in the "gen" (generated image), rearrange keywords in order to optimize keyword order and/or describe in greater detail the most important elements. Re-generate.SD ONLY: If you're still not getting what you want, progressively add minimal weighting — parentheses () only, without any numerical weight — to those elements that seem to need it. Re-generate.
SD 1.5 ONLY: If you're still not getting what you want, for certain critical keywords, progressively increase weighting incrementally — say, from 1.1 to 1.15.SD 1.5 ONLY: Repeat Step 4 until you succeed OR until the gen starts to overcook. If it does start to overcook, decrease weighting and re-think your prompt, starting with Step 1.DEMO: Keyword order vs. weightingThe image below uses the following prompt:girl, sundress, tropical beach, seagulls, sailboat, sunset, rundown shackAll elements are represented except "rundown shack":Let's decide that we'd rather see the shack than the boat. So, reusing the seed, we add weight of 1.3 to "rundown shack":girl, sundress, tropical beach, seagulls, sailboat, sunset, (rundown shack:1.3)Oops! It's a nice gen, but we've lost the girl:Instead, let's change the keyword order by placing "rundown shack" closer to the start of the prompt:rundown shack, girl, sundress, tropical beach, seagulls, sailboat, sunsetBetter 👍Down-weighting with SD 1.5"Down-weighting" (also known as "light-weighting") is basically telling the AI: "Apply this keyword, but a slightly lighter version of it."As with weighting, there are 2 different methods for down-weighting:Method #1: Enclose keywords within multiple consecutive square brackets, e.g., [[[keyword]]]Method #2: Enclose keywords in parentheses (not brackets!) and apply a "weight" (value) between 0 and 1, e.g., (keyword:0.5)For Method 1, each set of square brackets [keyword] divides the weight by 1.1, so:[keyword] = (keyword:0.9091)[[keyword]] = (keyword:0.8265) = (1.1 ÷ 1.1)[[[keyword]]] = (keyword:0.7513) = (1.1 ÷ 1.1 ÷ 1.1)[[[[keyword]]]] = (keyword:0.6830) = (1.1 ÷ 1.1 ÷ 1.1 ÷ 1.1)etc.As with weighting, use Method #2 — for example: (keyword:0.5) — as it allows for more granular control.Please note:You cannot down-weight by adding numbers to square brackets — for example, [keyword:0.5] will not result in down-weighting; only add numbers to parentheses ().As for weighting, don’t use down-weighting with SDXL, SD 3.5, or Flux, as it will often damage image quality.When using down-weighting with SD 1.5, be aware that the effect is subtle. The difference between "keyword" and "(keyword:0.9)" will be quite noticeable; however, the difference between, say, (keyword:0.5) and (keyword:0.4) may be so subtle as to be unnoticeable. On the other hand, this allows for some very granular fine-tuning.Below ⬇️ is a demo gallery starting with the prompt:portrait of a chubby businessman, parkYou'll notice that even at (chubby:0.1), the subject will still be chubby. In other words, (chubby:0.1) ≠ thin; (chubby:0.1) = the least amount of chubbiness.You'll also notice that the lower the down-weighting, the lower the lighting on the subject: the weighting plugin can mess with your image in so many unexpected ways, so use with care!Common weighting errorsMethod #2 weighting and down-weighting requires both parentheses "()" and a colon ":"If you use incorrect syntax, at best weighting will not be applied; at worst, it may throw errors and diminish image quality.❌ Portrait of a chubby1.2 businessman❌ Portrait of a chubby:1.2 businessman❌ Portrait of a (chubby1.2) businessman❌ Portrait of a (chubby)(1.2) businessman❌ Portrait of a {chubby:1.2} businessman✅ Portrait of a (chubby:1.2) businessman❌ Portrait of a [chubby:0.5] businessman✅ Portrait of a (chubby:0.5) businessmanConclusionResults may vary! There are so many different checkpoints, LoRAs, etc., so this guide is of course not definitive.Nor is this THE one and only way to do it: some use very different emphasis & weighting methods than those described in this guide, yet still produce amazing, high-quality gens.I based this guide on more than 2 years of trial and error and research, as well as on official usage tips as provided by Stability AI — but if you develop your own techniques and they work for you, great!While I always try to give accurate advice, I'm only human and (so) I make mistakes, lol. If you find a mistake in this guide, do let me know in the comments and I'll gladly correct it 😇Have fun 🤟Example of down-weighting