Skip to content

Commit bff64a4

Browse files
Parth38sayakpaul
andauthored
Update value_guided_sampling.py (huggingface#6027)
* Update value_guided_sampling.py Changed the scheduler step function as predict_epsilon parameter is not there in latest DDPM Scheduler * Update value_guided_sampling.md Updated a link to a working notebook --------- Co-authored-by: Sayak Paul <[email protected]>
1 parent 0bc95f3 commit bff64a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

experimental/rl/value_guided_sampling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def run_diffusion(self, x, conditions, n_guide_steps, scale):
113113
prev_x = self.unet(x.permute(0, 2, 1), timesteps).sample.permute(0, 2, 1)
114114

115115
# TODO: verify deprecation of this kwarg
116-
x = self.scheduler.step(prev_x, i, x, predict_epsilon=False)["prev_sample"]
116+
x = self.scheduler.step(prev_x, i, x)["prev_sample"]
117117

118118
# apply conditions to the trajectory (set the initial state)
119119
x = self.reset_x0(x, conditions, self.action_dim)

0 commit comments

Comments
 (0)