{%hackmd @themes/dracula %} # 玩轉AI詠咒,教你變成大魔法師!(不是 使用 **Stable Diffusion**: 可以從這邊下載主要的程式壓縮包→[💌](https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases/tag/v1.0.0-pre) 前置作業 --- 1️⃣ Python 3.10.6(指定版本) [⮯⮯](https://www.python.org/downloads/release/python-3106/) 2️⃣ Cuda Toolkit 11.3 [⮯⮯](https://developer.nvidia.com/cuda-11.3.0-download-archive) 3️⃣ Git [⮯⮯](https://git-scm.com/downloads) :::info 要幫Git設定Path:搜尋環境變數,在系統變數中編輯新增即可。 ::: 解壓縮後models模組使用可以參考 CIVITAI[⮯⮯](https://civitai.com/),依據開源模組的不同分類加入對應資料夾。 主要以先以Checkpoint為主,有可以擴充的LoRA人物模型,還有Hypernetwork等擴充包。 另外可以在web-user.bat中新增Deepdanbooru協助生成圖片對應的文字,詳細是打開網址後的圖生圖介面會多一個按鈕。 `COMMANDLINE_ARGS=--deepdanbooru` 於webui-user可以另外做設定以提升性能[⮯⮯](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Optimizations) 都不行的話要不要試試[Colab版本的NovelAI](https://colab.research.google.com/drive/1Gbzf9TEjr7yQ26lkC9NMV3G5dlzp7ICp?usp=sharing#scrollTo=LZFHNaHuVbmz)? --- ##### 拼接咒語(Prompt) 網路上很多[✨魔法書✨](https://docs.google.com/document/d/1MtCr_Zo2xLUO2g2MuVEGlLhzx6BJUgN7ve5XGjPHR_I/edit),可以多看看找出自己下的順手的prompts。 玩到目前發現它不會畫撲克牌,超不會的那種...會變成克蘇魯牌的那種不會🚫 個人覺得針對產出的圖片質感可以使用的關鍵prompt: :::info (Masterpiece, HDR, high contrast, high saturation, best quality, photo realistic, intensive shadows, depth effect, highlights, detailed face:1.16), (sharp focus, sharp details, sharp image:1.1), detailed realism, extremely realistic, realistic shadows, detailed light, detailed glow, ::: 光暈、光線渲染 :::info (fade:1.22), (photorealism, cinematic lighting:1.05), ::: 美麗的五官 :::info narrow face, highly detailed eyes, 如果是偏向3D的模型可以酌情增加: * pale skin, physically-based rendering photo of 28 y.o woman/man/female/male/girl/boy * 覺得最有機會被辨識性別的詞是girl 如果是偏向2D的模型可以酌情增加: * (extremely detailed CG, ultrarealistic, 8k_wallpaper:1.16) 要算男生(真的很難算): * ((man:1.33)), (highly detailed man:1.16), handsome, 1man ::: 視線/視角 :::info looking at the viewer, view from above, from below ::: :::warning 特殊?: 背光 overexposure(意思是過曝) 選擇困難可以一半一半 (blonde hair:1.5 | silver hair:0.9) ::: 使用我希望的關鍵詞 (straight hair,red fox ears, purple eyes:1.16), open shoulders, long pale orange hair 長直橘髮紫眼的赤狐男生 :star-struck:  這是吃到什麼韓漫!!!再給我來一點!    - meinamix  拒絕的關鍵詞 :::danger ((bad quality)), (Worst Quality, Low Quality, beard:1.4), (Poorly Made Bad 3D, Lousy Bad Realistic:1.1), (naked:0.9), (bad-hands-5, vile_prompt3:0.8), bad anatomy, disfigured, deformed, malformed, mutant, gross, disgusting, out of frame, nsfw, poorly drawn, extra limbs, extra fingers, missing limbs, blurry, out of focus, lowres, bad hands, error, missing fingers, extra digit, fewer digits, cropped, worst quality, normal quality, jpeg artifacts, signature, watermark, username, text ::: Sonya (Masterpiece, HDR, high contrast, high saturation, best quality, photo realistic, intensive shadows, depth effect, highlights, detailed face:1.16), (sharp focus, sharp details, sharp image:1.1), narrow face, highly detailed eyes, looking at the viewer,(blonde hair, high_ponytail, blue eyes:1.16), open shoulders, straight hair, (highly detailed girl:1.16), beautiful, ((smile:1.33))  ## 使用ControlNet輔助腳色動作 為了降低不可名狀出現的機率! 比較了OpenPose跟NormalBAE的校正強度,還是直接使用NormalBAE吧。 ##### 基本安裝 1. 為了要安裝ControlNet,先在webui-user中加入: ``` set COMMANDLINE_ARGS=--enable-insecure-extension-access ``` 2. 運行並開啟Stable Diffusion網頁介面,`Extensions`下的`Avaliable`中直接點擊"Load From"並找到==sd webui contrlnet manipulations==然後 Install。 3. 到ControlNet的HuggingFace[⮯⮯](https://huggingface.co/lllyasviel/ControlNet-v1-1/tree/main)頁面中下載`normalbae.pth` *注意是pth檔哦 4. 將.pth放入 `webui\extensions\sd-webui-controlnet\models`,之後重新啟動StableDiffusion。 5. 基本安裝完成:tada: ##### 使用方法  ~~我喜歡洪知秀 汪汪~~ 1. 放圖 2. 該勾的勾一勾(Pixel Perfect可勾可不勾) 3. Preprocessor 選定 NormalBAE 4. Control Mode 跟 Resize Mode 選定 5. 按下易燃易爆炸按鈕(我也看不懂那啥) 6. 右上的箭頭可以將產生的圖片預覽給你看:sparkles: 接著就會帶入到算圖規則裡面了! --- ## ⚠唉呀安裝出錯了怎麼辦 ~~什麼怎麼辦,Log不會看嗎?~~ 不是...我是說可以上Github看看有沒有人跟你一樣,通常這種跟風軟體一定有人玩得比你兇!比你狠! 它說 你沒有安裝Git 你就去安裝 它說 Git不在Path裡 你就在Path新增 它說 你運算容量不足 你就下`--medvram`指令 它說 出錯但是你不知道哪裡錯了 就把venv資料夾刪掉重來 是不是!很直觀!(並沒有 ## 擴充工具 [圖生文](https://github.com/pharmapsychotic/clip-interrogator-ext)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up