目录
依赖库:
tensorrt安装:
pip install nvidia-pyindex # 添加NVIDIA仓库索引
pip install tensorrt
文生图推理代码cpu:
import torch
from diffusers import FluxPipeline
model_id = "black-forest-labs/FLUX.1-schnell" #you can also use `black-forest-labs/FLUX.1-dev`
pipe = FluxPipeline.from_pretrained("/shared_disk/models/huggingface/models--black-