File size: 439 Bytes
98a459e
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from diffusers import DDPMPipeline
image_pipe = DDPMPipeline.from_pretrained("google/ddpm-celebahq-256")
image_pipe.to("cuda")
images = image_pipe().images
image_pipe
from diffusers import UNet2DModel
repo_id = "google/ddpm-church-256"
model = UNet2DModel.from_pretrained(repo_id)
model
model.config
model_random = UNet2DModel(**model.config)
model_random.save_pretrained("my_model")
model_random = UNet2DModel.from_pretrained("my_model")