参考:
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…
5bei.cn大模型教程网










