Skip to content

Commit 5470a4f

Browse files
authored
[docs] Other modalities (huggingface#4205)
remove coming soon, rl pipeline
1 parent e98fabc commit 5470a4f

File tree

6 files changed

+43
-71
lines changed

6 files changed

+43
-71
lines changed

docs/source/en/_toctree.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@
8888
title: Custom Diffusion
8989
title: Training
9090
- sections:
91-
- local: using-diffusers/rl
92-
title: Reinforcement Learning
93-
- local: using-diffusers/audio
94-
title: Audio
9591
- local: using-diffusers/other-modalities
9692
title: Other Modalities
9793
title: Taking Diffusers Beyond Images
@@ -276,6 +272,8 @@
276272
title: Unconditional Latent Diffusion
277273
- local: api/pipelines/unidiffuser
278274
title: UniDiffuser
275+
- local: api/pipelines/value_guided_sampling
276+
title: Value-guided sampling
279277
- local: api/pipelines/versatile_diffusion
280278
title: Versatile Diffusion
281279
- local: api/pipelines/vq_diffusion
@@ -331,8 +329,4 @@
331329
- local: api/schedulers/vq_diffusion
332330
title: VQDiffusionScheduler
333331
title: Schedulers
334-
- sections:
335-
- local: api/experimental/rl
336-
title: RL Planning
337-
title: Experimental Features
338332
title: API

docs/source/en/api/experimental/rl.mdx

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
4+
the License. You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
9+
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
10+
specific language governing permissions and limitations under the License.
11+
-->
12+
13+
# Value-guided planning
14+
15+
<Tip warning={true}>
16+
17+
🧪 This is an experimental pipeline for reinforcement learning!
18+
19+
</Tip>
20+
21+
This pipeline is based on the [Planning with Diffusion for Flexible Behavior Synthesis](https://huggingface.co/papers/2205.09991) paper by Michael Janner, Yilun Du, Joshua B. Tenenbaum, Sergey Levine.
22+
23+
The abstract from the paper is:
24+
25+
*Model-based reinforcement learning methods often use learning only for the purpose of estimating an approximate dynamics model, offloading the rest of the decision-making work to classical trajectory optimizers. While conceptually simple, this combination has a number of empirical shortcomings, suggesting that learned models may not be well-suited to standard trajectory optimization. In this paper, we consider what it would look like to fold as much of the trajectory optimization pipeline as possible into the modeling problem, such that sampling from the model and planning with it become nearly identical. The core of our technical approach lies in a diffusion probabilistic model that plans by iteratively denoising trajectories. We show how classifier-guided sampling and image inpainting can be reinterpreted as coherent planning strategies, explore the unusual and useful properties of diffusion-based planning methods, and demonstrate the effectiveness of our framework in control settings that emphasize long-horizon decision-making and test-time flexibility*.
26+
27+
You can find additional information about the model on the [project page](https://diffusion-planning.github.io/), the [original codebase](https://github.com/jannerm/diffuser), or try it out in a demo [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/reinforcement_learning_with_diffusers.ipynb).
28+
29+
The script to run the model is available [here](https://github.com/huggingface/diffusers/tree/main/examples/reinforcement_learning).
30+
31+
## ValueGuidedRLPipeline
32+
[[autodoc]] diffusers.experimental.ValueGuidedRLPipeline

docs/source/en/using-diffusers/audio.mdx

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/source/en/using-diffusers/rl.mdx

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/diffusers/experimental/rl/value_guided_sampling.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,21 @@
2424

2525
class ValueGuidedRLPipeline(DiffusionPipeline):
2626
r"""
27-
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods the
28-
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)
29-
Pipeline for sampling actions from a diffusion model trained to predict sequences of states.
27+
Pipeline for value-guided sampling from a diffusion model trained to predict sequences of states.
3028
31-
Original implementation inspired by this repository: https://github.com/jannerm/diffuser.
29+
This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
30+
implemented for all pipelines (downloading, saving, running on a particular device, etc.).
3231
3332
Parameters:
34-
value_function ([`UNet1DModel`]): A specialized UNet for fine-tuning trajectories base on reward.
35-
unet ([`UNet1DModel`]): U-Net architecture to denoise the encoded trajectories.
33+
value_function ([`UNet1DModel`]):
34+
A specialized UNet for fine-tuning trajectories base on reward.
35+
unet ([`UNet1DModel`]):
36+
UNet architecture to denoise the encoded trajectories.
3637
scheduler ([`SchedulerMixin`]):
3738
A scheduler to be used in combination with `unet` to denoise the encoded trajectories. Default for this
3839
application is [`DDPMScheduler`].
39-
env: An environment following the OpenAI gym API to act in. For now only Hopper has pretrained models.
40+
env ():
41+
An environment following the OpenAI gym API to act in. For now only Hopper has pretrained models.
4042
"""
4143

4244
def __init__(

0 commit comments

Comments
 (0)