From 1379d575ac0c06448cfdd287b5e4e7c0ba904e4d Mon Sep 17 00:00:00 2001 From: ouczbs Date: Sun, 18 Feb 2024 21:32:55 +0800 Subject: [PATCH] ai --- src/a/ai/小说推文.md | 6 ++ src/c/comfyUI/安装.md | 15 ++++ src/s/stable_diffussion/使用.md | 37 +++++++++ src/s/stable_diffussion/基础.md | 134 ++++++++++++++++++++++++++++++++ 4 files changed, 192 insertions(+) create mode 100644 src/a/ai/小说推文.md create mode 100644 src/c/comfyUI/安装.md create mode 100644 src/s/stable_diffussion/使用.md create mode 100644 src/s/stable_diffussion/基础.md diff --git a/src/a/ai/小说推文.md b/src/a/ai/小说推文.md new file mode 100644 index 0000000..364a4b4 --- /dev/null +++ b/src/a/ai/小说推文.md @@ -0,0 +1,6 @@ +# 分镜解说 +- +# AI绘画 + + +# 人物配音 diff --git a/src/c/comfyUI/安装.md b/src/c/comfyUI/安装.md new file mode 100644 index 0000000..ddff558 --- /dev/null +++ b/src/c/comfyUI/安装.md @@ -0,0 +1,15 @@ +```shell +git clone "https://github.com/comfyanonymous/ComfyUI.git" ComfyUI + +python -m venv venv +.\venv\Scripts\activate.bat +pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ +pip install -r requirements.txt +pip install torch-directml + + + +call .\venv\Scripts\activate.bat + +python main.py --directml +``` \ No newline at end of file diff --git a/src/s/stable_diffussion/使用.md b/src/s/stable_diffussion/使用.md new file mode 100644 index 0000000..d31c554 --- /dev/null +++ b/src/s/stable_diffussion/使用.md @@ -0,0 +1,37 @@ +# 扩散 +## 关键词 + +- 很难精确描述事物 +- 描述词多,复杂易干扰 + +## 词组 embedding + +- 关键词组重命名 +- 简化输入 + +# 精确 + +## 随机种子 + +- 可以保证相同关键词结果近似 + +## 模型 + +专属模型是精确的,但是大一统模型是宽泛的 + +## LORA + +在大一统模型基础上进行优化特化,部分参数增量修改 + +一种LORA对应一种专属风格 + +## ControlNet +### 提取信息 + +- 颜色、形状、深度、骨骼... +### 局部更新 +- 保证提取的信息一致 +- 其他地方按关键词更新 + + + diff --git a/src/s/stable_diffussion/基础.md b/src/s/stable_diffussion/基础.md new file mode 100644 index 0000000..655e91d --- /dev/null +++ b/src/s/stable_diffussion/基础.md @@ -0,0 +1,134 @@ +# 安装 + +## 基础包 + +- [秋叶大佬](https://space.bilibili.com/12566101) +- [星空大佬](https://space.bilibili.com/250989068) + +## 显卡 + +### NVIDA + +- 通过git clone 即可下载相关包 + +### AMD + +- 安装起来比较麻烦,原理建议参考星空的基础包 +- 参考NVIDA,容易出现报错 + +## 原理 + +- Python 系统环境 3.10.6 + +- ```shell + #amd, nvida去掉 -directml 即可 + + #下载主体 + git clone https://github.com/lshqqytiger/stable-diffusion-webui-directml.git + + ##插件下载 stable-diffusion-webui-directml/repositories 目录下, 需要改名 + git clone https://github.com/lshqqytiger/k-diffusion-directml.git k-diffusion + git clone https://github.com/lshqqytiger/stablediffusion-directml.git stable-diffusion-stability-ai + ``` + +- ```shell + #程序入口 + webui-user.bat + ``` + +# 关键词 + +英文输入,英文符号 +## 规则 +### 权重 +- () 1.1倍权重 +- (light :1.5) 指定为1.5倍权重 +### 正向词 + +### 反向词 + +## 风格 +### 二次元 +*广泛适用于二次元风格,可以考虑搭配不同模型使用! +```python +#正面词 +(masterpiece:1,2), best quality, masterpiece, highres, original, extremely detailed wallpaper, perfect lighting,(extremely detailed CG:1.2), drawing, paintbrush, + +#反面词 +NSFW, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, (ugly:1.331), (duplicate:1.331), (morbid:1.21), (mutilated:1.21), (tranny:1.331), mutated hands, (poorly drawn hands:1.5), blurry, (bad anatomy:1.21), (bad proportions:1.331), extra limbs, (disfigured:1.331), (missing arms:1.331), (extra legs:1.331), (fused fingers:1.61051), (too many fingers:1.61051), (unclear eyes:1.331), lowers, bad hands, missing fingers, extra digit,bad hands, missing fingers, (((extra arms and legs))), +``` + +# 模型 +## 资源 + +### 抱脸网 + +- [hugging face](https://*huggingface*.co/) + +### C站 + +- [civitai](https://civitai.com/) + +## 实例 + +### 二次元 + +```python +(masterpiece, best quality),1girl with long white hair sitting in a field of green plants and flowers, her hand under her chin, warm lighting, white dress, blurry foreground +Negative prompt: EasyNegativeV2 +Steps: 25, ENSD: 31337, Size: 512x1024, Seed: 1293666383, Model: CF5_Counterfeit-V3.0_fix_fix_fix, Sampler: DPM++ 2M Karras, CFG scale: 10, Clip skip: 2, Model hash: db6cd0a62d, Hires upscale: 2, Hires upscaler: R-ESRGAN 4x+ Anime6B, Denoising strength: 0.5 +``` + +### 写实 + +```python +detailed blue eyes, masterpiece, russian girl, blue t-shirt, short sleeves, yoga pants, arms at side, ponytail, blunt bangs, white hair, straight-on, standing, outdoors, looking at viewer, +Negative prompt: NG_DeepNegative_V1_75T, bad anatomy, (worst quality:2), (low quality:2) +Steps: 40, Size: 640x960, Seed: 3247017879, Version: v1.5.1, Sampler: DPM++ 2M SDE Karras, CFG scale: 7, Model hash: 9462506675, "NG_DeepNegative_V1_75T: 54e7e4826d53" +``` + +### 古风 + +```python +Masterpiece,best quality,(Highest picture quality),(Master's work),(ultra-detailed),{top quality},1girl,dress,Bamboo forest,horse,sword,battle,yaguru magiku, +Negative prompt: (((simple background))),monochrome ,lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, lowres, bad anatomy, bad hands, text, error, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, ugly,pregnant,vore,duplicate,morbid,mut ilated,tran nsexual, hermaphrodite,long neck,mutated hands,poorly drawn hands,poorly drawn face,mutation,deformed,blurry,bad anatomy,bad proportions,malformed limbs,extra limbs,cloned face,disfigured,gross proportions, (((missing arms))),(((missing legs))), (((extra arms))),(((extra legs))),pubic hair, plump,bad legs,error legs,username,blurry,bad feet +Steps: 30, Size: 960x1536, Seed: 4151075712, Model: GuoFeng3.4, Version: v1.4.0, Sampler: DPM++ 2M SDE Karras, CFG scale: 7, Clip skip: 2, Model hash: a83e25fe5b, Hires steps: 16, Hires upscale: 1.5, Hires upscaler: Latent, Denoising strength: 0, face_editor_enabled: True, face_editor_face_size: 512, face_editor_mask_blur: 12, face_editor_mask_size: 0, face_editor_strength1: 0.4, face_editor_strength2: 0, face_editor_confidence: 0.97, face_editor_face_margin: 1.6, face_editor_affected_areas: Face, face_editor_max_face_count: 20, face_editor_prompt_for_face: "", face_editor_use_minimal_area: False, face_editor_ignore_larger_faces: True, face_editor_apply_inside_mask_only: True, face_editor_apply_scripts_to_faces: False +``` + +# 插件 + +## 提升词 + +Tag 补全 [tagcomplete](https://github.com/DominikDoom/a1111-sd-webui-tagcomplete) + +~~提示词直接翻译 [all-in-one](https://github.com/Physton/sd-webui-prompt-all-in-one) + +提示词反推 [wd14-tagger](https://github.com/toriato/stable-diffusion-webui-wd14-tagger) + +## 中文汉化 + +中文 [localization-zh_CN](https://github.com/dtlnor/stable-diffusion-webui-localization-zh_CN) + +## 历史记录 + +图库浏览器[images-browser](https://github.com/AlUlkesh/stable-diffusion-webui-images-browser) + +## 模型 + +C站助手[] + +## 图像 + +[图片超清放大] + +图片区域分割 [Segment] + +图片色块分割 [inpaint-anything]( https://github.com/Uminosachi/sd-webui-inpaint-anything) + +图片精确控制 [cutoff](https://github.com/hnmr293/sd-webui-cutoff) + +# 脚本 + +## AI漫画 + +漫画助手 [B站开发者](https://space.bilibili.com/119916498)