国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

【教程】MAC m1 安裝并使用AI繪畫 stable-diffusion,交互式命令行。

這篇具有很好參考價(jià)值的文章主要介紹了【教程】MAC m1 安裝并使用AI繪畫 stable-diffusion,交互式命令行。。希望對大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

要求

  • macOS 12.3 Monterey 或更高版本
  • Python
  • 耐心

第一步 下載模型包

  1. 在https://huggingface.co注冊

  2. 搜索stable-diffusion-v-1-4-original跳轉(zhuǎn)到頁面

  3. 點(diǎn)擊接受條款
    【教程】MAC m1 安裝并使用AI繪畫 stable-diffusion,交互式命令行。

  4. 點(diǎn)擊上面Files and versions

  5. 下載sd-v1-4.ckpt (4.27 GB)并記下保存位置

開始安裝

# 安裝brew 或者 xcode工具 如果有可以跳過
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# 1. 安裝  pyenv
brew install pyenv-virtualenv
pyenv install anaconda3-2022.05
pyenv virtualenv anaconda3-2022.05
eval "$(pyenv init -)"
pyenv activate anaconda3-2022.05

# 2. 安裝系統(tǒng)級依賴
brew install cmake protobuf rust
# 3. 安裝 miniconda (M1 arm64):
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o Miniconda3-latest-MacOSX-arm64.sh
/bin/bash Miniconda3-latest-MacOSX-arm64.sh
# 4. clone代碼(如果沒有g(shù)it請先裝git)
git clone https://github.com/magnusviri/stable-diffusion.git
cd stable-diffusion
# 5. 創(chuàng)建模型包文件夾
mkdir -p models/ldm/stable-diffusion-v1/

# 6. 關(guān)聯(lián)模型
PATH_TO_CKPT="$HOME/Downloads"  # 或者其他你保存前面你下載 sd-v1-4.ckpt 的路徑
ln -s "$PATH_TO_CKPT/sd-v1-4.ckpt" models/ldm/stable-diffusion-v1/model.ckpt

# 7. 安裝依賴
PIP_EXISTS_ACTION=w CONDA_SUBDIR=osx-arm64 conda env create -f environment-mac.yaml
# 8. 開啟ldm
conda activate ldm
# 9. 這個(gè)只需要執(zhí)行一次 預(yù)加載模型,不走這個(gè)的話后面生成圖片的時(shí)間會(huì)非常非常慢
python scripts/preload_models.py
# 10. 啟動(dòng)交互式命令行,啟動(dòng)之后命令行前面會(huì)有dream,這時(shí)可以直接輸入描述來生成圖片,具體的參數(shù)可以 -help查看
python scripts/dream.py --full_precision  # half-precision requires autocast and won't work
# ps 原始腳本也可以使用
python scripts/orig_scripts/txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms

如果特別慢的話

python ./scripts/orig_scripts/txt2img.py --prompt "ocean" --ddim_steps 5 --n_samples 1 --n_iter 1

一些比較正常的圖片

 Posh girl wearing an open blazer, tie, detailed portrait, cell shaded, 4 k, concept art, by wlop, ilya kuvshinov, artgerm, krenz cushart, greg rutkowski, pixiv. cinematic dramatic atmosphere, sharp focus, volumetric lighting, cinematic lighting, studio quality

【教程】MAC m1 安裝并使用AI繪畫 stable-diffusion,交互式命令行。

elegant seductive beautiful vampire horror gothic white hair ornate rococo intaglio dripping blood by Tom Bagshaw and Seb McKinnon, highly detailed, dramatic lighting, volumetric, red eyes

【教程】MAC m1 安裝并使用AI繪畫 stable-diffusion,交互式命令行。

【教程】MAC m1 安裝并使用AI繪畫 stable-diffusion,交互式命令行。
【教程】MAC m1 安裝并使用AI繪畫 stable-diffusion,交互式命令行。
【教程】MAC m1 安裝并使用AI繪畫 stable-diffusion,交互式命令行。
【教程】MAC m1 安裝并使用AI繪畫 stable-diffusion,交互式命令行。
【教程】MAC m1 安裝并使用AI繪畫 stable-diffusion,交互式命令行。
【教程】MAC m1 安裝并使用AI繪畫 stable-diffusion,交互式命令行。文章來源地址http://www.zghlxwxcb.cn/news/detail-508790.html

到了這里,關(guān)于【教程】MAC m1 安裝并使用AI繪畫 stable-diffusion,交互式命令行。的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • AI - stable-diffusion(AI繪畫)的搭建與使用

    AI - stable-diffusion(AI繪畫)的搭建與使用

    最近 AI 火的一塌糊涂,除了 ChatGPT 以外,AI 繪畫領(lǐng)域也有很大的進(jìn)步,以下幾張圖片都是 AI 繪制的,你能看出來么? 上面的效果圖其實(shí)是使用了開源的 AI 繪畫項(xiàng)目 stable-diffusion 繪制的,這是它的官方倉庫: https://github.com/CompVis/stable-diffusion 但是這個(gè)官方項(xiàng)目并不適合我們這

    2024年02月02日
    瀏覽(28)
  • 如何免費(fèi)使用 Stable-Diffusion AI 繪畫服務(wù)

    如何免費(fèi)使用 Stable-Diffusion AI 繪畫服務(wù)

    最近一直有朋友問我,自己設(shè)備配置不行怎么使用 Stable-Diffusion,問我有沒有共享的 Stable-Diffusion AI 繪畫服務(wù)能體驗(yàn)一下,付費(fèi)也行。說實(shí)話聽到付費(fèi)我確實(shí)心動(dòng)了,但我的機(jī)器作一次圖 30s 起步,而付費(fèi)的云服務(wù)器動(dòng)輒一個(gè)月 4k+,只好抑制住這份心動(dòng)。 但是總有辦法的。

    2024年02月10日
    瀏覽(34)
  • MAC搭建M1環(huán)境的stable-diffusion

    MAC搭建M1環(huán)境的stable-diffusion

    蘋果公司的程序員為 M1,M2 之類的ARM64芯片專門創(chuàng)建了一個(gè) stable-diffusion 的倉庫: Run Stable Diffusion on Apple Silicon with Core ML 鏈接為: https://github.com/apple/ml-stable-diffusion 可以充分利用 M1 內(nèi)置的人工智能芯片(神經(jīng)網(wǎng)絡(luò)芯片), 需要轉(zhuǎn)換 PyTorch 模型為 Apple Core ML 模型。 本文基于這個(gè)倉庫進(jìn)

    2024年02月09日
    瀏覽(27)
  • AI繪畫 | stable-diffusion的模型簡介和下載使用

    AI繪畫 | stable-diffusion的模型簡介和下載使用

    我們下載完stable-diffusion-ui后還需要下載需要的大模型,才能進(jìn)行AI繪畫的操作。秋葉的stable-diffusion-ui整合包內(nèi),包含了anything-v5-PrtRE.safetensors和Stable Diffusion-V1.5-final-prune_v1.0.ckpt兩個(gè)模型。 anything-v5-PrtRE.safetensors模型可以用于生成多種類型的圖像,包括肖像、風(fēng)景、動(dòng)物、卡通

    2024年02月04日
    瀏覽(27)
  • 【AI繪畫】Stable Diffusion學(xué)習(xí)——安裝與使用教程(一)

    【AI繪畫】Stable Diffusion學(xué)習(xí)——安裝與使用教程(一)

    1、Python 官網(wǎng):https://www.python.org/downloads/ 建議安裝3.10開頭的版本號(hào),下載安裝包后運(yùn)行即可 (安裝python,建議安裝3.10.6版本,這個(gè)是Stable Diffusion WebUI作者推薦安裝版本) 將Python添加到默認(rèn)路徑,否則后面很多調(diào)用Python進(jìn)行的操作都會(huì)失靈 安裝完成之后,檢查Python版本 按

    2024年02月03日
    瀏覽(17)
  • AI繪畫Stable Diffusion安裝、使用教程 整合包下載

    AI繪畫Stable Diffusion安裝、使用教程 整合包下載

    ?效果圖: 在下載 AI 繪畫工具前,電腦上需要提前下載一些運(yùn)行的環(huán)境 1.下載python、git 首先本地機(jī)器最好是英偉達(dá)的 N 卡,并且至少需要 4GB 顯存才能在本地運(yùn)行,當(dāng)然,A 卡也是可以玩起來的,因?yàn)槔L畫對顯卡是有著很高的要求的。不然的話,即使安裝成功,得到的圖片結(jié)

    2024年02月09日
    瀏覽(35)
  • Mac(m1/m2)安裝stable-diffusion-webui教程

    Mac(m1/m2)安裝stable-diffusion-webui教程

    前言 內(nèi)容介紹 軟硬件需求 安裝步驟 第一步:安裝homebrew 第二步:安裝pytorch 第三步:安裝stable diffusion webui 第四步:下載ai繪圖基礎(chǔ)模型 第五步:運(yùn)行 常見問題 ????????問題1:系統(tǒng)運(yùn)行容易卡在gfpgan、clip,所以建議提前安裝好這些組件 ????????問題2:pip3安裝慢,

    2024年02月13日
    瀏覽(26)
  • stable-diffusion AI 繪畫

    git clone https://github.com/CompVis/stable-diffusion.git 進(jìn)入stable-diffusion目錄 在這里注冊一個(gè)賬號(hào):?Hugging Face – The AI community building the future.?并生成個(gè)token 安裝CUDA?NVIDIA 安裝 CUDA_nvidia cuda_長滿頭發(fā)的程序猿的博客-CSDN博客 pip install torch -f https://download.pytorch.org/whl/torch_stable.html pip insta

    2024年02月13日
    瀏覽(27)
  • AI繪畫——使用stable-diffusion生成圖片時(shí)提示RuntimeError: CUDA out of memory處理方法

    AI繪畫——使用stable-diffusion生成圖片時(shí)提示RuntimeError: CUDA out of memory處理方法

    RuntimeError: CUDA out of memory. Tried to allocate 1.50 GiB (GPU 0; 8.00 GiB total capacity; 5.62 GiB already allocated; 109.75 MiB free; 5.74 GiB reserved in total by PyTorch) If reserved memory is allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF 1、添加參數(shù)–n_

    2024年02月02日
    瀏覽(91)
  • MacOS系統(tǒng)(M1/M2)安裝AI繪畫StableDiffusion保姆級教程

    MacOS系統(tǒng)(M1/M2)安裝AI繪畫StableDiffusion保姆級教程

    @TOC 安裝完成后,推薦閱讀這篇教程:AI繪畫:Stable Diffusion 終極煉丹寶典:從入門到精通 實(shí)操環(huán)境: macOS 13 Arm64(建議12以上的系統(tǒng)使用) Apple M1 先來看幾個(gè)樣例: AI繪畫StableDiffusion實(shí)操教程:冰霜旗袍美女 廢話不多說,直接上教程 如果沒有安裝HomeBrew,在終端運(yùn)行如下命

    2024年02月17日
    瀏覽(24)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包