Skip to content

Commit

Permalink
網站更新
Browse files Browse the repository at this point in the history
  • Loading branch information
ivon852 committed Mar 5, 2024
1 parent 66ef7a7 commit 8540dff
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 14 deletions.
2 changes: 2 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,5 @@ enableGitInfo = true
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
BookTranslatedOnly = false

NoIndex = true
4 changes: 3 additions & 1 deletion config_ivonblog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ enableGitInfo = true
# By default partals/docs/comments.html includes Disqus template
# See https://gohugo.io/content-management/comments/#configure-disqus
# Can be overwritten by same param in page frontmatter
BookComments = true
BookComments = false

# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables portable links and link checks in markdown pages.
Expand All @@ -134,3 +134,5 @@ enableGitInfo = true
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
BookTranslatedOnly = false

NoIndex = true
6 changes: 3 additions & 3 deletions content.zh-cn/extensions/auto-sd-paint-ext.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ weight: 10

![](../../../images/auto-sd-paint-ext-5.webp)

8. 重新启动Krita,编辑图片时左边即会多出一堆面板。这些面板可从设置工具面板叫出来
8. 重新启动Krita,编辑图片时左边即会多出一堆皮肤。这些皮肤可从设置工具皮肤叫出来

![](../../../images/auto-sd-paint-ext-6.webp)

9. 以Inpaint的功能为例子,让我们先把无关的面板都关掉,只留下"Inpaint"
9. 以Inpaint的功能为例子,让我们先把无关的皮肤都关掉,只留下"Inpaint"

![](../../../images/auto-sd-paint-ext-7.webp)

Expand All @@ -47,7 +47,7 @@ weight: 10

![](../../../images/auto-sd-paint-ext-9.webp)

12. 于左边的面板填入提示词,点击Start Inpaint,开始绘图。进度条可从终端机查看。
12. 于左边的皮肤填入提示词,点击Start Inpaint,开始绘图。进度条可从终端机查看。

![](../../../images/auto-sd-paint-ext-10.webp)

Expand Down
2 changes: 1 addition & 1 deletion content.zh-cn/extensions/how-to-install-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ weight: 1

![](../../../images/how-to-install-extensions-3.webp)

5. 如果未来要更新扩充功能,点击Installed → Check for updates,等待下载完成,然后重启WebUI。您可以在这个界面按取消打勾来禁用特定的扩充功能
5. 如果未来要更新扩充功能,点击Installed → Check for updates,等待下载完成,然后重启WebUI。您可以在这个界面按取消打勾来停用特定的扩充功能

![](../../../images/how-to-install-extensions-4.webp)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ set COMMANDLINE_ARGS=--xformers --no-half-vae --medvram
|--listen | None | False | 以0.0.0.0主机名称启动Gradio,使其能回应连接请求 |
|--port | PORT | 7860 | 以给定的通信端口启动Gradio。1024以下的通信端口需要root权限。如果可用的话,缺省使用7860通信端口。 |
|--hide-ui-dir-config | None | False | 在WebUI隐藏设置档目录。|
|--freeze-settings | None | False | 禁用编辑设置|
|--freeze-settings | None | False | 停用编辑设置|
|--enable-insecure-extension-access | None | False | 无视其他选项,强制激活扩充功能页签。 |
|--gradio-debug | None | False | 使用 --debug选项启动Gradio |
|--gradio-auth | GRADIO_AUTH | None | 设置Gardio授权,例如"username:password",或是逗号分隔值形式"u1:p1,u2:p2,u3:p3" |
Expand All @@ -111,7 +111,7 @@ set COMMANDLINE_ARGS=--xformers --no-half-vae --medvram
|--tls-certfile | TLS_CERTFILE | None | 部份激活TLS,需要配合--tls-keyfile才能正常运作 |
|--server-name | SERVER_NAME | None | 设置服务器主机名称 |
|--skip-version-check | None | False | 不检查torch和xformers的版本 |
|--no-hashing | None | False | 禁用计算存盘点模型的sha256哈希值,加快加载速度 |
|--no-hashing | None | False | 停用计算存盘点模型的sha256哈希值,加快加载速度 |
|--skip-version-check|None|False|不检查torch与xformers版本。|
|--skip-version-check|None|False|不检查Python版本。|
|--skip-torch-cuda-test|None|False|不检查CUDA是否正常运作。|
Expand All @@ -133,7 +133,7 @@ set COMMANDLINE_ARGS=--xformers --no-half-vae --medvram
|--sub-quad-kv-chunk-size | SUB_QUAD_KV_CHUNK_SIZE | None | sub-quadratic cross-attention layer优化使用的kv区块大小|
|--sub-quad-chunk-threshold | SUB_QUAD_CHUNK_THRESHOLD | None |sub-quadratic cross-attention layer优化过程中,区块化使用的VRAM阈值|
|--opt-channelslast | None | False | 激活4d tensors使用的alternative layout,或许可以加快推理速度 **仅适用搭载Tensor内核的Nvidia显卡(16xx系列以上)** |
|--disable-opt-split-attention | None | False | 强制禁用cross-attention layer的优化 |
|--disable-opt-split-attention | None | False | 强制停用cross-attention layer的优化 |
|--disable-nan-check | None | False | 不检查生成图像/潜在空间是否有nan。在CI模式无使用存盘点模型的时候很有用。|
|--use-cpu | {all, sd, interrogate, gfpgan, bsrgan, esrgan, scunet, codeformer} | None | 让部份模块使用CPU作为PyTorch的设备 |
|--no-half | None | False | 不将模型转换为半精度浮点数 |
Expand All @@ -143,7 +143,7 @@ set COMMANDLINE_ARGS=--xformers --no-half-vae --medvram
|--medvram | None | False | 激活Stable Diffusion模型优化,牺牲速度,换取较小的VRAM占用。 |
|--lowvram | None | False | 激活Stable Diffusion模型优化,大幅牺牲速度,换取更小的VRAM占用。 |
|--lowram | None | False | 将Stable Diffusion存盘点模型的权重加载至VRAM,而非RAM |
|--disable-model-loading-ram-optimization|None|False|禁用模型加载时降低RAM占用的优化|
|--disable-model-loading-ram-optimization|None|False|停用模型加载时降低RAM占用的优化|
| **功能** |
|--autolaunch | None | False | 启动WebUI后自动打开系统缺省的浏览器 |
|--theme | None | Unset | 使用指定主题启动WebUI (light或dark),无指定则使用浏览器缺省主题。 |
Expand All @@ -158,8 +158,8 @@ set COMMANDLINE_ARGS=--xformers --no-half-vae --medvram
|--tests|TESTS|False|运行功能测试,确认WebUI正常运作。|
|--no-tests| None | False | 即使有`--test`参数也不要运行功能测试。 |
|--dump-sysinfo | None | False | 倾印系统消息并退出程序(不包括扩充功能) |
|--disable-all-extensions|None|False|禁用所有扩充功能,包含内置的扩充功能。|
|--disable-extra-extensions|None|False|禁用所有扩充功能|
|--disable-all-extensions|None|False|停用所有扩充功能,包含内置的扩充功能。|
|--disable-extra-extensions|None|False|停用所有扩充功能|
| **已经无效的选项** |
|--show-negative-prompt | None | False | 无作用 |
|--deepdanbooru | None | False |无作用 |
Expand Down
2 changes: 1 addition & 1 deletion content.zh-cn/installation/deploy-to-paperspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Paperspace是一间位于美国的云端机器学习服务供应商,提供免

![](../../../images/deploy-to-paperspace-1.webp)

3. 这个面板就是笔记本的页面了。点击右上角的Run all后,笔记本会安装Stable Diffusion WebUI所需的依赖,并下载Stable Diffusion v2.1的模型。此阶段所下载的文件不会计入帐户的保存空间。
3. 这个皮肤就是笔记本的页面了。点击右上角的Run all后,笔记本会安装Stable Diffusion WebUI所需的依赖,并下载Stable Diffusion v2.1的模型。此阶段所下载的文件不会计入帐户的保存空间。

![](../../../images/deploy-to-paperspace-2.webp)

Expand Down
4 changes: 2 additions & 2 deletions deploy_ivonblog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ toreplace="../../../images/"
find "content.zh-cn" -type f -exec sed -i "s|$tomatch|$toreplace|" {} \;

# 因為隱私因素,故不能提供Giscus真身
cp ../gohugo-ivonblog/layouts/partials/comments/giscus_sdwebui_manuals.html layouts/partials/comments/giscus.html
#cp ../gohugo-ivonblog/layouts/partials/comments/giscus_sdwebui_manuals.html layouts/partials/comments/giscus.html
rm -r ../gohugo-ivonblog/static/posts/stable-diffusion-webui-manuals/*
rm -r public resources .hugo_build.lock
hugo --gc --minify --config config_ivonblog.toml
cp -r public/* ../gohugo-ivonblog/static/posts/stable-diffusion-webui-manuals
rm -r public resources .hugo_build.lock
echo "" > layouts/partials/comments/giscus.html
#echo "" > layouts/partials/comments/giscus.html

git add -A
git commit -m "網站更新"
Expand Down
59 changes: 59 additions & 0 deletions layouts/partials/docs/html-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="{{ default .Summary .Description }}">
<meta name="theme-color" content="#FFFFFF">
<meta name="color-scheme" content="light dark">

{{- if .Site.Params.NoIndex -}}
<meta name="robots" content="noindex">
{{- end -}}

{{- with .Page.Params.BookHref -}}
<meta http-equiv="Refresh" content="0; url='{{ . }}'" />
{{- end -}}

{{- template "_internal/opengraph.html" . -}}

<title>{{ partial "docs/html-head-title" . }}</title>

{{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }}
<link rel="manifest" href="{{ $manifest.RelPermalink }}">
<link rel="icon" href="{{ "favicon.png" | relURL }}" type="image/x-icon">

{{- range .Translations }}
<link rel="alternate" hreflang="{{ default .Language.Lang .Site.LanguageCode }}" href="{{ .Permalink }}" title="{{ partial "docs/title" . }}">
{{- end -}}

<!-- Theme stylesheet, you can customize scss by creating `assets/custom.scss` in your website -->
{{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" {{ template "integrity" $styles }}>

{{- if default true .Site.Params.BookSearch -}}
{{- $searchJSFile := printf "%s.search.js" .Language.Lang }}
{{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }}
<script defer src="{{ "flexsearch.min.js" | relURL }}"></script>
<script defer src="{{ $searchJS.RelPermalink }}" {{ template "integrity" $searchJS }}></script>
{{ end -}}

{{- if .Site.Params.BookServiceWorker -}}
{{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }}
<script defer src="{{ $swJS.RelPermalink }}" {{ template "integrity" $swJS }}></script>
{{ end -}}

{{- template "_internal/google_analytics.html" . -}}

<!-- RSS -->
{{- with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}

{{ "<!--" | safeHTML }}
Made with Book Theme
https://github.com/alex-shpak/hugo-book
{{ "-->" | safeHTML }}

{{- define "integrity" -}}
{{- if (urls.Parse .Permalink).Host -}}
integrity="{{ .Data.Integrity }}" crossorigin="anonymous"
{{- end -}}
{{- end -}}

0 comments on commit 8540dff

Please sign in to comment.