How to set target when noise_scheduler.config.prediction_type == "v_prediction"?

I’m writing code for training SVD, I wanna know how to how to set target when noise_scheduler.config.prediction_type == “v_prediction”?
we take the following code as an example, but EulerDiscreteScheduler does not have get_velocity()?

if noise_scheduler.config.prediction_type == "epsilon":
    target = noise

elif noise_scheduler.config.prediction_type == "v_prediction":
    target = noise_scheduler.get_velocity(latents, noise, timesteps)
1 Like