Downloads · 30 days
3
1% of all-time downloads
alkzar90/ddpo-compressibility-church-256
ddpo-compressibility-church-256 is a unconditional image generation model from alkzar90. Use it for the unconditional image generation task on the model card, and read the license before you ship it in a product. It is set up for diffusers. The card lists the license as apache-2.0.
Downloads · 30 days
3
1% of all-time downloads
All-time downloads
273
Public
Repo size
457 MB
Likes
0
Public
Click a slice to open those files.
.bin455 MB · 100%
From the Hugging Face model README
ddpm-church-256 model with DDPO for JPEG compressibility enhancementDDPO Paper: Training Diffusion Models with Reinforcement Learning
Authors: Kevin Black, Michael Janner, Yilun Du, Ilya Kostrikov, Sergey Levine
Abstract:
Diffusion models are a class of flexible generative models trained with an approximation to the log-likelihood objective. However, most use cases of diffusion models are not concerned with likelihoods, but instead with downstream objectives such as human-perceived image quality or drug effectiveness. In this paper, we investigate reinforcement learning methods for directly optimizing diffusion models for such objectives. We describe how posing denoising as a multi-step decision-making problem enables a class of policy gradient algorithms, which we refer to as denoising diffusion policy optimization (DDPO), that are more effective than alternative reward-weighted likelihood approaches. Empirically, DDPO is able to adapt text-to-image diffusion models to objectives that are difficult to express via prompting, such as image compressibility, and those derived from human feedback, such as aesthetic quality. Finally, we show that DDPO can improve prompt-image alignment using feedback from a vision-language model without the need for additional data collection or human annotation. The project's website can be found at this http URL.
DDPM based models can use discrete noise schedulers such as:
for inference. Note that while the ddpm scheduler yields the highest quality, it also takes the longest. For a good trade-off between quality and inference speed you might want to consider the ddim or pndm schedulers instead.
See the following code:
# !pip install diffusers
from diffusers import DDPMPipeline, DDIMPipeline, PNDMPipeline
model_id = "alkzar90/ddpo-compressibility-church-256"
# load model and scheduler
ddpm = DDPMPipeline.from_pretrained(model_id) # you can replace DDPMPipeline with DDIMPipeline or PNDMPipeline for faster inference
# run pipeline in inference (sample random noise and denoise)
image = ddpm().images[0]
# save image
image.save("ddpo_compressibility_generated_image.png")
For more in-detail information, please have a look at the official inference example.
