{"id":28504,"date":"2025-02-13T09:14:20","date_gmt":"2025-02-13T01:14:20","guid":{"rendered":"https:\/\/www.1ai.net\/?p=28504"},"modified":"2025-02-11T21:19:25","modified_gmt":"2025-02-11T13:19:25","slug":"stable-diffusion%e6%80%8e%e4%b9%88%e7%94%a8%ef%bc%9f%e6%8f%90%e7%a4%ba%e8%af%8d%e7%9a%84%e5%9f%ba%e6%9c%ac%e8%af%ad%e6%b3%95%e4%b8%8eai%e8%be%85%e5%8a%a9%e5%88%9b%e4%bd%9c%e6%8a%80%e5%b7%a7","status":"publish","type":"post","link":"https:\/\/www.1ai.net\/en\/28504.html","title":{"rendered":"How does Stable Diffusion work? Basic Grammar of Prompt Words and AI-Assisted Creation Tips"},"content":{"rendered":"<p>In this section, we'll dive into the<a href=\"https:\/\/www.1ai.net\/en\/tag\/%e6%8f%90%e7%a4%ba%e8%af%8d\" title=\"[View articles tagged with [cue word]]\" target=\"_blank\" >Prompt word<\/a>of basic grammar and AI-assisted authoring techniques. You will master<a href=\"https:\/\/www.1ai.net\/en\/tag\/stable-diffusion\" title=\"_Other Organiser\" target=\"_blank\" >Stable Diffusion<\/a>of the six basic grammars and learn how to let our Large Language Model (LLM) help us write prompt words.<\/p>\n<p>I. The Six Basic Syntaxes of Stable Diffusion<\/p>\n<p>In our previous content, we learned how to download models on the C station and try to use them. But sometimes, we see prompts that contain many symbols such as parentheses and colons - what exactly are these? How are they used? Today, we will unravel these mysteries.<\/p>\n<p>1. Form of content<\/p>\n<p>When constructing cues, we can use words, phrases or short sentences. In order to express more clearly the relationship between multiple subjects, it is recommended to use short sentences.<\/p>\n<ul>\n<li><strong>word<\/strong>1girl, beautiful, sitting, table<\/li>\n<li><strong>phrase (grammar)<\/strong>1 beautiful girl, sitting near the table<\/li>\n<li><strong>clause<\/strong>1 beautiful girl sitting near the table<\/li>\n<\/ul>\n<p>2. Separators<\/p>\n<p>The separator is mainly used to differentiate between the different tags of the cue, which allows the AI to understand each separate element more clearly and avoid confusion.<\/p>\n<p>When using separators, simply add a comma after each keyword or phrase.<\/p>\n<p>for example, if we want to create an image of a girl, a beach and a distant city, we should write a hint: \"girl, beach, distant city.\"<\/p>\n<p>3. Weighted syntax<\/p>\n<p>The weighting syntax allows us to emphasize or diminish certain elements. For example, using parentheses and colons to set weight values can increase or decrease the importance of specific elements. The weighting syntax is implemented by adding specific symbols to the cue words.<\/p>\n<ol>\n<li><strong>Parentheses and colons<\/strong>: Cue words are circled in parentheses and followed by a colon and a weight value. The weight value ranges from 0.1 to 100 and defaults to 1. A value lower than 1 means that the cue is weaker, while a value higher than 1 means that it is stronger.<\/li>\n<\/ol>\n<ul>\n<li>Strengthening element: (city:1.5)<\/li>\n<li>Attenuating element: (city:0.5)<\/li>\n<\/ul>\n<ol>\n<li><strong>Shortcut keys to adjust weights<\/strong>: We can quickly adjust the weight of the cue word by using a shortcut key. Hold Ctrl and press up to increase the weight, hold Ctrl and press down to decrease the weight.<\/li>\n<li><strong>Use of different types of brackets<\/strong>: The weights are adjusted by adding different levels of parentheses, with each additional level of flower brackets increasing the weight by a factor of 1.05, each additional level of round brackets increasing the weight by a factor of 1.1, and each additional level of square brackets decreasing the weight by a factor of 1.1.<\/li>\n<\/ol>\n<ul>\n<li>Add weight: {city} or (city)<\/li>\n<li>Reduced weight: [city]<\/li>\n<li>Multiple parentheses: you can nest parentheses in multiple layers, increasing and decreasing weights<\/li>\n<\/ul>\n<p>In practice, the weighting syntax can help us achieve more detailed image control. For example, if we want to emphasize the city background more in the image and reduce the percentage of people and beach, we can set it like this: (city:1.5), 1girl, beach<\/p>\n<p>In this way, we can ensure that the city occupies a larger proportion of the final generated image, while other elements are relatively small.<\/p>\n<p>Precautions<\/p>\n<ul>\n<li>The value in the weight syntax should not be too high, usually no more than 2, to avoid degradation or crashing of the image quality.<\/li>\n<li>The use of weighted syntax should be based on the actual need to rationally adjust the weight of each element to achieve the best visual effect.<\/li>\n<\/ul>\n<p>4. Hybrid syntax<\/p>\n<p>Stable Diffusion's blending syntax is a powerful feature that allows us to merge several different elements or concepts into a single image, creating entirely new visual entities. This syntax achieves the effect of blending multiple elements in a single image through the simple use of the \"and\" conjunction.<\/p>\n<ol>\n<li><strong>Use of \"and\" conjunctions<\/strong>: we can merge two or more elements by adding \"and\" to the hint. for example, \u201c1cat and 1dog\u201d will produce a mixture of cats and dogs\u3002<\/li>\n<li><strong>weights<\/strong>: when using \"and\", we can also set weights on each element to control their proportion in the final image. for example, \u201c1cat: 1.5 and 1dog:1\u201d will produce a mixture that is more observant to cat characteristics\u3002<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28505\" title=\"0240ce94j00srisqn007ld000u000esm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/0240ce94j00srisqn007ld000u000esm.jpg\" alt=\"0240ce94j00srisqn007ld000u000esm\" width=\"1080\" height=\"532\" \/><\/p>\n<p>5. Alternate algorithmic syntax<\/p>\n<p>the equation is achieved by placing keywords in square brackets and dividing them by vertical lines. for example, if we want to alternate between a cat and a dog, we can write a hint: \u201c[cat|dog]\u201d\u3002<\/p>\n<p>this syntax applies in particular to the creation of scenarios of a gradient or a mixture of multiple elements. for example, we can use it to generate the gradual hair between red and blue: \"[red|blue].\" in addition, alternate calculations can be used to create more complex images, such as hybrids containing both cat, dog and tiger characteristics: \u201c[cat|dog|tiger]\u201d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28506\" title=\"70994362j00srisqn007bd000u000esm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/70994362j00srisqn007bd000u000esm.jpg\" alt=\"70994362j00srisqn007bd000u000esm\" width=\"1080\" height=\"532\" \/><\/p>\n<p>6. Segmentation generating syntax<\/p>\n<p>The basic form of segmented generative grammar is to specify two or more keywords in square brackets and to control the stage of use of these keywords in the generation process by means of colons and numbers.<\/p>\n<ul>\n<li><strong>specification<\/strong>:: [Keywords1:Keywords2:Numbers]<\/li>\n<li><strong>Numbers greater than 1<\/strong>: indicates that keyword 1 is used before step X and keyword 2 is used after step X.<\/li>\n<li><strong>Numbers less than 1<\/strong>: Indicates percent X of the total number of steps before using keyword 1 and after using keyword 2.<\/li>\n<\/ul>\n<p>Suppose we want to generate an image where the first half is a man and the second half becomes a flower, we can set up the cue word like this:<\/p>\n<p>[man:flower:20]: use \"man\" as a cue word for the first 20 iterations, and \"flower\" thereafter.<\/p>\n<p>If we want to control the switching point based on a percentage of the total iteration steps, we can set it up like this:<\/p>\n<p>[man:flower:0.5]: use \"man\" for the first 50% and \"flower\" for the last 50% of the total iteration steps.<\/p>\n<p>Segmented generation syntax can also be used for finer control, such as starting the drawing at a certain scale or step, or ending the drawing at a certain scale or step.<\/p>\n<ul>\n<li><strong>Drawing from XX scale\/step<\/strong>: [keyword:number], e.g. [flower:20] means use \"flower\" as a cue word from step 20 onwards.<\/li>\n<li><strong>To XX scale\/step cutoff drawing<\/strong>:[keyword::number], e.g., [flower::20] means to use \"flower\" as a cue word at the 20th step cutoff.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28507\" title=\"5349d81fj00srisqo007nd000u000esm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/5349d81fj00srisqo007nd000u000esm.jpg\" alt=\"5349d81fj00srisqo007nd000u000esm\" width=\"1080\" height=\"532\" \/><\/p>\n<p>II. Using LLM to aid in creation<\/p>\n<p>We can use Large Language Modeling (LLM) to help us generate cue words. Simply by providing a topic, the AI can expand and generate detailed cue words for us. This greatly reduces our workload and increases creative efficiency.<\/p>\n<p>Now that you are a cue word generator based on input descriptions, you will generate cue words by visualizing the natural language I input as a complete picture. Please note that your generated content serves a drawing AI, which can only understand figurative cues and not abstract concepts. I will provide a short description in Chinese, the generator needs to provide me with the exact cue words, optimize and reorganize as necessary to provide more accurate content, and also output only the translated English content.<\/p>\n<p>Please mimic the structure of the example to generate the perfect prompt words.<\/p>\n<p>Example input: \"A female office worker sitting on the curb\"<\/p>\n<p>Sample output: 1 girl, office lady, solo, (16yo), sexy, thin, beautiful detailed eyes, light blush, black hair, long hair, (mole under eye:1.2), nose blush , looking at viewer, suits, white shirt, striped miniskirt, (lace black pantyhose:1.1), black heels, LV bags, thighhighs sitting, street, shop border, (lace black pantyhose:1.1), black heels, LV bags, thighhighs sitting, street, shop border, (lace black pantyhose:1.1) akihabara , tokyo, tree, rain, cloudy, beautifully detailed background, depth of field, loli, realistic, ambient light, (cinematic composition:1.3) , neon lights, HDR, Accent Lighting, pantyshot, fish eye lens.<\/p>\n<p>Please note that the (:1.x) in the example means to add weight to the prompt word, the value ranges from 0.6-1.5, the larger the value the higher the weight.<\/p>\n<p>Please read my request carefully and generate a hint in strict accordance with the rules. If you understand, please answer \u201cI'm ready\u201d and, when I have entered Chinese, produce what I need in English\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28508\" title=\"9c4d5acej00srisqn0081d000u001qhm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/9c4d5acej00srisqn0081d000u001qhm.jpg\" alt=\"9c4d5acej00srisqn0081d000u001qhm\" width=\"1080\" height=\"2249\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28509\" title=\"8332cd7aj00srisqo009cd000u000esm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/02\/8332cd7aj00srisqo009cd000u000esm.jpg\" alt=\"8332cd7aj00srisqo009cd000u000esm\" width=\"1080\" height=\"532\" \/><\/p>\n<p>III. Summary<\/p>\n<p>In this section we learn the six basic syntax of Stable Diffusion and AI-assisted creation techniques.<\/p>\n<p>By mastering these techniques, you will be better able to create stunning artwork.<\/p>","protected":false},"excerpt":{"rendered":"<p>In this section, we will study in depth the basic syntax and AI-aided creative skills of the phrases. You will master the six basic syntax of Stable Diffusion and learn how to get our big language model to help us write our notes. One, the six basic syntax of Stable Diffusion, in our earlier content, we learned how to download models and try to use them on station C. But sometimes, we see many symbols, such as brackets and colons, included in the hints. What are these? How do they work? Today, we will open these riddles. 1 In content form, you can use words, phrases or short sentences when you construct a hint. In order to express more clearly the relationships between multiple subjects, it is suggested that<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[149,144],"tags":[197,198,837],"collection":[262],"class_list":{"0":"post-28504","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-jiaocheng","7":"category-baike","8":"tag-stable-diffusion","10":"tag-837","11":"collection-stablediffusion"},"acf":[],"_links":{"self":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/28504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/comments?post=28504"}],"version-history":[{"count":0,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/28504\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/media?parent=28504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/categories?post=28504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/tags?post=28504"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/collection?post=28504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}