-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yangbo08
committed
May 30, 2023
1 parent
b01f12e
commit 3617ed6
Showing
23 changed files
with
785 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"MD033": { | ||
"allowed_elements": [ | ||
"nobr", | ||
"sup", | ||
"font" | ||
] | ||
}, | ||
"MD013": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Stable Difussion | ||
|
||
## 云盘部署 | ||
|
||
[AI 绘画神器 Stable Diffusion 基础教程](https://zhuanlan.zhihu.com/p/617971918) | ||
[Stable Diffusion云端部署攻略](https://www.uisdc.com/stable-diffusion-2) | ||
[https://github.com/camenduru/stable-diffusion-webui-colab](https://github.com/camenduru/stable-diffusion-webui-colab) | ||
|
||
## 插件 | ||
|
||
[汉化插件](https://github.com/VinsonLaro/stable-diffusion-webui-chinese) | ||
|
||
- 安装中文扩展插件:点击 Extensions 选择 Install from URL,输入 <https://github.com/VinsonLaro/stable-diffusion-webui-chinese> ,点击 Install,并重启 WebUI | ||
- 切换到中文模式:在 Settings 面板中,将 User interface 中的 Localization 设置成 Chinese 中文模式,重启 WebUI 即可切换到中文界面 | ||
|
||
[Prompt 中文输入](https://github.com/butaixianran/Stable-Diffusion-Webui-Prompt-Translator) | ||
|
||
- 下载提示词中文扩展插件: <https://github.com/butaixianran/Stable-Diffusion-Webui-Prompt-Translator> ,将项目作为 zip 文件下载,解压后放到 stable-diffusion-webui/extensions 目录中,重启 WebUI | ||
- 调用百度翻译 API:去 api.fanyi.baidu.com 申请一个免费 API Key,并将翻译服务开通。在管理控制台的开发者信息页中确认 APP ID 和 密钥 | ||
- 在 Stable Diffusion WebUI 的 Prompt Translator 面板中,选择百度翻译引擎,并将申请的 APP ID 和 密钥填写进去,点击保存 | ||
- 使用:在 Stable Diffusion WebUI 页面顶部会出现一个翻译工具栏,我们在提示词输入框中输入中文,点击工具栏中的翻译就能自动把提示词替换成英文 | ||
|
||
## 参数说明 | ||
|
||
- Sampling Method:取样的方法,会影响照片产生的细节 | ||
- Sampling Steps:取样次数,次数越高,花费的时间越久,细节当然也越好 | ||
- Restore faces:修正脸部问题 | ||
- Hires.fix:修正高取样的情况下,背景变得很奇怪的状况 | ||
- Width:图片的宽度 | ||
- Height:图片的高度 | ||
- Batch count:生成几张图 | ||
- Batch size:同时算几张图片 | ||
- CFG Scale:要 AI 多么听从你的指令去生成图,这个值越低的话,生成图可能不一定会照你的要求,但可能会有惊喜 | ||
- Seed:种子值,可以看作是随意值,在同样的参数下,这个值不同就会产生不同的样子 | ||
|
||
## Prompt 语法技巧 | ||
|
||
Prompt 提示词可以分为 4 段式结构:画质画风 + 画面主体 + 画面细节 + 风格参考 | ||
|
||
- 画面画风:主要是大模型或 LoRA 模型的 Tag、正向画质词、画作类型等 | ||
- 画面主体:画面核心内容、主体人/事/物/景、主体特征/动作等 | ||
- 画面细节:场景细节、人物细节、环境灯光、画面构图等 | ||
- 风格参考:艺术风格、渲染器、Embedding Tag 等 | ||
|
||
### 提示词语法 | ||
|
||
- 提示词排序:越前面的词汇越受 AI 重视,重要事物的提示词放前面 | ||
- 增强/减弱:(提示词:权重数值),默认 1,大于 1 加强,低于 1 减弱。如 (doctor:1.3) | ||
- 混合:提示词 | 提示词,实现多个要素混合,如 [red|blue] hair 红蓝色头发混合 | ||
- <+> 和 AND:用于连接短提示词,AND 两端要加空格 | ||
- 分步渲染:[提示词 A:提示词 B:数值],先按提示词 A 生成,在设定的数值后朝提示词 B 变化。如[dog:cat:30] 前 30 步画狗后面的画猫,[dog:cat:0.9] 前面 90%画狗后面 10%画猫 | ||
- 正向提示词:masterpiece, best quality 等画质词,用于提升画面质量 | ||
- 反向提示词:nsfw, bad hands, missing fingers……, 用于不想在画面中出现的内容 | ||
- Emoji:支持 emoji,如 😍 形容表情,🖐 修饰手 | ||
|
||
### 常用提示词举例 | ||
|
||
 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Stable Diffusion prompt | ||
|
||
| english | translate | sentence | | ||
| --- | ---- | ------ | | ||
| **2023-05-04** | Stable Diffusion | | ||
| Stable | 稳定的,稳固,安定 | | ||
| Diffusion | 扩散,漫射 | | ||
| <font color=red>positive image quality</font> | 正向画质 | | ||
| Masterpiece | 杰作,名著 | | ||
| Vivid Colors | 鲜艳的色彩 | | ||
| <font color=red>Details</font> | 细节修饰 | | ||
| sharp focus | 锐利的焦点 | | ||
| matte | 哑光的 | | ||
| ultrawide shot | 超广角镜头 | | ||
| low angle | 低角度 | | ||
| up close portraits of | 近距离肖像 | | ||
| cinematic | 电影般的 | | ||
| bokeh | 背景虚化 | | ||
| <font color=red>ambient light</font> | 环境灯光 | | ||
| dreamatic lighting | 梦幻般的 | | ||
| uplight | 聚光灯 | | ||
| volumetric lighting | 体积照明 | | ||
| mood lighting | 情绪照明 | | ||
| bright | 明亮的 | | ||
| soft illumination | 柔和的照明 | | ||
| rays of shimmering light | 闪烁的光芒 | | ||
| studio lighting | 工作室照明 | | ||
| <font color=red>style rendering</font> | 风格渲染 | | ||
| portraits | 人像 | | ||
| landscape | 景观,风景,山水 | | ||
| anime | 日本动画片 | | ||
| illustration | 插图,例证,插画 | | ||
| concept art | 艺术概念 | | ||
| realism | 现实主义 | | ||
| watercolor painting | 水彩绘画 | | ||
| cyberpunk | 赛博朋克 | | ||
| wash painting | 水墨画 | | ||
| trending on artstaion | | | ||
| blender | 搅拌机,混合器 | | ||
| zbrush | 刷子 | | ||
| octan render | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,36 @@ | ||
## git 初始化配置 | ||
|
||
1. 生成ssh秘钥,打开git终端,执行`ssh-keygen -t rsa -C "邮箱"`,执行成功,切换到~/.ssh目录下,复制id_rsa.pub内容 | ||
2. 进入gitlab|github的settings -> SSH and GPG keys,点击add ssh key,这一步等于说你把公钥放到了Github上进行托管 | ||
3. 全局配置git用户名和邮箱 | ||
|
||
```shell | ||
git config --global user.name "XXX" | ||
git config --global user.password "[email protected]" | ||
``` | ||
|
||
### git工作区域和流程 | ||
|
||
Workspace:工作区,就是平时进行开发改动的地方,是当前看到的最新的内容,在开发的过程也就是对工作区的操作 | ||
Index:暂存区,当执行`git add`命令后,工作区的文件就会被移入暂存区,暂存区标记了当前工作区中的那些内容是被git管理的,当完成某个需求或者功能后需要提交代码,第一步就是通过`git add` 先提交到暂存区 | ||
Repository:本地仓库,位于自己的本地电脑上,通过`git commit`提交暂存区的内容,会进入本地仓库 | ||
Remote:远程仓库,用来托管代码的服务器,远程仓库的内容能够被分布在多个地点的处于协作关系的本地仓库修改,本地仓库修改完代码后通过`git push`命令同步代码到远程仓库 | ||
|
||
### 基本操作 | ||
|
||
#### git add | ||
|
||
添加文件到暂存区 | ||
|
||
```sh | ||
# 添加某个文件到暂存区,后面可以跟多个文件,空格区分 | ||
git add xxx | ||
# 添加当前更改的所有文件到暂存区 | ||
git add . | ||
``` | ||
|
||
#### git commit | ||
|
||
```sh | ||
# 提交暂存的更改,会新开编辑器进行编辑 | ||
git commit | ||
|
@@ -33,23 +41,31 @@ git commit -am | |
# 对最近一次的提交信息进行修改,此操作会修改commit的hash值 | ||
git commit --amend | ||
``` | ||
|
||
#### git pull | ||
|
||
```sh | ||
# 从远程仓库拉取代码合并到本地,可简写为git pull 等同于 git fetch && git merge | ||
git pull <远程主机名> <远程分支名>:<本地分支名> | ||
# 使用rebase的模式进行合并 | ||
git pull --rebase <远程主机名> <远程分支名>:<本地分支名> | ||
``` | ||
|
||
#### git fetch | ||
|
||
与`git pull`不同的是`git fetch`操作仅仅只会拉取远程的更改,不会自动进行merge操作,对你当前代码没有影响 | ||
|
||
```sh | ||
# 获取远程仓库特定分支的更新 | ||
git fetch <远程主机名> <分支名> | ||
# 获取远程仓库所有分支的更新 | ||
git fetch --all | ||
``` | ||
|
||
#### git push | ||
|
||
#### git branch | ||
|
||
```sh | ||
当一个分支被推送并合并到远程分支后,-d 才会本地删除该分支。如果一个分支还没有被推送或者合并,那么可以使用-D强制删除它 | ||
# 新建本地分支,但不切换 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Three3D | ||
|
||
## 3D引擎基本知识 | ||
|
||
### 场景(scene) | ||
|
Oops, something went wrong.