国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

慢網(wǎng)救星!兩步操作加快stable diffusion本地部署速度

2023-05-27 13:18 作者:兼職熊貓  | 我要投稿

使用最新1.3.0版本webui源碼部署的小伙伴不要看了,開發(fā)者重構(gòu)了代碼,launch.py的內(nèi)容被放到了modules/launch_utils.py,就不要改launch了


有些小伙伴在本地部署stable diffusion時總是遇到各種git clone超時,要么就是安裝pythobn模塊的時候pip下載安裝包極慢,看一眼估算時間23小時xx分xx秒,當場暈厥,梯子也無濟于事......不過在運行python launch.py --precision full --no-half或者.\webui-user.bat前先做兩件事,10分鐘部署一個stable diffusion其實很簡單


第一步:python換源

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/

替換成清華的源,這樣下載包的時候就快多了

其它常用的國內(nèi)源有:

https://pypi.mirrors.ustc.edu.cn/simple/

http://mirrors.aliyun.com/pypi/simple/

https://repo.huaweicloud.com/repository/pypi/simple

https://pypi.mirrors.ustc.edu.cn/simple/



第二步:修改launch.py

使用任意文本編輯器,打開stable-diifusion-webui根目錄下的launch.py,找到下列代碼
gfpgan_package = os.environ.get('GFPGAN_PACKAGE', "git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379")

clip_package = os.environ.get('CLIP_PACKAGE', "git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1")

openclip_package = os.environ.get('OPENCLIP_PACKAGE', "git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b")

把那幾個GitHub的源改成國內(nèi)Gitee搬運的(很多sd相關(guān)的工具、插件,在gitee上都有搬運,可以自己搜索,不用梯子)
gfpgan_package = os.environ.get('GFPGAN_PACKAGE', "git+https://gitee.com/kaka8899/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379")

clip_package = os.environ.get('CLIP_PACKAGE', "git+https://gitee.com/kaka8899/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1")

openclip_package = os.environ.get('OPENCLIP_PACKAGE', "git+https://gitee.com/kaka8899/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b")


同理,那幾個diffusion ai的核心組件

stable_diffusion_repo = os.environ.get('STABLE_DIFFUSION_REPO', "https://github.com/Stability-AI/stablediffusion.git")

taming_transformers_repo = os.environ.get('TAMING_TRANSFORMERS_REPO', "https://github.com/CompVis/taming-transformers.git")

k_diffusion_repo = os.environ.get('K_DIFFUSION_REPO', 'https://github.com/crowsonkb/k-diffusion.git')

codeformer_repo = os.environ.get('CODEFORMER_REPO', 'https://github.com/sczhou/CodeFormer.git')

blip_repo = os.environ.get('BLIP_REPO', 'https://github.com/salesforce/BLIP.git')


Clone地址也改成Gitee的

stable_diffusion_repo = os.environ.get('STABLE_DIFFUSION_REPO', "https://gitee.com/kaka8899/stablediffusion.git")

taming_transformers_repo = os.environ.get('TAMING_TRANSFORMERS_REPO', "https://gitee.com/kaka8899/taming-transformers.git")

k_diffusion_repo = os.environ.get('K_DIFFUSION_REPO', 'https://gitee.com/kaka8899/k-diffusion.git')

codeformer_repo = os.environ.get('CODEFORMER_REPO', 'https://gitee.com/kaka8899/CodeFormer.git')

blip_repo = os.environ.get('BLIP_REPO', 'https://gitee.com/kaka8899/BLIP.git')




慢網(wǎng)救星!兩步操作加快stable diffusion本地部署速度的評論 (共 條)

分享到微博請遵守國家法律
青铜峡市| 炉霍县| 陆河县| 图木舒克市| 西充县| 万源市| 南澳县| 汉中市| 屯门区| 临桂县| 武隆县| 万宁市| 青神县| 乐至县| 新营市| 香港 | 丹阳市| 大田县| 西盟| 田林县| 瓦房店市| 新密市| 广丰县| 台中县| 兴业县| 瑞安市| 大理市| 南漳县| 庆安县| 鄂州市| 萍乡市| 桑日县| 大冶市| 无极县| 九江县| 安化县| 广灵县| 鞍山市| 南安市| 新乡县| 乌兰县|