StableDiffusion繪圖【各種特性最全示例】,你的WebUI究竟都能做些什么?

內(nèi)容:對(duì)GitHub網(wǎng)站上AUTOMATIC1111/SDWebUI項(xiàng)目下的Feature特性文檔全文全圖進(jìn)行了機(jī)翻和重新排版。直接由web UI開發(fā)者撰寫的特性說明文檔。
意義:可以幫你系統(tǒng)理解該WebUI究竟都能做什么,應(yīng)該怎么做。尤其適用于英文說明書讀不懂,由于網(wǎng)絡(luò)不穩(wěn)定導(dǎo)致的GitHub進(jìn)不去、示例圖片加載不出等問題。
適用人群:
如果有網(wǎng)絡(luò)不穩(wěn)等問題,不如收藏一下以備不時(shí)之需。
使用秋葉菩薩的一體化安裝更新包的同學(xué)也不妨閱讀一下,從底層理解一下WebUI。萌新可以幫助建立對(duì)SD的基本認(rèn)識(shí)。
對(duì)于熟練的同學(xué),本文中有大量的SD官方示例圖,和一些很好的指導(dǎo),可幫你增進(jìn)對(duì)各種參數(shù)的細(xì)節(jié)理解。碰到疑難雜癥不妨回來看看。
如果能夠穩(wěn)定上Github且英文閱讀無障礙則無需本文,但歡迎指出錯(cuò)誤與探討交流。
本文原版來自https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features
以下是原文,內(nèi)容是一行原文一行機(jī)翻。
由于是機(jī)翻可能存在一些問題,請(qǐng)結(jié)合上下文。
在轉(zhuǎn)寫成專欄的時(shí)候,原文中的超鏈接消失了(類似Moreinfo、SD2模型下載鏈接等),原文中實(shí)際上有很多超鏈接,感興趣可以去github主頁翻看。

This is a feature showcase page for Stable Diffusion web UI.
這是穩(wěn)定擴(kuò)散 Web UI 的功能展示頁面。
All examples are non-cherrypicked unless specified otherwise.
除非另有說明,否則所有示例均未經(jīng)挑選。
InstructPix2Pix指導(dǎo)下的圖生圖
Website. Checkpoint. The checkpoint is fully supported in img2img tab. No additional actions are required. Previously an extension by a contributor was required to generate pictures: it's no longer required, but should still work. Most of img2img implementation is by the same person.
網(wǎng)站。 檢查站。檢查點(diǎn)在img2img選項(xiàng)卡中完全受支持。無需執(zhí)行其他操作。以前,需要貢獻(xiàn)者的擴(kuò)展才能生成圖片:它不再需要,但應(yīng)該仍然有效。大多數(shù)img2img的實(shí)現(xiàn)都是由同一個(gè)人完成的。
To reproduce results of the original repo, use denoising of 1.0, Euler a sampler, and edit the config in configs/instruct-pix2pix.yaml to say:
要重現(xiàn)原始存儲(chǔ)庫的結(jié)果,請(qǐng)使用 1.0 的去噪,Euler 采樣器,并在 configs/instruct-pix2pix.yaml 中編輯配置以表示:
??? use_ema: true
??? load_ema: true
?instead of:
??? use_ema: false

Extra network額外網(wǎng)絡(luò)
A single button with a picture of a card on it. It unifies multiple extra ways to extend your generation into one UI.
一個(gè)按鈕,上面有一張卡片的圖片。它統(tǒng)一了多種額外方法,將生成擴(kuò)展到一個(gè) UI 中。
Find it next to the big Generate button:?
在大的“生成”按鈕旁邊找到它:

Extra networks provides a set of cards, each corresponding to a file with a part of model you either train or obtain from somewhere. Clicking the card adds the model to prompt, where it will affect generation.
Extra Networks 提供了一組卡片,每張卡片對(duì)應(yīng)一個(gè)文件,其中包含您訓(xùn)練或從某處獲得的模型的一部分。單擊卡片會(huì)將模型添加到提示中,它將影響生成。

下面簡(jiǎn)介以下幾種Extra network額外網(wǎng)絡(luò):
Textual Inversion
A method to fine tune weights for a token in CLIP, the language model used by Stable Diffusion, from summer 2021. Author's site. Long explanation: Textual Inversion
一種從 2021 年夏季開始微調(diào) CLIP(穩(wěn)定擴(kuò)散使用的語言模型)中令牌權(quán)重的方法。 作者網(wǎng)站 .詳細(xì)解釋:文本反轉(zhuǎn)
Lora
A method to fine tune weights for CLIP and Unet, the language model and the actual image de-noiser used by Stable Diffusion, published in 2021. Paper. A good way to train Lora is to use kohya-ss.
2021 年發(fā)布的一種微調(diào) CLIP 和 Unet 權(quán)重的方法,語言模型和穩(wěn)定擴(kuò)散使用的實(shí)際圖像降噪器。 紙。訓(xùn)練勞拉的一個(gè)好方法是使用 科希亞-ss.
Support for Lora is built-in into the Web UI, but there is an extension with original implementation by kohyaa-ss.
對(duì)Lora的支持內(nèi)置于Web UI中,但是有一個(gè)由kohyaa-ss原始實(shí)現(xiàn)的擴(kuò)展。
Currently, Lora networks for Stable Diffusion 2.0+ models are not supported by Web UI.
目前, Web UI 不支持穩(wěn)定擴(kuò)散的 Lora 網(wǎng)絡(luò) 2.0+ 模型.
Lora is added to the prompt by putting the following text into any location: <lora:filename:multiplier>, where filename is the name of file with Lora on disk, excluding extension, and multiplier is a number, generally from 0 to 1, that lets you choose how strongly Lora will affect the output. Lora cannot be added to the negative prompt.
通過將以下文本放入任何位置將 Lora 添加到提示符中: <lora:filename:multiplier> ,其中 filename 是磁盤上帶有 Lora 的文件的名稱, 不包括擴(kuò)展名, multiplier 是一個(gè)數(shù)字, 通常從 0 到 1, 讓你選擇 Lora對(duì)輸出的影響程度.Lora不能添加到否定提示中.
The text for adding Lora to the prompt, <lora:filename:multiplier>, is only used to enable Lora, and is erased from prompt afterwards, so you can't do tricks with prompt editing like [<lora:one:1.0>|<lora:two:1.0>]. A batch with multiple different prompts will only use the Lora from the first prompt.
將 Lora 添加到提示符的文本, <lora:filename:multiplier> ,僅用于啟用 Lora, 之后從提示中刪除, 所以你不能像 [<lora:one:1.0>|<lora:two:1.0>] 這樣的提示編輯來做技巧。具有多個(gè)不同提示的批處理將僅使用第一個(gè)提示中的 Lora.
Hypernetworks
A method to fine tune weights for CLIP and Unet, the language model and the actual image de-noiser used by Stable Diffusion, generously donated to the world by our friends at Novel AI in autumn 2022. Works in the same way as Lora except for sharing weights for some layers. Multiplier can be used to choose how strongly the hypernetwork will affect the output.
一種微調(diào) CLIP 和 Unet 權(quán)重的方法,穩(wěn)定擴(kuò)散使用的語言模型和實(shí)際圖像降噪器,由我們?cè)?Novel AI 的朋友于 2022 年秋季慷慨捐贈(zèng)給世界。工作方式與 Lora 相同,除了共享某些層的權(quán)重.乘數(shù)可用于選擇超網(wǎng)絡(luò)對(duì)輸出的影響程度。
Same rules for adding hypernetworks to the prompt apply as for Lora: <hypernet:filename:multiplier>.
將超網(wǎng)絡(luò)添加到提示符的規(guī)則與 Lora 相同: <hypernet:filename:multiplier> 。
Alt-Diffusion
A model trained to accept inputs in different languages.?More info.?PR.
經(jīng)過訓(xùn)練以接受不同語言輸入的模型。 更多信息 . 公關(guān)。
Download?the checkpoint from huggingface. Click the down arrow to download.
從擁抱臉下載檢查點(diǎn)。單擊向下箭頭進(jìn)行下載。Put the file into?
models/Stable-Diffusion
將文件放入?models/Stable-Diffusion
Notes:?
?注釋:
Mechanically, attention/emphasis mechanism is supported, but seems to have much less effect, probably due to how Alt-Diffusion is implemented.
從機(jī)械上講,注意力/強(qiáng)調(diào)機(jī)制是受支持,但似乎效果要小得多,這可能是由于Alt擴(kuò)散的實(shí)現(xiàn)方式。
Clip skip is not supported, the setting is ignored.
不支持剪輯跳過,該設(shè)置將被忽略。
??????????? It is recommended to run with --xformers. Adding additional memory-saving flags such as --xformers --medvram does not work.
建議使用?--xformers.
?運(yùn)行 添加其他節(jié)省內(nèi)存的標(biāo)志(如?--xformers --medvram
?)不起作用。
Stable Diffusion 2.0?穩(wěn)定擴(kuò)散2.0
1.???????? Download your checkpoint file from huggingface. Click the down arrow to download.
從擁抱臉下載您的檢查點(diǎn)文件。單擊向下箭頭進(jìn)行下載。
2.???????? Put the file into models/Stable-Diffusion
將文件放入 models/Stable-Diffusion
??????????? 768 (2.0) - (model, yaml)
??????????? 768 (2.1) - (model+yaml) - .safetensors
??????????? 512 (2.0) - (model, yaml)
Notes: (Click to expand:)?
注釋:
If 2.0 or 2.1 is generating black images, enable full precision with --no-half or try using the --xformers optimization.
如果 2.0 或 2.1 正在生成黑色圖像,請(qǐng)使用?--no-half
?啟用全精度或嘗試使用?--xformers
?優(yōu)化。
Note: SD 2.0 and 2.1 are more sensitive to FP16 numerical instability (as noted by themselves here) due to their new cross attention module.
注意:SD 2.0 和 2.1 對(duì) FP16 數(shù)值不穩(wěn)定性更敏感(如此處所述),因?yàn)樗鼈兊男陆徊孀⒁饬δK。
On fp16: comment to enable, in webui-user.bat:
在 fp16 上:注釋以啟用,在 webui-user 中.bat:
?Depth Guided Model?深度引導(dǎo)模型
The depth-guided model will only work in img2img tab. More info. PR.
深度引導(dǎo)模型僅適用于 img2img 選項(xiàng)卡。 更多信息 . 公關(guān)。
??????????? 512 depth (2.0) - (model+yaml) - .safetensors
??????????? 512 depth (2.0) - (model, yaml)
Inpainting Model SD2?修復(fù)模型 SD2
Model specifically designed for inpainting trained on SD 2.0 512 base.
專為在 SD 2.0 512 基礎(chǔ)上進(jìn)行修復(fù)訓(xùn)練而設(shè)計(jì)的模型。
??????????? 512 inpainting (2.0) - (model+yaml) - .safetensors
inpainting_mask_weight or inpainting conditioning mask strength works on this too.
inpainting_mask_weight 或修復(fù)調(diào)理面膜強(qiáng)度也適用于此。
Outpainting外繪
Outpainting extends the original image and inpaints the created empty space.
外畫擴(kuò)展了原始圖像并繪制了創(chuàng)建的空白空間。
Example示例:



Original image by Anonymous user from 4chan. Thank you, Anonymous user.
原始圖片來自4chan的匿名用戶。謝謝你,匿名用戶。
You can find the feature in the img2img tab at the bottom, under Script -> Poor man's outpainting.
您可以在底部的img2img選項(xiàng)卡中找到該功能,在腳本->窮人的外畫下。
Outpainting, unlike normal image generation, seems to profit very much from large step count. A recipe for a good outpainting is a good prompt that matches the picture, sliders for denoising and CFG scale set to max, and step count of 50 to 100 with Euler ancestral or DPM2 ancestral samplers.
與正常的圖像生成不同,外畫似乎從大步數(shù)中受益匪淺。一個(gè)好的外畫的配方是一個(gè)很好的提示,它與圖片、用于去噪的滑塊和設(shè)置為 max 的 CFG 比例相匹配,并且步長(zhǎng)計(jì)數(shù)為 50 到 100,與歐拉祖先或 DPM2 祖先采樣器相匹配。

Inpainting局部重繪
In img2img tab, draw a mask over a part of the image, and that part will be in-painted.
在img2img選項(xiàng)卡中,在圖像的一部分上繪制蒙版,該部分將被繪制。

Options for inpainting:?修復(fù)選項(xiàng):
??????????? draw a mask yourself in the web editor
在 Web 編輯器中自己繪制蒙版
??????????? erase a part of the picture in an external editor and upload a transparent picture. Any even slightly transparent areas will become part of the mask. Be aware that some editors save completely transparent areas as black by default.
在外部編輯器中擦除圖片的一部分并上傳透明圖片。任何稍微透明的區(qū)域都將成為遮罩的一部分。請(qǐng)注意,默認(rèn)情況下,某些編輯器將完全透明的區(qū)域保存為黑色。
??????????? change mode (to the bottom right of the picture) to "Upload mask" and choose a separate black and white image for the mask (white=inpaint).
將模式(圖片右下角)更改為“上傳蒙版”,然后為蒙版選擇單獨(dú)的黑白圖像(白色=重繪部分)。
Inpainting model重繪模型
RunwayML has trained an additional model specifically designed for inpainting. This model accepts additional inputs - the initial image without noise plus the mask - and seems to be much better at the job.
RunwayML訓(xùn)練了一個(gè)專門為修復(fù)而設(shè)計(jì)的附加模型。該模型接受額外的輸入 - 沒有噪聲的初始圖像加上掩模 - 并且似乎在工作中要好得多。
Download and extra info for the model is here: https://github.com/runwayml/stable-diffusion#inpainting-with-stable-diffusion
下載和模型的額外信息在這里: https://github.com/runwayml/stable-diffusion#inpainting-with-stable-diffusion
To use the model, you must rename the checkpoint so that its filename ends in inpainting.ckpt, for example, 1.5-inpainting.ckpt.
若要使用該模型,必須重命名檢查點(diǎn),使其文件名以 inpainting.ckpt 結(jié)尾,例如 1.5-inpainting.ckpt 。
After that just select the checkpoint as you'd usually select any checkpoint and you're good to go.
之后,只需選擇檢查點(diǎn),就像您通常會(huì)選擇任何檢查點(diǎn)一樣,您就可以開始了。
Masked content蒙版內(nèi)容
The masked content field determines content is placed to put into the masked regions before they are inpainted. This does not represent final output, it's only a look at what's going on mid-process.
蒙版內(nèi)容字段確定在對(duì)蒙版區(qū)域進(jìn)行蒙版之前放置要放入遮罩區(qū)域的內(nèi)容。這并不代表最終輸出,它只是查看過程中發(fā)生的事情。

Inpaint area重繪區(qū)域
Normally, inpainting resizes the image to the target resolution specified in the UI. With Inpaint area: Only masked enabled, only the masked region is resized, and after processing it is pasted back to the original picture. This allows you to work with large pictures and render the inpainted object at a much larger resolution.
通常,重繪過程會(huì)將圖像大小調(diào)整為 UI 中指定的目標(biāo)分辨率。啟用 Inpaint area: Only masked 后,會(huì)僅將遮罩區(qū)域調(diào)整為目標(biāo)大小,并在處理后將其粘貼回原始圖片。這允許您處理大圖片并以更大的分辨率渲染修復(fù)對(duì)象。

Masking mode
There are two options for masked mode:
遮蓋模式有兩個(gè)選項(xiàng):
??????????? Inpaint masked - the region under the mask is inpainted
重繪遮蓋 - 蒙版下方的區(qū)域被重繪
??????????? Inpaint not masked - under the mask is unchanged, everything else is inpainted
重繪未遮蓋不涂漆 - 蒙版下不變,其他一切都被重繪
Alpha mask

Color Sketch彩色重繪
Basic coloring tool for the img2img tab. Chromium-based browsers support a dropper tool. ?(this is on firefox)
img2img 選項(xiàng)卡的基本著色工具?;?Chromium 的瀏覽器支持滴管工具。 (這是在火狐瀏覽器上)

Prompt matrix 提示詞矩陣
Separate multiple prompts using the | character, and the system will produce an image for every combination of them. For example, if you use a busy city street in a modern city|illustration|cinematic lighting prompt, there are four combinations possible (first part of the prompt is always kept):
使用 | 字符分隔多個(gè)提示,系統(tǒng)將為它們的每個(gè)組合生成一個(gè)圖像。例如,如果使用 a busy city street in a modern city|illustration|cinematic lighting 提示符,則有四種可能的組合(始終保留提示的第一部分):
??????????? a busy city street in a modern city
??????????? a busy city street in a modern city, illustration
??????????? a busy city street in a modern city, cinematic lighting
??????????? a busy city street in a modern city, illustration, cinematic lighting
Four images will be produced, in this order, all with the same seed and each with a corresponding prompt:
將按此順序生成四個(gè)圖像,所有圖像都具有相同的種子,并且每個(gè)圖像都有相應(yīng)的提示:

Another example, this time with 5 prompts and 16 variations:
另一個(gè)例子,這次有 5 個(gè)提示和 16 個(gè)變體:

You can find the feature at the bottom, under Script -> Prompt matrix.
您可以在底部的腳本 -> 提示矩陣下找到該功能。
Stable Diffusion upscale?穩(wěn)定擴(kuò)散圖片放大
*這一部分的機(jī)翻問題較大,高檔、升級(jí)等都對(duì)應(yīng)圖片的放大,即分辨率增加
Upscale image using RealESRGAN/ESRGAN and then go through tiles of the result, improving them with img2img. It also has an option to let you do the upscaling part yourself in an external program, and just go through tiles with img2img.
使用RealESRGAN/ESRGAN的高檔圖像,然后瀏覽結(jié)果的圖塊,使用img2img對(duì)其進(jìn)行改進(jìn)。它還可以選擇讓您在外部程序中自己進(jìn)行升級(jí)部分,只需使用 img2img 瀏覽磁貼即可。
Original idea by: https://github.com/jquesnelle/txt2imghd. This is an independent implementation.
原意: https://github.com/jquesnelle/txt2imghd .這是一個(gè)獨(dú)立的實(shí)現(xiàn)。
To use this feature, select SD upscale from the scripts dropdown selection (img2img tab).
若要使用此功能,請(qǐng)選擇 SD upscale from the scripts dropdown selection (img2img 選項(xiàng)卡)。

The input image will be upscaled to twice the original width and height, and UI's width and height sliders specify the size of individual tiles. Because of overlap, the size of the tile can be very important: 512x512 image needs nine 512x512 tiles (because of overlap), but only four 640x640 tiles.
輸入圖像將放大到原始寬度和高度的兩倍,UI 的寬度和高度滑塊指定各個(gè)磁貼的大小。由于存在重疊,磁貼的大小可能非常重要:512x512 圖像需要 9 個(gè) 512x512 圖塊(由于重疊),但只需要 4 個(gè) 640x640 圖塊。
Recommended parameters for upscaling:
升級(jí)的推薦參數(shù):
??????????? Sampling method: Euler a?采樣方法:歐拉A
??????????? Denoising strength: 0.2, can go up to 0.4 if you feel adventurous
降噪強(qiáng)度:0.2,如果您喜歡冒險(xiǎn),可以達(dá)到0.4

Infinite prompt length?無限的提示長(zhǎng)度
Typing past standard 75 tokens that Stable Diffusion usually accepts increases prompt size limit from 75 to 150. Typing past that increases prompt size further. This is done by breaking the prompt into chunks of 75 tokens, processing each independently using CLIP's Transformers neural network, and then concatenating the result before feeding into the next component of stable diffusion, the Unet.
輸入超過穩(wěn)定擴(kuò)散通常接受的標(biāo)準(zhǔn) 75 個(gè)令牌會(huì)將提示大小限制從 75 增加到 150。鍵入過去會(huì)進(jìn)一步增加提示大小。這是通過將提示分解成 75 個(gè)令牌的塊來完成的,使用 CLIP 的 Transformers 神經(jīng)網(wǎng)絡(luò)獨(dú)立處理每個(gè)標(biāo)記,然后將結(jié)果連接起來,然后再輸入穩(wěn)定擴(kuò)散的下一個(gè)組件 Unet。
For example, a prompt with 120 tokens would be separated into two chunks: first with 75 tokens, second with 45. Both would be padded to 75 tokens and extended with start/end tokens to 77. After passing those two chunks though CLIP, we'll have two tensors with shape of (1, 77, 768). Concatenating those results in (1, 154, 768) tensor that is then passed to Unet without issue.
例如,包含 120 個(gè)令牌的提示將分為兩個(gè)塊:第一個(gè)塊包含 75 個(gè)標(biāo)記,第二個(gè)塊包含 45 個(gè)標(biāo)記。兩者都將填充到 75 個(gè)令牌,并使用開始/結(jié)束令牌擴(kuò)展到 77。通過 CLIP 傳遞這兩個(gè)塊后,我們將有兩個(gè)形狀為 (1, 77, 768) 的張量。將這些結(jié)果連接到 (1, 154, 768) 張量中,然后將其毫無問題地傳遞給Unet。
BREAK keyword
Adding a BREAK keyword (must be uppercase) fills the current chunks with padding characters. Adding more text after BREAK text will start a new chunk.
添加 BREAK 關(guān)鍵字(必須為大寫)會(huì)用填充字符填充當(dāng)前區(qū)塊。在 BREAK 文本之后添加更多文本將開始一個(gè)新塊。
Attention/emphasis?注意/強(qiáng)調(diào)
Using () in the prompt increases the model's attention to enclosed words, and [] decreases it. You can combine multiple modifiers:
在提示中使用 () 會(huì)增加模型對(duì)封閉單詞的關(guān)注,而 [] 會(huì)減少它。您可以組合多個(gè)修飾符:

Cheat sheet:
??????????? a (word) - increase attention to word by a factor of 1.1
a (word) - 將對(duì) word 的關(guān)注度提高 1.1 倍
??????????? a ((word)) - increase attention to word by a factor of 1.21 (= 1.1 * 1.1)
a ((word)) - 將對(duì) word 的關(guān)注增加 1.21 倍 (= 1.1 * 1.1)
??????????? a [word] - decrease attention to word by a factor of 1.1
a [word] - 將對(duì) word 的關(guān)注減少 1.1 倍
??????????? a (word:1.5) - increase attention to word by a factor of 1.5
a (word:1.5) - 將對(duì) word 的關(guān)注增加 1.5 倍
??????????? a (word:0.25) - decrease attention to word by a factor of 4 (= 1 / 0.25)
a (word:0.25) - 將對(duì) word 的關(guān)注減少 4 倍 (= 1 / 0.25)
??????????? a \(word\) - use literal () characters in prompt
a \(word\) - 在提示中使用文字 () 字符
With (), a weight can be specified like this: (text:1.4). If the weight is not specified, it is assumed to be 1.1. Specifying weight only works with () not with [].
使用 () ,可以像這樣指定權(quán)重: (text:1.4) 。如果未指定權(quán)重,則假定為 1.1。指定權(quán)重僅適用于 () ,不適用于 [] 。
If you want to use any of the literal ()[] characters in the prompt, use the backslash to escape them: anime_\(character\).
如果要在提示中使用任何文字 ()[] 字符,請(qǐng)使用反斜杠對(duì)其進(jìn)行轉(zhuǎn)義: anime_\(character\) 。
On 2022-09-29, a new implementation was added that supports escape characters and numerical weights. A downside of the new implementation is that the old one was not perfect and sometimes ate characters: "a (((farm))), daytime", for example, would become "a farm daytime" without the comma. This behavior is not shared by the new implementation which preserves all text correctly, and this means that your saved seeds may produce different pictures. For now, there is an option in settings to use the old implementation.
在 2022-09-29 上,添加了支持轉(zhuǎn)義字符和數(shù)字權(quán)重的新實(shí)現(xiàn)。新實(shí)現(xiàn)的一個(gè)缺點(diǎn)是舊實(shí)現(xiàn)并不完美,有時(shí)會(huì)吃掉字符:“a((farm)))),白天”,例如,如果沒有逗號(hào),就會(huì)變成“農(nóng)場(chǎng)白天”。正確保留所有文本的新實(shí)現(xiàn)不會(huì)共享此行為,這意味著您保存的種子可能會(huì)生成不同的圖片。目前,設(shè)置中有一個(gè)選項(xiàng)可以使用舊實(shí)現(xiàn)。
NAI uses my implementation from before 2022-09-29, except they have 1.05 as the multiplier and use {} instead of (). So the conversion applies:
NAI 使用我在 2022-09-29 之前的實(shí)現(xiàn),除了他們有 1.05 作為乘數(shù)并使用 {} 而不是 () .因此,轉(zhuǎn)換適用:
??????????? their {word} = our (word:1.05)
他們的 {word} = 我們的 (word:1.05)
??????????? their {{word}} = our (word:1.1025)
他們的 {{word}} = 我們的 (word:1.1025)
??????????? their [word] = our (word:0.952) (0.952 = 1/1.05)
他們的 [word] = 我們的 (word:0.952) (0.952 = 1/1.05)
??????????? their [[word]] = our (word:0.907) (0.907 = 1/1.05/1.05)
他們的 [[word]] = 我們的 (word:0.907) (0.907 = 1/1.05/1.05)
Loopback 循環(huán)繪圖
Selecting the loopback script in img2img allows you to automatically feed output image as input for the next batch. Equivalent to saving output image, and replacing the input image with it. Batch count setting controls how many iterations of this you get.
在 img2img 中選擇環(huán)回腳本允許您自動(dòng)將輸出圖像作為下一批的輸入。相當(dāng)于保存輸出圖像,并用它替換輸入圖像。批量計(jì)數(shù)設(shè)置控制您獲得的迭代次數(shù)。
Usually, when doing this, you would choose one of many images for the next iteration yourself, so the usefulness of this feature may be questionable, but I've managed to get some very nice outputs with it that I wasn't able to get otherwise.
通常,在執(zhí)行此操作時(shí),您會(huì)自己選擇許多圖像中的一個(gè)進(jìn)行下一次迭代,因此此功能的有用性可能值得懷疑,但是我已經(jīng)設(shè)法獲得了一些非常好的輸出,否則我無法獲得。
Example: (cherrypicked result)?示例:(精選結(jié)果)

Original image by Anonymous user from 4chan. Thank you, Anonymous user.
原始圖片來自4chan的匿名用戶。謝謝你,匿名用戶。
X/Y/Z plot? XYZ繪圖
Creates multiple grids of images with varying parameters. X and Y are used as the rows and columns, while the Z grid is used as a batch dimension.
創(chuàng)建具有不同參數(shù)的多個(gè)圖像網(wǎng)格。X 和 Y 用作行和列,而 Z 網(wǎng)格用作批處理維度。

Select which parameters should be shared by rows, columns and batch by using X type, Y type and Z Type fields, and input those parameters separated by comma into X/Y/Z values fields. For integer, and floating point numbers, and ranges are supported. Examples:
使用 X 類型、Y 類型和 Z 類型字段選擇應(yīng)按行、列和批處理共享的參數(shù),并將這些參數(shù)輸入到“X/Y/Z”值字段中。對(duì)于整數(shù)、浮點(diǎn)數(shù)和范圍,支持。例子:
??????????? Simple ranges:
普通范圍界定:
-? ? ? ? ? 1-5 = 1, 2, 3, 4, 5
??????????? Ranges with increment in bracket:
圓括號(hào)中帶有增量的范圍界定:
–?????????? 1-5 (+2) = 1, 3, 5
–?????????? 10-5 (-3) = 10, 7
–?????????? 1-3 (+0.5) = 1, 1.5, 2, 2.5, 3
??????????? Ranges with the count in square brackets:
方括號(hào)中帶有分布總數(shù)的范圍界定:
–?????????? 1-10 [5] = 1, 3, 5, 7, 10
–?????????? 0.0-1.0 [6] = 0.0, 0.2, 0.4, 0.6, 0.8, 1.0
Prompt S/R提示詞搜索/替換
Prompt S/R is one of more difficult to understand modes of operation for X/Y Plot. S/R stands for search/replace, and that's what it does - you input a list of words or phrases, it takes the first from the list and treats it as keyword, and replaces all instances of that keyword with other entries from the list.
提示 S/R 是 X/Y 圖更難理解的操作模式之一。S/R 代表搜索/替換,這就是它的作用 - 您輸入一個(gè)單詞或短語列表,它從列表中獲取第一個(gè)并將其視為關(guān)鍵字,并將該關(guān)鍵字的所有實(shí)例替換為列表中的其他條目。
For example, with prompt a man holding an apple, 8k clean, and Prompt S/R an apple, a watermelon, a gun you will get three prompts:
例如,使用提示符 a man holding an apple, 8k clean 和提示符 S/R an apple, a watermelon, a gun 時(shí),將收到三個(gè)提示:
??????????? a man holding an apple, 8k clean
??????????? a man holding a watermelon, 8k clean
??????????? a man holding a gun, 8k clean
The list uses the same syntax as a line in a CSV file, so if you want to include commas into your entries you have to put text in quotes and make sure there is no space between quotes and separating commas:
該列表使用與 CSV 文件中的行相同的語法,因此如果要在條目中包含逗號(hào),則必須將文本放在引號(hào)中,并確保引號(hào)和分隔逗號(hào)之間沒有空格:

Prompts from file or textbox?來自文件或文本框的提示
With this script it is possible to create a list of jobs which will be executed sequentially.
使用此腳本,可以創(chuàng)建將按順序執(zhí)行的作業(yè)列表。
Example input:示例輸入
Example output:示例輸出

Following parameters are supported:
支持以下參數(shù):
?
Resizing
There are three options for resizing input images in img2img mode:
在img2img模式下,有三個(gè)選項(xiàng)可用于調(diào)整輸入圖像的大?。?/p>
??????????? Just resize - simply resizes the source image to the target resolution, resulting in an incorrect aspect ratio
只需調(diào)整大小 - 只需將源圖像調(diào)整為目標(biāo)分辨率,導(dǎo)致寬高比不正確
??????????? Crop and resize - resize source image preserving aspect ratio so that entirety of target resolution is occupied by it, and crop parts that stick out
裁剪和調(diào)整大小 - 調(diào)整源圖像保留縱橫比的大小,以便整個(gè)目標(biāo)分辨率被它占據(jù),并裁剪突出的部分
??????????? Resize and fill - resize source image preserving aspect ratio so that it entirely fits target resolution, and fill empty space by rows/columns from the source image
調(diào)整大小和填充 - 調(diào)整源圖像保留縱橫比的大小,使其完全適合目標(biāo)分辨率,并按源圖像中的行/列填充空白區(qū)域
Example: ?示例:

Sampling method selection?取樣方法選擇
Pick out of multiple sampling methods for txt2img:
從 txt2img 的多種采樣方法中選擇:

Seed resize同一種子下的重設(shè)大小
This function allows you to generate images from known seeds at different resolutions. Normally, when you change resolution, the image changes entirely, even if you keep all other parameters including seed. With seed resizing you specify the resolution of the original image, and the model will very likely produce something looking very similar to it, even at a different resolution. In the example below, the leftmost picture is 512x512, and others are produced with exact same parameters but with larger vertical resolution.
此功能允許您以不同的分辨率從已知種子生成圖像。通常,當(dāng)您更改分辨率時(shí),即使您保留所有其他參數(shù)(包括種子),圖像也會(huì)完全更改。通過調(diào)整種子大小,您可以指定原始圖像的分辨率,并且模型很可能會(huì)產(chǎn)生看起來非常相似的東西,即使在不同的分辨率下也是如此。在下面的示例中,最左邊的圖片是 512x512,其他圖片是使用完全相同的參數(shù)生成的,但具有更大的垂直分辨率。

Ancestral samplers are a little worse at this than the rest.
祖先采樣器在這方面比其他采樣器差一點(diǎn)。
You can find this feature by clicking the "Extra" checkbox near the seed.
您可以通過單擊種子附近的“額外”復(fù)選框來找到此功能。
Variations變奏
A Variation strength slider and Variation seed field allow you to specify how much the existing picture should be altered to look like a different one. At maximum strength, you will get pictures with the Variation seed, at minimum - pictures with the original Seed (except for when using ancestral samplers).
“變體強(qiáng)度”滑塊和“變體”種子字段允許您指定應(yīng)更改現(xiàn)有圖片以使其看起來像其他圖片的程度。在最大強(qiáng)度下,您將獲得帶有變體種子的圖片,至少 - 帶有原始種子的圖片(使用祖先采樣器時(shí)除外)。

You can find this feature by clicking the "Extra" checkbox near the seed.
您可以通過單擊種子附近的“額外”復(fù)選框來找到此功能。
Styles提示詞風(fēng)格保存
Press the "Save prompt as style" button to write your current prompt to styles.csv, the file with a collection of styles. A dropbox to the right of the prompt will allow you to choose any style out of previously saved, and automatically append it to your input. To delete a style, manually delete it from styles.csv and restart the program.
按“將提示另存為樣式”按鈕將當(dāng)前提示寫入樣式.csv,即包含樣式集合的文件。提示右側(cè)的保管箱將允許您從之前保存的樣式中選擇任何樣式,并自動(dòng)將其附加到您的輸入中。要?jiǎng)h除樣式,請(qǐng)手動(dòng)將其從樣式中刪除.csv然后重新啟動(dòng)程序。
if you use the special string {prompt} in your style, it will substitute anything currently in the prompt into that position, rather than appending the style to your prompt.
如果在樣式中使用特殊字符串 {prompt} ,它會(huì)將提示中當(dāng)前的任何內(nèi)容替換到該位置,而不是將樣式附加到提示符中。
Negative prompt負(fù)面提示詞
Allows you to use another prompt of things the model should avoid when generating the picture. This works by using the negative prompt for unconditional conditioning in the sampling process instead of an empty string.
允許您使用模型在生成圖片時(shí)應(yīng)避免的其他提示。這通過在采樣過程中使用無條件的負(fù)提示而不是空字符串來工作。
Advanced explanation: Negative prompt
高級(jí)說明:否定提示

CLIP interrogator? CLIP分析
Originally by: https://github.com/pharmapsychotic/clip-interrogator?原文: https://github.com/pharmapsychotic/clip-interrogator
CLIP interrogator allows you to retrieve the prompt from an image. The prompt won't allow you to reproduce this exact image (and sometimes it won't even be close), but it can be a good start.
CLIP 詢問器允許您從圖像中檢索提示。提示不允許您重現(xiàn)此確切圖像(有時(shí)它甚至不會(huì)接近),但它可能是一個(gè)好的開始。

The first time you run CLIP interrogator it will download a few gigabytes of models.
第一次運(yùn)行 CLIP 詢問器時(shí),它將下載幾千兆字節(jié)的模型。
CLIP interrogator has two parts: one is a BLIP model that creates a text description from the picture. Other is a CLIP model that will pick few lines relevant to the picture out of a list. By default, there is only one list - a list of artists (from artists.csv). You can add more lists by doing the following:
CLIP詢問器分為兩部分:一部分是從圖片創(chuàng)建文本描述的BLIP模型。另一個(gè)是 CLIP 模型,它將從列表中選擇與圖片相關(guān)的幾行。默認(rèn)情況下,只有一個(gè)列表 - 藝術(shù)家列表(來自 artists.csv )。您可以通過執(zhí)行以下操作添加更多列表:
??????????? create interrogate directory in the same place as webui
在與WebUI相同的位置創(chuàng)建 interrogate 目錄
??????????? put text files in it with a relevant description on each line
將文本文件放入其中,每行都有相關(guān)說明
For example of what text files to use, see https://github.com/pharmapsychotic/clip-interrogator/tree/main/clip_interrogator/data. In fact, you can just take files from there and use them - just skip artists.txt because you already have a list of artists in artists.csv (or use that too, who's going to stop you). Each file adds one line of text to the final description. If you add ".top3." to filename, for example, flavors.top3.txt, the three most relevant lines from this file will be added to the prompt (other numbers also work).
有關(guān)要使用的文本文件的示例,請(qǐng)參閱 https://github.com/pharmapsychotic/clip-interrogator/tree/main/clip_interrogator/data 。事實(shí)上,你可以從那里獲取文件并使用它們 - 只需跳過藝術(shù)家.txt因?yàn)槟阋呀?jīng)在 artists.csv 中有一個(gè)藝術(shù)家列表(或者也使用它,誰會(huì)阻止你)。每個(gè)文件在最終說明中添加一行文本。如果在文件名中添加“.top3.”,例如 flavors.top3.txt ,則此文件中最相關(guān)的三行將被添加到提示符中(其他數(shù)字也可以)。
There are settings relevant to this feature:
有與此功能相關(guān)的設(shè)置:
??????????? Interrogate: keep models in VRAM - do not unload Interrogate models from memory after using them. For users with a lot of VRAM.
Interrogate: keep models in VRAM - 使用模型后不要從內(nèi)存中卸載查詢模型。對(duì)于擁有大量 VRAM 的用戶。
??????????? Interrogate: use artists from artists.csv - adds artist from artists.csv when interrogating. Can be useful to disable when you have your list of artists in interrogate directory
Interrogate: use artists from artists.csv - 詢問時(shí)添加來自 artists.csv 的藝術(shù)家。當(dāng)您的藝術(shù)家列表位于 interrogate 目錄中時(shí),禁用可能很有用
??????????? Interrogate: num_beams for BLIP - parameter that affects how detailed descriptions from BLIP model are (the first part of generated prompt)
Interrogate: num_beams for BLIP - 影響 BLIP 模型詳細(xì)描述的參數(shù)(生成的提示的第一部分)
??????????? Interrogate: minimum description length - minimum length for BLIP model's text
Interrogate: minimum description length - BLIP 模型文本的最小長(zhǎng)度
??????????? Interrogate: maximum descripton length - maximum length for BLIP model's text
Interrogate: maximum descripton length - BLIP 模型文本的最大長(zhǎng)度
??????????? Interrogate: maximum number of lines in text file - interrogator will only consider this many first lines in a file. Set to 0, the default is 1500, which is about as much as a 4GB videocard can handle.
Interrogate: maximum number of lines in text file - 詢問器只會(huì)考慮文件中的這么多第一行。設(shè)置為 0,默認(rèn)值為 1500,大約相當(dāng)于 4GB 視頻卡可以處理的數(shù)量。
Prompt editing提示詞編輯

Prompt editing allows you to start sampling one picture, but in the middle swap to something else. The base syntax for this is:
提示編輯允許您開始采樣一張圖片,但在中間切換到其他圖片。其基本語法為:
Where from and to are arbitrary texts, and when is a number that defines how late in the sampling cycle should the switch be made. The later it is, the less power the model has to draw the to text in place of from text. If when is a number between 0 and 1, it's a fraction of the number of steps after which to make the switch. If it's an integer greater than zero, it's just the step after which to make the switch.
其中 from 和 to 是任意文本, when 是一個(gè)數(shù)字,用于定義應(yīng)在采樣周期的后期進(jìn)行切換。它越晚,模型繪制 to 文本代替 from 文本的能力就越小。如果 when 是介于 0 和 1 之間的數(shù)字,則它是進(jìn)行切換的步驟數(shù)的一小部分。如果它是一個(gè)大于零的整數(shù),則只是進(jìn)行切換的步驟。
Nesting one prompt editing inside another does work.
將一個(gè)提示編輯嵌套在另一個(gè)提示編輯中確實(shí)有效。
Additionally:
??????????? [to:when] - adds to to the prompt after a fixed number of steps (when)
[to:when] - 在固定步數(shù)后將 to 添加到提示符中 ( when )
??????????? [from::when] - removes from from the prompt after a fixed number of steps (when)
[from::when] - 在固定步數(shù)后從提示中刪除 from ( when )
Example: a [fantasy:cyberpunk:16] landscape?示例: a [fantasy:cyberpunk:16] landscape
??????????? At start, the model will be drawing a fantasy landscape.
開始時(shí),模型將繪制 a fantasy landscape 。
??????????? After step 16, it will switch to drawing a cyberpunk landscape, continuing from where it stopped with fantasy.
在第 16 步之后,它將切換到 繪制 a cyberpunk landscape ,從fantasy停止的地方繼續(xù)。
Here's a more complex example with multiple edits: fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tree:0.75][ in foreground::0.6][ in background:0.25] [shoddy:masterful:0.5] (sampler has 100 steps)
下面是一個(gè)包含多次編輯的更復(fù)雜的示例: fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tree:0.75][ in foreground::0.6][ in background:0.25] [shoddy:masterful:0.5] (采樣器有 100 個(gè)步驟)
??????????? at start, fantasy landscape with a mountain and an oak in foreground shoddy?
開始時(shí), fantasy landscape with a mountain and an oak in foreground shoddy
??????????? after step 25, fantasy landscape with a lake and an oak in foreground in background shoddy
步驟 25 后, fantasy landscape with a lake and an oak in foreground in background shoddy
??????????? after step 50, fantasy landscape with a lake and an oak in foreground in background masterful
步驟 50 后, fantasy landscape with a lake and an oak in foreground in background masterful
??????????? after step 60, fantasy landscape with a lake and an oak in background masterful
步驟 60 后, fantasy landscape with a lake and an oak in background masterful
??????????? after step 75, fantasy landscape with a lake and a christmas tree in background masterful
步驟 75 后, fantasy landscape with a lake and a christmas tree in background masterful
The picture at the top was made with the prompt:
頂部的圖片是在提示下制作的:
`Official portrait of a smiling world war ii general, [male:female:0.99], cheerful, happy, detailed face, 20th century, highly detailed, cinematic lighting, digital art painting by Greg Rutkowski's
“一位微笑的二戰(zhàn)將軍的官方肖像,[男性:女性:0.99],開朗,快樂,詳細(xì)的臉,20世紀(jì),高度詳細(xì)的電影照明,格雷格·魯特科夫斯基的數(shù)字藝術(shù)繪畫
And the number 0.99 is replaced with whatever you see in column labels on the image.
數(shù)字 0.99 將替換為您在圖像上的列標(biāo)簽中看到的任何內(nèi)容。
The last column in the picture is [male:female:0.0], which essentially means that you are asking the model to draw a female from the start, without starting with a male general, and that is why it looks so different from others.
圖片中的最后一列是[male:female:0.0],這本質(zhì)上意味著你要求模型從一開始就畫一個(gè)女性,而不是從男性將軍開始,這就是為什么它看起來與其他模型如此不同。
Alternating Words替換詞
Convenient Syntax for swapping every other step.
方便的語法,用于每隔一步交換一次。
[cow|horse] in a field
?On step 1, prompt is "cow in a field." Step 2 is "horse in a field." Step 3 is "cow in a field" and so on.
在步驟 1 中,提示符是“田野里的?!?。第二步是“田野里的馬”。第 3 步是“田野里的?!钡鹊?。

See more advanced example below. On step 8, the chain loops back from "man" to "cow."
請(qǐng)參閱下面的更高級(jí)示例。在第8步,鏈條從“人”循環(huán)回“牛”。
[cow|cow|horse|man|siberian tiger|ox|man] in a field
?
Prompt editing was first implemented by Doggettx in this myspace.com post.
提示編輯首先由 Doggettx 在這篇 myspace.com 帖子中實(shí)現(xiàn)。
Hires. fix高清修復(fù)
A convenience option to partially render your image at a lower resolution, upscale it, and then add details at a high resolution. By default, txt2img makes horrible images at very high resolutions, and this makes it possible to avoid using the small picture's composition. Enabled by checking the "Hires. fix" checkbox on the txt2img page.
一個(gè)方便的選項(xiàng),用于以較低的分辨率部分渲染圖像,對(duì)其進(jìn)行放大,然后以高分辨率添加細(xì)節(jié)。默認(rèn)情況下,txt2img 以非常高的分辨率制作可怕的圖像,這樣可以避免使用小圖片的構(gòu)圖。通過檢查位于txt2img 頁面上的“高清修復(fù)“復(fù)選框。

Small picture is rendered at whatever resolution you set using width/height sliders. Large picture's dimensions are controlled by three sliders: "Scale by" multiplier (Hires upscale), "Resize width to" and/or "Resize height to" (Hires resize).
小圖片以您使用寬度/高度滑塊設(shè)置的任何分辨率呈現(xiàn)。大圖片的尺寸由三個(gè)滑塊控制:“縮放”乘數(shù)(雇用高檔)、“將寬度調(diào)整為”和/或“將高度調(diào)整為”(雇用調(diào)整大?。?。
??????????? If "Resize width to" and "Resize height to" are 0, "Scale by" is used.
如果“將寬度調(diào)整為”和“將高度調(diào)整為”為 0,則使用“縮放依據(jù)”。
??????????? If "Resize width to" is 0, "Resize height to" is calculated from width and height.
如果“將寬度調(diào)整為”為 0,則根據(jù)寬度和高度計(jì)算“將高度調(diào)整為”。
??????????? If "Resize height to" is 0, "Resize width to" is calculated from width and height.
如果“將高度調(diào)整為”為 0,則根據(jù)寬度和高度計(jì)算“將寬度調(diào)整為”。
??????????? If both "Resize width to" and "Resize height to" are non-zero, image is upscaled to be at least those dimensions, and some parts are cropped.
如果“將寬度調(diào)整為”和“將高度調(diào)整為”都不為零,則圖像將至少放大為這些尺寸,并且某些部分將被裁剪。
Upscalers放大器
這個(gè)我也沒看懂干嘛的
A dropdown allows you to to select the kind of upscaler to use for resizing the image. In addition to all upscalers you have available on extras tab, there is an option to upscale a latent space image, which is what stable diffusion works with internally - for a 3x512x512 RGB image, its latent space representation would be 4x64x64. To see what each latent space upscaler does, you can set Denoising strength to 0 and Hires steps to 1 - you'll get a very good approximation of that stable diffusion would be working with on upscaled image.
下拉列表允許您選擇要用于調(diào)整圖像大小的升頻器類型。除了您在 extras 選項(xiàng)卡上提供的所有升頻器之外,還有一個(gè)選項(xiàng)可以放大潛在空間圖像,這是穩(wěn)定擴(kuò)散在內(nèi)部使用的功能 - 對(duì)于 3x512x512 RGB 圖像,其潛在空間表示為 4x64x64。要查看每個(gè)潛在空間升頻器的作用,您可以將降噪強(qiáng)度設(shè)置為 0,將 Hires 步長(zhǎng)設(shè)置為 1 - 您將獲得一個(gè)非常好的近似值,即在放大圖像上使用的穩(wěn)定擴(kuò)散。
Below are examples of how different latent upscale modes look.
以下是不同潛空間放大模式的示例。
Original


Antialiased variations were PRd in by a contributor and seem to be the same as non-antialiased.
抗鋸齒變體由貢獻(xiàn)者 PRd 加入,似乎與非抗鋸齒變體相同。
Composable Diffusion?可組合的擴(kuò)散繪圖
A method to allow the combination of multiple prompts. combine prompts using an uppercase AND
允許組合多個(gè)提示的方法。使用大寫 AND 組合提示
Supports weights for prompts: a cat :1.2 AND a dog AND a penguin :2.2 The default weight value is 1. It can be quite useful for combining multiple embeddings to your result: creature_embedding in the woods:0.7 AND arcane_embedding:0.5 AND glitch_embedding:0.2
支持提示權(quán)重: a cat :1.2 AND a dog AND a penguin :2.2 默認(rèn)權(quán)重值為 1。對(duì)于將多個(gè)嵌入組合到結(jié)果中非常有用: creature_embedding in the woods:0.7 AND arcane_embedding:0.5 AND glitch_embedding:0.2
Using a value lower than 0.1 will barely have an effect. a cat AND a dog:0.03 will produce basically the same output as a cat
使用低于 0.1 的值幾乎不會(huì)產(chǎn)生影響。 a cat AND a dog:0.03 將產(chǎn)生與 a cat 基本相同的輸出
This could be handy for generating fine-tuned recursive variations, by continuing to append more prompts to your total. creature_embedding on log AND frog:0.13 AND yellow eyes:0.08
通過繼續(xù)向總數(shù)追加更多提示,這對(duì)于生成微調(diào)的遞歸變體可能很方便。 creature_embedding on log AND frog:0.13 AND yellow eyes:0.08
Interrupt中斷
Press the Interrupt button to stop current processing.
按中斷按鈕停止當(dāng)前處理。
4GB videocard support 4GB顯卡支持
Optimizations for GPUs with low VRAM. This should make it possible to generate 512x512 images on videocards with 4GB memory.
針對(duì)具有低 VRAM 的 GPU 進(jìn)行了優(yōu)化。這應(yīng)該可以在具有 512GB 內(nèi)存的顯卡上生成 4x4 圖像。
--lowvram is a reimplementation of an optimization idea by basujindal. Model is separated into modules, and only one module is kept in GPU memory; when another module needs to run, the previous is removed from GPU memory. The nature of this optimization makes the processing run slower -- about 10 times slower compared to normal operation on my RTX 3090.
--lowvram 是巴蘇金達(dá)爾優(yōu)化思想的重新實(shí)現(xiàn)。模型被分成模塊,GPU內(nèi)存中只保留一個(gè)模塊;當(dāng)另一個(gè)模塊需要運(yùn)行時(shí),前一個(gè)模塊將從 GPU 內(nèi)存中刪除。這種優(yōu)化的性質(zhì)使處理運(yùn)行速度變慢 - 與我的RTX 3090上的正常操作相比,大約慢10倍。
--medvram is another optimization that should reduce VRAM usage significantly by not processing conditional and unconditional denoising in the same batch.
--medvram 是另一個(gè)優(yōu)化,通過不在同一批次中處理?xiàng)l件和無條件去噪,應(yīng)該會(huì)顯著減少 VRAM 的使用。
This implementation of optimization does not require any modification to the original Stable Diffusion code.
這種優(yōu)化實(shí)現(xiàn)不需要對(duì)原始穩(wěn)定擴(kuò)散代碼進(jìn)行任何修改。
Face restoration面部修復(fù)
Lets you improve faces in pictures using either GFPGAN or CodeFormer. There is a checkbox in every tab to use face restoration, and also a separate tab that just allows you to use face restoration on any picture, with a slider that controls how visible the effect is. You can choose between the two methods in settings.
允許您使用 GFPGAN 或 CodeFormer 改善圖片中的人臉。每個(gè)選項(xiàng)卡中都有一個(gè)復(fù)選框來使用面部修復(fù),還有一個(gè)單獨(dú)的選項(xiàng)卡,只允許您在任何圖片上使用面部修復(fù),并帶有一個(gè)滑塊來控制效果的可見程度。您可以在設(shè)置中在這兩種方法之間進(jìn)行選擇。

Checkpoint Merger初級(jí)融合煉丹術(shù)
Guide generously donated by an anonymous benefactor.
由一位匿名捐助者慷慨捐贈(zèng)的指南。

Full guide with other info is here: https://imgur.com/a/VjFi5uM
包含其他信息的完整指南在這里: https://imgur.com/a/VjFi5uM
Saving儲(chǔ)存
Click the Save button under the output section, and generated images will be saved to a directory specified in settings; generation parameters will be appended to a csv file in the same directory.
點(diǎn)擊 保存 輸出部分下方的按鈕,生成的圖像將保存到設(shè)置中指定的目錄中;生成參數(shù)將附加到同一目錄中的 CSV 文件中。
Loading加載
Gradio's loading graphic has a very negative effect on the processing speed of the neural network. My RTX 3090 makes images about 10% faster when the tab with gradio is not active. By default, the UI now hides loading progress animation and replaces it with static "Loading..." text, which achieves the same effect. Use the --no-progressbar-hiding commandline option to revert this and show loading animations.
Gradio的加載圖形對(duì)神經(jīng)網(wǎng)絡(luò)的處理速度有非常負(fù)面的影響。我的RTX 3090使圖像速度提高約10%,當(dāng)帶有g(shù)radio的標(biāo)簽未處于活動(dòng)狀態(tài)時(shí)。默認(rèn)情況下,UI 現(xiàn)在隱藏加載進(jìn)度動(dòng)畫,并將其替換為靜態(tài)“正在加載...”文本,達(dá)到相同的效果。使用 --no-progressbar-hiding 命令行選項(xiàng)還原此設(shè)置并顯示加載動(dòng)畫。
Prompt validation提示詞確認(rèn)
Stable Diffusion has a limit for input text length. If your prompt is too long, you will get a warning in the text output field, showing which parts of your text were truncated and ignored by the model.
穩(wěn)定擴(kuò)散對(duì)輸入文本長(zhǎng)度有限制。如果提示太長(zhǎng),您將在文本輸出字段中收到警告,顯示模型截?cái)嗪秃雎粤宋谋镜哪男┎糠帧?/p>
Png info圖片信息
Adds information about generation parameters to PNG as a text chunk. You can view this information later using any software that supports viewing PNG chunk info, for example: https://www.nayuki.io/page/png-file-chunk-inspector
將有關(guān)生成參數(shù)的信息作為文本塊添加到 PNG。您可以稍后使用任何支持查看 PNG 區(qū)塊信息的軟件查看此信息,例如: https://www.nayuki.io/page/png-file-chunk-inspector
Settings設(shè)置
A tab with settings, allows you to use UI to edit more than half of parameters that previously were commandline. Settings are saved to config.js file. Settings that remain as commandline options are ones that are required at startup.
帶有設(shè)置的選項(xiàng)卡允許您使用 UI 編輯以前是命令行的一半以上的參數(shù)。設(shè)置保存到配置文件.js。保留為命令行選項(xiàng)的設(shè)置是啟動(dòng)時(shí)所需的設(shè)置。
Filenames format文件命名格式
The Images filename pattern field in the Settings tab allows customization of generated txt2img and img2img images filenames. This pattern defines the generation parameters you want to include in filenames and their order. The supported tags are:
“設(shè)置”選項(xiàng)卡中的 Images filename pattern 字段允許自定義生成的 txt2img 和 img2img 圖像文件名。此模式定義要包含在文件名中的生成參數(shù)及其順序。支持的標(biāo)簽包括:
[steps], [cfg], [prompt], [prompt_no_styles], [prompt_spaces], [width], [height], [styles], [sampler], [seed], [model_hash], [prompt_words], [date], [datetime], [job_timestamp].
This list will evolve though, with new additions. You can get an up-to-date list of supported tags by hovering your mouse over the "Images filename pattern" label in the UI.
不過,此列表將隨著新內(nèi)容的添加而發(fā)展。通過將鼠標(biāo)懸停在 UI 中的“圖像文件名模式”標(biāo)簽上,可以獲取受支持標(biāo)記的最新列表。
Example of a pattern: [seed]-[steps]-[cfg]-[sampler]-[prompt_spaces]
模式示例: [seed]-[steps]-[cfg]-[sampler]-[prompt_spaces]
Note about "prompt" tags: [prompt] will add underscores between the prompt words, while [prompt_spaces] will keep the prompt intact (easier to copy/paste into the UI again). [prompt_words] is a simplified and cleaned-up version of your prompt, already used to generate subdirectories names, with only the words of your prompt (no punctuation).
關(guān)于“提示”標(biāo)簽的注意事項(xiàng): [prompt] 將在提示詞之間添加下劃線,而 [prompt_spaces] 將保持提示不變(更容易再次復(fù)制/粘貼到 UI 中)。 [prompt_words] 是提示的簡(jiǎn)化和清理版本,已用于生成子目錄名稱,僅包含提示的單詞(無標(biāo)點(diǎn)符號(hào))。
If you leave this field empty, the default pattern will be applied ([seed]-[prompt_spaces]).
如果將此字段留空,則將應(yīng)用默認(rèn)模式 ( [seed]-[prompt_spaces] )。
Please note that the tags are actually replaced inside the pattern. It means that you can also add non-tags words to this pattern, to make filenames even more explicit. For example: s=[seed],p=[prompt_spaces]
請(qǐng)注意,標(biāo)簽實(shí)際上是在圖案內(nèi)替換的。這意味著您還可以在此模式中添加非標(biāo)記單詞,以使文件名更加明確。例如: s=[seed],p=[prompt_spaces]
User scripts用戶腳本
If the program is launched with --allow-code option, an extra text input field for script code is available at the bottom of the page, under Scripts -> Custom code. It allows you to input python code that will do the work with the image.
如果使用 --allow-code 選項(xiàng)啟動(dòng)程序,則頁面底部的“腳本 ->自定義代碼”下會(huì)顯示腳本代碼的額外文本輸入字段。它允許您輸入將完成圖像工作的 python 代碼。
In code, access parameters from web UI using the p variable, and provide outputs for web UI using the display(images, seed, info) function. All globals from the script are also accessible.
在代碼中,使用 p 變量從 Web UI 訪問參數(shù),并使用 display(images, seed, info) 函數(shù)為 Web UI 提供輸出。腳本中的所有全局變量也可以訪問。
A simple script that would just process the image and output it normally:
一個(gè)簡(jiǎn)單的腳本,只需處理圖像并正常輸出:
UI configUI參數(shù)
You can change parameters for UI elements in ui-config.json, it is created automatically when the program first starts. Some options:
您可以在 ui-config.json 中更改 UI 元素的參數(shù),它是在程序首次啟動(dòng)時(shí)自動(dòng)創(chuàng)建的。一些選項(xiàng):
??????????? radio groups: default selection?單選組:默認(rèn)選擇
??????????? sliders: default value, min, max, step
滑塊:默認(rèn)值、最小值、最大值、步長(zhǎng)
??????????? checkboxes: checked state?復(fù)選框:選中狀態(tài)
??????????? text and number inputs: default values
文本和數(shù)字輸入:默認(rèn)值
Checkboxes that would usually expand a hidden section will not initially do so when set as UI config entries.
通常會(huì)展開隱藏部分的復(fù)選框在設(shè)置為 UI 配置條目時(shí)最初不會(huì)這樣做。
ESRGAN
It's possible to use ESRGAN models on the Extras tab, as well as in SD upscale.
可以在“附加內(nèi)容”選項(xiàng)卡上使用ESRGAN模型,也可以在SD高檔中使用。
To use ESRGAN models, put them into ESRGAN directory in the same location as webui.py. A file will be loaded as a model if it has .pth extension. Grab models from the Model Database.
要使用 ESRGAN 模型,請(qǐng)將它們放入與 webui.py 相同位置的 ESRGAN 目錄中。如果文件具有 .pth 擴(kuò)展名,則文件將作為模型加載。從模型數(shù)據(jù)庫中獲取模型。
Not all models from the database are supported. All 2x models are most likely not supported.
并非支持?jǐn)?shù)據(jù)庫中的所有模型。很可能不支持所有 2x 型號(hào)。
img2img alternative test 圖生圖替代測(cè)試
這個(gè)功能在早期就有,但是我沒看懂他和現(xiàn)在的InstructPix2Pix有什么區(qū)別
Deconstructs an input image using a reverse of the Euler diffuser to create the noise pattern used to construct the input prompt.
使用歐拉擴(kuò)散器的反向解構(gòu)輸入圖像,以創(chuàng)建用于構(gòu)造輸入提示的噪聲模式。
As an example, you can use this image. Select the img2img alternative test from the scripts section.
例如,您可以使用此圖像。從腳本部分選擇 img2img 替代測(cè)試。

Adjust your settings for the reconstruction process:
調(diào)整重建過程的設(shè)置:
??????????? Use a brief description of the scene: "A smiling woman with brown hair." Describing features you want to change helps. Set this as your starting prompt, and 'Original Input Prompt' in the script settings.
使用場(chǎng)景的簡(jiǎn)要描述:“一個(gè)棕色頭發(fā)的微笑女人。描述要更改的功能會(huì)有所幫助。將其設(shè)置為開始提示,并在腳本設(shè)置中設(shè)置“原始輸入提示”。
??????????? You MUST use the Euler sampling method, as this script is built on it.
您必須使用歐拉采樣方法,因?yàn)榇四_本是在其上構(gòu)建的。
??????????? Sampling steps: 50-60. This MUCH match the decode steps value in the script, or you'll have a bad time. Use 50 for this demo.
采樣步驟:50-60。這與腳本中的解碼步驟值匹配,否則您將遇到不好的時(shí)間。在此演示中使用 50。
??????????? CFG scale: 2 or lower. For this demo, use 1.8. (Hint, you can edit ui-config.json to change "img2img/CFG Scale/step" to .1 instead of .5.
CFG 量表:2 或更低。對(duì)于此演示,請(qǐng)使用 1.8。(提示,您可以編輯 ui-config.json 將“img2img/CFG Scale/step”更改為 .1 而不是 .5。
??????????? Denoising strength - this does matter, contrary to what the old docs said. Set it to 1.
降噪強(qiáng)度 - 這確實(shí)很重要,與舊文檔所說的相反。將其設(shè)置為 1。
??????????? Width/Height - Use the width/height of the input image.
寬度/高度 - 使用輸入圖像的寬度/高度。
??????????? Seed...you can ignore this. The reverse Euler is generating the noise for the image now.
種子。。。你可以忽略這一點(diǎn)。反向歐拉現(xiàn)在正在為圖像產(chǎn)生噪聲。
??????????? Decode cfg scale - Somewhere lower than 1 is the sweet spot. For the demo, use 1.
解碼 cfg 刻度 - 低于 1 的地方是最佳點(diǎn)。對(duì)于演示,請(qǐng)使用 1。
??????????? Decode steps - as mentioned above, this should match your sampling steps. 50 for the demo, consider increasing to 60 for more detailed images.
解碼步驟 - 如上所述,這應(yīng)該與您的采樣步驟相匹配。演示為 50,對(duì)于更詳細(xì)的圖像,請(qǐng)考慮增加到 60。
Once all of the above are dialed in, you should be able to hit "Generate" and get back a result that is a very close approximation to the original.
撥入上述所有內(nèi)容后,您應(yīng)該能夠點(diǎn)擊“生成”并獲得與原始結(jié)果非常接近的結(jié)果。
After validating that the script is re-generating the source photo with a good degree of accuracy, you can try to change the details of the prompt. Larger variations of the original will likely result in an image with an entirely different composition than the source.
驗(yàn)證腳本是否以很高的準(zhǔn)確性重新生成源照片后,您可以嘗試更改提示的詳細(xì)信息。原件的較大變化可能會(huì)導(dǎo)致圖像的構(gòu)圖與源完全不同。
Example outputs using the above settings and prompts below (Red hair/pony not pictured)
使用上述設(shè)置和以下提示的示例輸出(未顯示紅發(fā)/小馬)

"A smiling woman with blue hair." Works. "A frowning woman with brown hair." Works. "A frowning woman with red hair." Works. "A frowning woman with red hair riding a horse." Seems to replace the woman entirely, and now we have a ginger pony.
“一個(gè)微笑的藍(lán)頭發(fā)女人?!惫こ??!耙粋€(gè)皺著眉頭的棕色頭發(fā)的女人?!惫こ獭!耙粋€(gè)皺著眉頭的紅頭發(fā)女人?!惫こ獭!耙粋€(gè)皺著眉頭的紅頭發(fā)騎馬的女人。”似乎完全取代了女人,現(xiàn)在我們有一匹姜小馬。
user.css
Create a file named user.css near webui.py and put custom CSS code into it. For example, this makes the gallery taller:
在 webui.py 附近創(chuàng)建一個(gè)名為 user.css 的文件,并將自定義 CSS 代碼放入其中。例如,這會(huì)使圖片展示頁面(gallery)更高:
?
A useful tip is you can append /?__theme=dark to your webui url to enable a built in dark theme
一個(gè)有用的提示是您可以將 /?__theme=dark 附加到您的webui url以啟用內(nèi)置的深色主題
e.g. (http://127.0.0.1:7860/?__theme=dark)?例如 ( http://127.0.0.1:7860/?__theme=dark )
Alternatively, you can add the --theme=dark to the set COMMANDLINE_ARGS= in webui-user.bat
或者,您可以將 --theme=dark 添加到 @2 中的 set COMMANDLINE_ARGS= #
e.g. set COMMANDLINE_ARGS=--theme=dark?例如 set COMMANDLINE_ARGS=--theme=dark

notification.mp3 完成提示音
If an audio file named notification.mp3 is present in webui's root folder, it will be played when the generation process completes.
如果 webui 的根文件夾中存在名為 notification.mp3 的音頻文件,它將在生成過程完成后播放。
As a source of inspiration:?作為靈感來源:
??????????? https://pixabay.com/sound-effects/search/ding/?duration=0-30
??????????? https://pixabay.com/sound-effects/search/notification/?duration=0-30
Tweaks其他調(diào)整
Clip Skip
This is a slider in settings, and it controls how early the processing of prompt by CLIP network should be stopped.
這是設(shè)置中的一個(gè)滑塊,它控制應(yīng)多早停止 CLIP 網(wǎng)絡(luò)對(duì)提示的處理。
A more detailed explanation:?更詳細(xì)的解釋:
CLIP is a very advanced neural network that transforms your prompt text into a numerical representation. Neural networks work very well with this numerical representation and that's why devs of SD chose CLIP as one of 3 models involved in stable diffusion's method of producing images. As CLIP is a neural network, it means that it has a lot of layers. Your prompt is digitized in a simple way, and then fed through layers. You get numerical representation of the prompt after the 1st layer, you feed that into the second layer, you feed the result of that into third, etc, until you get to the last layer, and that's the output of CLIP that is used in stable diffusion. This is the slider value of 1. But you can stop early, and use the output of the next to last layer - that's slider value of 2. The earlier you stop, the less layers of neural network have worked on the prompt.
CLIP 是一個(gè)非常先進(jìn)的神經(jīng)網(wǎng)絡(luò),可將提示文本轉(zhuǎn)換為數(shù)字表示。神經(jīng)網(wǎng)絡(luò)與這種數(shù)值表示配合得很好,這就是為什么SD的開發(fā)人員選擇CLIP作為參與穩(wěn)定擴(kuò)散生成圖像方法的3種模型之一。由于CLIP是一個(gè)神經(jīng)網(wǎng)絡(luò),這意味著它有很多層。您的提示以簡(jiǎn)單的方式數(shù)字化,然后通過圖層饋送。在第一層之后,你會(huì)得到提示的數(shù)字表示,你把它輸入到第二層,你把結(jié)果輸入到第三層,依此類推,直到你到達(dá)最后一層,這就是用于穩(wěn)定擴(kuò)散的CLIP的輸出。這是滑塊值 1。但是您可以提前停止,并使用倒數(shù)第二層的輸出 - 即滑塊值 2。 越早停止,神經(jīng)網(wǎng)絡(luò)在提示上工作的層就越少。
Some models were trained with this kind of tweak, so setting this value helps produce better results on those models.
某些模型是通過這種調(diào)整進(jìn)行訓(xùn)練的,因此設(shè)置此值有助于在這些模型上產(chǎn)生更好的結(jié)果。
This is the Stable Diffusion web UI wiki. Wiki Home
這是穩(wěn)定擴(kuò)散網(wǎng)頁UI維基。 維基主頁