IPNDMScheduler¶
IPNDMScheduler
is a fourth-order Improved Pseudo Linear Multistep scheduler. The original implementation can be found at crowsonkb/v-diffusion-pytorch.
mindone.diffusers.IPNDMScheduler
¶
Bases: SchedulerMixin
, ConfigMixin
A fourth-order Improved Pseudo Linear Multistep scheduler.
This model inherits from [SchedulerMixin
] and [ConfigMixin
]. Check the superclass documentation for the generic
methods the library implements for all schedulers such as loading and saving.
PARAMETER | DESCRIPTION |
---|---|
num_train_timesteps |
The number of diffusion steps to train the model.
TYPE:
|
trained_betas |
Pass an array of betas directly to the constructor to bypass
TYPE:
|
Source code in mindone/diffusers/schedulers/scheduling_ipndm.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
|
mindone.diffusers.IPNDMScheduler.begin_index
property
¶
The index for the first timestep. It should be set from pipeline with set_begin_index
method.
mindone.diffusers.IPNDMScheduler.step_index
property
¶
The index counter for current timestep. It will increase 1 after each scheduler step.
mindone.diffusers.IPNDMScheduler.scale_model_input(sample, *args, **kwargs)
¶
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep.
PARAMETER | DESCRIPTION |
---|---|
sample |
The input sample.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Tensor
|
|
Source code in mindone/diffusers/schedulers/scheduling_ipndm.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
|
mindone.diffusers.IPNDMScheduler.set_begin_index(begin_index=0)
¶
Sets the begin index for the scheduler. This function should be run from pipeline before the inference.
PARAMETER | DESCRIPTION |
---|---|
begin_index |
The begin index for the scheduler.
TYPE:
|
Source code in mindone/diffusers/schedulers/scheduling_ipndm.py
76 77 78 79 80 81 82 83 84 |
|
mindone.diffusers.IPNDMScheduler.set_timesteps(num_inference_steps)
¶
Sets the discrete timesteps used for the diffusion chain (to be run before inference).
PARAMETER | DESCRIPTION |
---|---|
num_inference_steps |
The number of diffusion steps used when generating samples with a pre-trained model.
TYPE:
|
Source code in mindone/diffusers/schedulers/scheduling_ipndm.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
mindone.diffusers.IPNDMScheduler.step(model_output, timestep, sample, return_dict=False)
¶
Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with the linear multistep method. It performs one forward pass multiple times to approximate the solution.
PARAMETER | DESCRIPTION |
---|---|
model_output |
The direct output from learned diffusion model.
TYPE:
|
timestep |
The current discrete timestep in the diffusion chain.
TYPE:
|
sample |
A current instance of a sample created by the diffusion process.
TYPE:
|
return_dict |
Whether or not to return a [
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Union[SchedulerOutput, Tuple]
|
[ |
Source code in mindone/diffusers/schedulers/scheduling_ipndm.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
|