@@ -78,7 +78,7 @@ Both models and schedulers should be load- and saveable from the Hub.
...
@@ -78,7 +78,7 @@ Both models and schedulers should be load- and saveable from the Hub.
For more examples see [schedulers](https://github.com/huggingface/diffusers/tree/main/src/diffusers/schedulers) and [models](https://github.com/huggingface/diffusers/tree/main/src/diffusers/models)
For more examples see [schedulers](https://github.com/huggingface/diffusers/tree/main/src/diffusers/schedulers) and [models](https://github.com/huggingface/diffusers/tree/main/src/diffusers/models)
#### **Example for [DDPM](https://arxiv.org/abs/2006.11239):**
#### **Example for Unconditonal Image generation [DDPM](https://arxiv.org/abs/2006.11239):**
[Diffuser](https://diffusion-planning.github.io/) for planning in reinforcement learning (currenlty only inference): [](https://colab.research.google.com/drive/1TmBmlYeKUZSkUZoJqfBmaicVTKx6nN1R?usp=sharing)
### 2. `diffusers` as a collection of popular Diffusion systems (Glide, Dalle, ...)
For more examples see [pipelines](https://github.com/huggingface/diffusers/tree/main/src/diffusers/pipelines).
#### **Example image generation with PNDM**
```python
fromdiffusersimportPNDM,UNetModel,PNDMScheduler
importPIL.Image
importnumpyasnp
importtorch
model_id="fusing/ddim-celeba-hq"
model=UNetModel.from_pretrained(model_id)
scheduler=PNDMScheduler()
# load model and scheduler
pndm=PNDM(unet=model,noise_scheduler=scheduler)
# run pipeline in inference (sample random noise and denoise)