Skip to content

Commit

Permalink
doc: 内容更新
Browse files Browse the repository at this point in the history
  • Loading branch information
yangbo08 committed May 30, 2023
1 parent b01f12e commit 3617ed6
Show file tree
Hide file tree
Showing 23 changed files with 785 additions and 56 deletions.
10 changes: 10 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"MD033": {
"allowed_elements": [
"nobr",
"sup",
"font"
]
},
"MD013": false
}
58 changes: 58 additions & 0 deletions content/AI/Stable Difussion/index.md
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,如 😍 形容表情,🖐 修饰手

### 常用提示词举例

![images](../images/prompt_word_examples.jpeg)
Binary file added content/AI/images/prompt_word_examples.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions content/english/stableDiffusionPrompt.md
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 | |
54 changes: 16 additions & 38 deletions content/english/studyWords.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,44 +126,22 @@
| hardware | 硬件,铁器,金属制品 |
| accelerated | 加速,促进 |
| allocation | 分配 |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| **2023-04-21** | |
| artificial | 人造的,虚假 |
| intelligence | 智力,情报 |
| occupational | 职业的 |
| prompt | 迅速的,提示,促使 |
| tutorial | 教程 |
| erroneously | | I found that there was an instance of VS Code open that was erroneously not shown on my dock |
| postponed | | postponed the restart |
| remained | |
| encounter | 遇到,遭,领教 |
| master | 主,硕士,大师,掌握 |
| piece | 片,一块,部分 |
| Vivid | 生动,传神,活泼 |
| ultra | 过度的,极端主义者 |
| concept | 概念,学说 |
| illumination | 照明,光照,照亮 |
| | |
| | |
| | |
Expand Down
16 changes: 16 additions & 0 deletions content/git/base.md
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
Expand All @@ -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强制删除它
# 新建本地分支,但不切换
Expand Down
13 changes: 13 additions & 0 deletions content/relex/Thinkinglevel.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# 思维方式

按思维方式。人分六层,思维层级不一样,成就也就不一样,但是思维层面不是一成不变的,了解了思维层级,逐渐的改变思维模式,利用成功的思维方式思考问题,会有不一样的效果

## 层级介绍

### 第一层,初级环境层思维模式。关注外界因素

- 别名:怨妇
- 理解层次:环境
- 思考模式:都是他们的错
Expand All @@ -10,7 +15,9 @@
问题发生时,这样的人不会认为是【自己的问题】,会认为【这是环境的问题】,他们解决问题的方式,不是积极从自身找问题,而是【换个环境】。

可想而知,这是徒劳的。

### 第二层 行为,做事从自身找原因,关注为什么(行动派)

- 别名:行动派
- 理解层次:行为
- 思考模式:我还不够努力
Expand All @@ -29,6 +36,7 @@
所以成功学、心灵鸡汤只告诉人努力,而没有告诉方法,被人摒弃也是在所难免的事。

### 第三层 技术能力层,信念价值,做事找方法,关注如何做

- 别名:战术家
- 理解层次:能力
- 思考模式:方法总比问题多
Expand All @@ -39,18 +47,23 @@
比如男女朋友关系不好,那么应该是我的沟通能力有问题,所以要学习一下;下属关系不好,应该是我的管理能力有问题,所以报一个MBA。

【战术家】拥有强大的学习能力和应用能力,可以很好的解决问题,他们既有【行动层的努力】,又有【能力层的思维】,这样的人在社会中处于【中上层】,在公司中都能做到【中上层管理岗位】。

### 第四层 战略层,信念价值层,这个层次的人开始有自己的信念

- 别名:战略家
- 理解层次:信念/价值/规条
- 思考模式:什么才是最重要的
在这个层面,有自己的主张,知道自己要做什么,多方位发现问题,关注问题,不会按照任何外界思想行动, 有自己的价值观,做任何事情关注的是,什么对自己是重要的,自己想要的到底是什么,所以他从来不盲目做事,他不会把注意力分散,不会盲目跟风,心里有自己坚守的东西,认准了就去做,不管别人说什么。咬住青山不放松。成者王侯败者贼。

### 第五层 身份层 自我定位,认清自己定位(我是谁)

- 别名:觉醒
- 理解层次:身份
- 思考模式:
这一层体现的是我们最基础的核心价值与使命,通过自我认同确定整体目标(使命),主要回答我是谁的问题。 你要成为哪方面的人才就需要培养自己在这个领域的能力,能力想清楚后,看需要具体做什么?拆解成一个个具体的行动,然后稳扎稳打逐步就实现它。

### 第六层 精神层 我为这个世界带来什么,让一部分人因为我而怎样

- 别名:领袖/伟人
- 理解层次:精神/使命
- 思考模式:人活着就是为了改变世界
Expand Down
2 changes: 2 additions & 0 deletions content/three/base.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Three3D

## 3D引擎基本知识

### 场景(scene)
Expand Down
Loading

0 comments on commit 3617ed6

Please sign in to comment.