2023年4月10日 星期一

ComfyUI 安裝筆記

 https://github.com/comfyanonymous/ComfyUI 主程式

https://github.com/Fannovel16/comfy_controlnet_preprocessors Controlnet支援


安裝

git clone https://github.com/comfyanonymous/ComfyUI


cd ComfyUI\ -> pipenv --python 3.10

pipenv shell

pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118 xformers


cd ComfyUI/custom_nodes

git clone https://github.com/Fannovel16/comfy_controlnet_preprocessors

cd comfy_controlnet_preprocessors

python install.py --no_download_ckpts


放入各式模型位置

ComfyUI\models\checkpoints\

ComfyUI\models\loras\

ComfyUI\models\controlnet\


啟動

cd ComfyUI 

python main.py

2023年4月8日 星期六

sublime text 簡體中文檔案

使用package control安裝下面兩個套件

可避免簡體中文內容的檔案出現亂碼的情形。
ctrl+shift+p 開啟 package control 選擇 install package 安裝:


 

2023年4月6日 星期四

webui.bat 不爆顯存的設定

 4.在webui-user.bat加入下面的參數

set COMMANDLINE_ARGS=---medvram -precision full --no-half --skip-torch-cuda-test   #AMD

set COMMANDLINE_ARGS=--xformers --medvram --precision full --no-half               #NVIDIA 低階卡

set COMMANDLINE_ARGS=--xformers                                                    #NVIDIA 高階卡

如果 cuda 持續 out of memory 也可以試試加入 --opt-split-attention 或加入下面一行

set PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.6,max_split_size_mb:256 <-數字越小越安全

如果要使用ControlNet要移除 --medvram 不然會有錯誤如下:

Expected all tensors to be on the same device, but found at least two devices

目前設定:

set COMMANDLINE_ARGS=--xformers --opt-split-attention

set PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.6,max_split_size_mb:128

stable diffusion webui 必裝插件收集

 sd_web_ui_preset_utils #主要採樣配置設定儲存與讀取

controlnet 系列

    sd-webui-controlnet    #角色動作骨架主要插件

    openpose-editor        #在webui上設計骨架

    posex                  #3D設計骨架

    sd-webui-depth-lib     #手部造型depth庫

stable-diffusion-webui-localization-zh_TW    #中文化

sd-webui-bilingual-localization              #可同時顯示原文與中文化

a1111-sd-webui-tagcomplete                   #prompt自動補全

Stable-Diffusion-Webui-Civitai-Helper        #C站助手

multidiffusion-upscaler-for-automatic1111    #切片繪製大圖

stable-diffusion-webui-two-shot              #分區規劃構圖

stable-diffusion-webui-composable-lora       #使用AND分開lora互相污染

stable-diffusion-webui-rembg                 #AI去背摳圖