Unverified Commit 3d335f83 authored by Suraj Patil's avatar Suraj Patil Committed by GitHub
Browse files

Update README.md

parent 57a70b80
...@@ -195,11 +195,11 @@ model = UNetModel.from_pretrained(model_id) ...@@ -195,11 +195,11 @@ model = UNetModel.from_pretrained(model_id)
scheduler = PNDMScheduler() scheduler = PNDMScheduler()
# load model and scheduler # load model and scheduler
ddpm = PNDM(unet=model, noise_scheduler=scheduler) pndm = PNDM(unet=model, noise_scheduler=scheduler)
# run pipeline in inference (sample random noise and denoise) # run pipeline in inference (sample random noise and denoise)
with torch.no_grad(): with torch.no_grad():
image = ddpm() image = pndm()
# process image to PIL # process image to PIL
image_processed = image.cpu().permute(0, 2, 3, 1) image_processed = image.cpu().permute(0, 2, 3, 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment