參考:
https://pytorch.org/blog/accelerating-generative-ai-3/
https://colab.research.google.com/drive/1jZ5UZXk7tcpTfVwnX33dDuefNMcnW9ME?usp=sharing#scrollTo=jueYhY5YMe22
大概GPU資源8G-16G;另外模型資源下載慢可以在國內(nèi)鏡像:https://aifasthub.com/文章來源:http://www.zghlxwxcb.cn/news/detail-856620.html
1、加速代碼
能加速到2秒左右文章來源地址http://www.zghlxwxcb.cn/news/detail-856620.html
from diffusers import StableDiffusionXLPipeline
import torch
pipe = StableDiffusionXLPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0<
到了這里,關于diffusers加速文生圖速度;stable-diffusion、PixArt-α模型的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!