Downloads · 30 days
2
13% of all-time downloads
ridzy619/pothole-unconditional-generation
pothole-unconditional-generation is a machine learning model from ridzy619. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for diffusers.
Downloads · 30 days
2
13% of all-time downloads
All-time downloads
16
Public
Parameters
186M
745 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors745 MB · 100%
From the Hugging Face model README
from diffusers import DDPMPipeline
import torch
from PIL import Image
pipe = DDPMPipeline.from_pretrained("ridzy619/pothole-unconditional-generation")
device = "cuda" if torch.cuda.is_available() else "cpu"
pipe.to(device)
images = pipe(batch_size=16).images
def make_grid(images, rows, cols):
w, h = images[0].size
grid = Image.new('RGB', size=(cols*w, rows*h))
for i, image in enumerate(images):
grid.paste(image, box=(i%cols*w, i//cols*h))
return grid
images_grid = make_grid(images, 4, 4)
images_grid