-
Notifications
You must be signed in to change notification settings - Fork 160
命令行参数和设置
batvbs edited this page Nov 15, 2022
·
16 revisions
更新时间:2022/11/15 源文件 更新时间 英语wiki
| 常用 | 作用 | ||
|---|---|---|---|
| 19 6 |
--precision full --no-half | 适用于GTX 16 系列显卡和CPU | 不将模型切换为16位浮点(半精度) |
| 14 | --medvram | 适用于6G显存 | 为低VRM使用率牺牲一点速度(约2倍时间) |
| 15 | --lowvram | 适用于4G显存 | 为低VRM使用率牺牲大量速度(约6倍时间) |
| 40 | --use-cpu all | 使用CPU跑图(约60倍时间) | |
| 33 | --xformers | 优化显存使用量(推荐,必选) | 启用 xformers |
| 35 | --deepdanbooru | 启用 deepdanbooru | |
| 53 | --autolaunch | 自动打开浏览器(推荐,必选) | 启动时在系统默认浏览器中打开webui |
| 41 | --listen | 同Wifi的其他用户访问http://你的电脑IP地址:7860
|
向局域网共享你的webUI。如何查看本机局域网IP地址 |
| 20 | --share | 谨慎启用,webui有很多远程执行漏洞 | 向公网共享你的webUI,任何人都能访问(危险!) |
| 62 59 |
--ui-debug-mode --disable-safe-unpickle | 不加载和检查模型, 以快速启动webUI | |
| 54 | --theme dark | 夜间模式 | 用深色主题启动用户界面 |
| - | |||
| 命令行参数 | DeepL机器翻译,暂未进行人工修正 | 原文 | |
| 1 | --config | 构建模型的配置的路径 | path to config which constructs model |
| 2 | --ckpt | 稳定扩散模型的检查点的路径;如果指定,该检查点将被添加到检查点列表中并被加载。 | path to checkpoint of stable diffusion model; if specified, this checkpoint will be added to the list of checkpoints and loaded |
| 3 | --ckpt-dir | 包含稳定扩散检查点的目录的路径 | Path to directory with stable diffusion checkpoints |
| 4 | --gfpgan-dir | GFPGAN目录 | GFPGAN directory |
| 5 | --gfpgan-model | GFPGAN模型文件名 | GFPGAN model file name |
| 6 | --no-half | 不将模型切换为16位浮点 | do not switch the model to 16-bit floats |
| 7 | --no-half-vae | 不要将VAE模型切换为16位浮点 | do not switch the VAE model to 16-bit floats |
| 8 | --no-progressbar-hiding | 不隐藏gradio用户界面中的进度条(我们隐藏它是因为如果你在浏览器中使用硬件加速,它会降低ML的速度)。 | do not hide progressbar in gradio UI (we hide it because it slows down ML if you have hardware acceleration in browser) |
| 9 | --max-batch-count | 在用户界面的最大批处理值 | maximum batch count value for the UI |
| 10 | --embeddings-dir | 用于文本反转的embeddings目录(默认:embeddings)。 | embeddings directory for textual inversion (default: embeddings) |
| 11 | --hypernetwork-dir | Hypernetwork目录 | hypernetwork directory |
| 12 | --localizations-dir | 本地化目录 | localizations directory |
| 13 | --allow-code | 允许从webui中执行自定义脚本 | allow custom script execution from webui |
| 14 | --medvram | 启用稳定的扩散模型优化,为低VRM使用率牺牲一点速度。 | enable stable diffusion model optimizations for sacrificing a little speed for low VRM usage |
| 15 | --lowvram | 启用稳定的扩散模型优化,以牺牲大量的速度来达到极低的VRM使用率 | enable stable diffusion model optimizations for sacrificing a lot of speed for very low VRM usage |
| 16 | --lowram | 将稳定的扩散检查点权重加载到VRAM,而不是RAM。 | load stable diffusion checkpoint weights to VRAM instead of RAM |
| 17 | --always-batch-cond-uncond | 禁用cond/uncond batching,这是为节省内存而启用的--medvram或--lowvram。 | disables cond/uncond batching that is enabled to save memory with --medvram or --lowvram |
| 18 | --unload-gfpgan | 不做任何事情。 | does not do anything. |
| 19 | --precision {full,autocast} | 在这个精度下评估 | evaluate at this precision |
| 20 | --share | 对gradio使用share=True,并使用户界面可以通过他们的网站访问。 | use share=True for gradio and make the UI accessible through their site |
| 21 | --ngrok | ngrok authtoken, 替代 gradio --share | ngrok authtoken, alternative to gradio --share |
| 22 | --ngrok-region | ngrok应该在哪个区域启动。 | The region in which ngrok should start. |
| 23 | --enable-insecure-extension-access | 启用扩展标签,不管其他选项如何 | enable extensions tab regardless of other options |
| 24 | --codeformer-models-path | 含有 codeformer 模型文件的目录路径。 | Path to directory with codeformer model file(s). |
| 25 | --gfpgan-models-path | 包含 GFPGAN 模型文件的目录路径。 | Path to directory with GFPGAN model file(s). |
| 26 | --esrgan-models-path | 包含 ESRGAN 模型文件的目录路径。 | Path to directory with ESRGAN model file(s). |
| 27 | --bsrgan-models-path | BSRGAN模型文件的目录路径。 | Path to directory with BSRGAN model file(s). |
| 28 | --realesrgan-models-path | RealESRGAN模型文件的目录路径。 | Path to directory with RealESRGAN model file(s). |
| 29 | --scunet-models-path | 包含ScuNET模型文件的目录路径。 | Path to directory with ScuNET model file(s). |
| 30 | --swinir-models-path | 含有 SwinIR 模型文件的目录路径。 | Path to directory with SwinIR model file(s). |
| 31 | --ldsr-models-path | 与LDSR模型文件的目录路径。 | Path to directory with LDSR model file(s). |
| 32 | --clip-models-path | 具有CLIP模型文件的目录路径。 | Path to directory with CLIP model file(s). |
| 33 | --xformers | 启用交叉注意层的xformers | enable xformers for cross attention layers |
| 34 | --force-enable-xformers | 启用交叉关注层的xformers,不管检查代码是否认为你可以运行它;如果这不起作用,不要做错误报告。 | enable xformers for cross attention layers regardless of whether the checking code thinks you can run it; do not make bug reports if this fails to work |
| 35 | --deepdanbooru | 启用 deepdanbooru 审讯器 | enable deepdanbooru interrogator |
| 36 | --opt-split-attention | 强制启用Doggettx的交叉注意力层优化。默认情况下,它对Torch cuda是开启的。 | force-enables Doggettx's cross-attention layer optimization. By default, it's on for torch cuda. |
| 37 | --opt-split-attention-invokeai | 强制启用InvokeAI的跨注意层优化。默认情况下,当cuda不可用时,它是开启的。 | force-enables InvokeAI's cross-attention layer optimization. By default, it's on when cuda is unavailable. |
| 38 | --opt-split-attention-v1 | 启用旧版本的分裂注意力优化,不消耗所有能找到的VRAM。 | enable older version of split attention optimization that does not consume all the VRAM it can find |
| 39 | --disable-opt-split-attention | 强制停用交叉注意力层优化 | force-disables cross-attention layer optimization |
| 40 | --use-cpu {all, sd, interrogate, gfpgan, bsrgan, esrgan, scunet, codeformer} | 将CPU作为指定模块的火炬设备 | use CPU as torch device for specified modules |
| 41 | --listen | 用0.0.0.0作为服务器名称启动gradio,允许响应网络请求 | launch gradio with 0.0.0.0 as server name, allowing to respond to network requests |
| 42 | --port | 用指定的服务器端口启动gradio,如果端口小于1024,你需要root/admin权限,如果有的话,默认为7860 | launch gradio with given server port, you need root/admin rights for ports < 1024, defaults to 7860 if available |
| 43 | --show-negative-prompt | 不做任何事情 | does not do anything |
| 44 | --ui-config-file | 用来配置界面的文件名 | filename to use for ui configuration |
| 45 | --hide-ui-dir-config | 从webui中隐藏目录配置 | hide directory configuration from webui |
| 46 | --freeze-settings | 禁用编辑设置 | disable editing settings |
| 47 | --ui-settings-file | 用来做界面设置的文件名 | filename to use for ui settings |
| 48 | --gradio-debug | 用--调试选项启动gradio | launch gradio with --debug option |
| 49 | --gradio-auth | 设置gradio认证,如 "username:password";或逗号分隔的多个认证,如 "u1:p1,u2:p2,u3:p3" | set gradio authentication like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3" |
| 50 | --gradio-img2img-tool {color-sketch,editor} | gradio图像上传工具:可以是ctopping的编辑器,也可以是绘图的彩色素描。 | gradio image uploader tool: can be either editor for ctopping, or color-sketch for drawing |
| 51 | --opt-channelslast | 为稳定的扩散改变内存类型,最后改为通道。 | change memory type for stable diffusion to channels last |
| 52 | --styles-file | 样式所使用的文件名 | filename to use for styles |
| 53 | --autolaunch | 启动时在系统的默认浏览器中打开webui URL | open the webui URL in the system's default browser upon launch |
| 54 | --theme {light,dark} | 用浅色或深色主题启动用户界面 | launches the UI with light or dark theme |
| 55 | --use-textbox-seed | 在用户界面中使用文本框输入种子(没有向上/向下,但可以输入长种子)。 | use textbox for seeds in UI (no up/down, but possible to input long seeds) |
| 56 | --disable-console-progressbars | 不将进度条输出到控制台 | do not output progressbars to console |
| 57 | --enable-console-prompts | 当用txt2img和img2img生成时,打印提示到控制台。 | print prompts to console when generating with txt2img and img2img |
| 58 | --vae-path | 到变异自动编码器模型的路径 | Path to Variational Autoencoders model |
| 59 | --disable-safe-unpickle | 禁止检查pytorch模型中的恶意代码 | disable checking pytorch models for malicious code |
| 60 | --api | 使用api=True来启动webui的api | use api=True to launch the api with the webui |
| 61 | --nowebui | 使用api=True来启动api而不是webui | use api=True to launch the api instead of the webui |
| 62 | --ui-debug-mode | 不加载模型以快速启动UI | Don't load model to quickly launch UI |
| 63 | --device-id | 选择要使用的默认CUDA设备(之前可能需要导出CUDA_VISIBLE_DEVICES=0,1,等) | Select the default CUDA device to use (export CUDA_VISIBLE_DEVICES=0,1,etc might be needed before) |
| 64 | --administrator | 管理员权限 | Administrator rights |
| 65 | --cors-allow-origins | 允许的CORS起源 | Allowed CORS origins |
| 66 | --tls-keyfile | 部分启用TLS,需要-tls-certfile才能完全发挥作用 | Partially enables TLS, requires --tls-certfile to fully function |
| 67 | --tls-certfile | 部分启用TLS,需要-tls-keyfile才能完全发挥作用 | Partially enables TLS, requires --tls-keyfile to fully function |
| 68 | --server-name | 设置服务器的主机名 | Sets hostname of server |