AI大模型教程
一起来学习

diffusers加速文生图速度;stable-diffusion、PixArt-α模型

参考:
https://pytorch.org/blog/accelerating-generative-ai-3/
https://colab.research.google.com/drive/1jZ5UZXk7tcpTfVwnX33dDuefNMcnW9ME?usp=sharing#scrollTo=jueYhY5YMe22

大概GPU资源8G-16G;另外模型资源下载慢可以在国内镜像:https://aifasthub.com/

1、加速代码

能加速到2秒左右

from diffusers import StableDiffusionXLPipeline
import torch

pipe = StableDiffusionXLPipeline.from_pretrained(
    "stabilityai/stable-diffusion-xl-base-1.0

文章来源于互联网:diffusers加速文生图速度;stable-diffusion、PixArt-α模型

相关推荐: 基于LLaMA-Factory用deepspeed多GPU训练大模型报错Caught signal 7 (Bus error: nonexistent physical address)

基于LLaMA-Factory,用4个V100的GPU,如下命令训练ChatGLM3: deepspeed –num_gpus 4 –master_port=9901 src/train_bash.py –deepspeed ds_config.json…

赞(0)
未经允许不得转载:5bei.cn大模型教程网 » diffusers加速文生图速度;stable-diffusion、PixArt-α模型
分享到: 更多 (0)

AI大模型,我们的未来

小欢软考联系我们