DiGress icon indicating copy to clipboard operation
DiGress copied to clipboard

Get the prev sample like in diffusers API

Open Abc11c opened this issue 10 months ago • 0 comments

Hi @cvignac ,

I'm unclear about the sampling part in the code base.

Like the add_noise step here

I'm wondering if there is a prev_sample while performing reverse process?

for k in self.noise_scheduler.timesteps:
            # predict noise
            # inverse diffusion step (remove noise)
            noise_pred = ema_nets['noise_pred_net'](
                sample=naction,
                timestep=k,
                global_cond=obs_cond
            )

            # inverse diffusion step (remove noise)
            naction = self.noise_scheduler.step(
                model_output=noise_pred,
                timestep=k,
                sample=naction
            ).prev_sample

Any pointers are helpful

Thanks!

Abc11c avatar Mar 30 '24 09:03 Abc11c