Model Card for Diffusion Models Class 🧨
这个模型用于生成蝴蝶图像的无条件图像生成扩散模型
Usage 1:
from diffusers import DDPMPipeline
pipeline = DDPMPipeline.from_pretrained('Kevin3111/sd-class-butterflies-64')
image = pipeline(num_inference_steps=50).images[0]
image
###################################################################################
如上,直接加载的话会报错(具体原因不清楚,毕竟我也刚开始学习,好多都不懂):
OSError: Error no file named diffusion_pytorch_model.bin found in directory /root/.cache/huggingface/hub/models/...
可以先下载到本地,然后加载本地路径,这种方式正常(虽然Usage 1也是先下载到本地.cache文件里,再加载)
huggingface-cli download --resume-download --local-dir-use-symlinks False Kevin3111/sd-class-butterflies-64 --local-dir /{your_local_path}/Kevin3111/sd-class-butterflies-64
Usage 2:
from diffusers import DDPMPipeline
model_path = "/{your_local_path}/Kevin3111/sd-class-butterflies-64"
pipeline = DDPMPipeline.from_pretrained(model_path)
image = pipeline(num_inference_steps=50).images[0]
image
- Downloads last month
- 0