text stringlengths 0 5.54k |
|---|
__call__ |
< |
source |
> |
( |
class_labels: typing.List[int] |
guidance_scale: float = 4.0 |
generator: typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None |
num_inference_steps: int = 50 |
output_type: typing.Optional[str] = 'pil' |
return_dict: bool = True |
) |
Parameters |
class_labels (List[int]) — |
List of imagenet class labels for the images to be generated. |
guidance_scale (float, optional, defaults to 4.0) — |
Scale of the guidance signal. |
generator (torch.Generator, optional) — |
A torch generator to make generation |
deterministic. |
num_inference_steps (int, optional, defaults to 250) — |
The number of denoising steps. More denoising steps usually lead to a higher quality image at the |
expense of slower inference. |
output_type (str, optional, defaults to "pil") — |
The output format of the generate image. Choose between |
PIL: PIL.Image.Image or np.array. |
return_dict (bool, optional, defaults to True) — |
Whether or not to return a ImagePipelineOutput instead of a plain tuple. |
Function invoked when calling the pipeline for generation. |
get_label_ids |
< |
source |
> |
( |
label: typing.Union[str, typing.List[str]] |
) |
→ |
list of int |
Parameters |
label (str or dict of str) — label strings to be mapped to class ids. |
Returns |
list of int |
Class ids to be processed by pipeline. |
Map label strings, e.g. from ImageNet, to corresponding class ids. |
DEISMultistepScheduler Diffusion Exponential Integrator Sampler (DEIS) is proposed in Fast Sampling of Diffusion Models with Exponential Integrator by Qinsheng Zhang and Yongxin Chen. DEISMultistepScheduler is a fast high order solver for diffusion ordinary differential equations (ODEs). This implementation modifies th... |
diffusion models, you can set thresholding=True to use the dynamic thresholding. DEISMultistepScheduler class diffusers.DEISMultistepScheduler < source > ( num_train_timesteps: int = 1000 beta_start: float = 0.0001 beta_end: float = 0.02 beta_schedule: str = 'linear' trained_betas: Optional = None solver_order: int ... |
The number of diffusion steps to train the model. beta_start (float, defaults to 0.0001) — |
The starting beta value of inference. beta_end (float, defaults to 0.02) — |
The final beta value. beta_schedule (str, defaults to "linear") — |
The beta schedule, a mapping from a beta range to a sequence of betas for stepping the model. Choose from |
linear, scaled_linear, or squaredcos_cap_v2. trained_betas (np.ndarray, optional) — |
Pass an array of betas directly to the constructor to bypass beta_start and beta_end. solver_order (int, defaults to 2) — |
The DEIS order which can be 1 or 2 or 3. It is recommended to use solver_order=2 for guided |
sampling, and solver_order=3 for unconditional sampling. prediction_type (str, defaults to epsilon) — |
Prediction type of the scheduler function; can be epsilon (predicts the noise of the diffusion process), |
sample (directly predicts the noisy sample) or v_prediction` (see section 2.4 of Imagen |
Video paper). thresholding (bool, defaults to False) — |
Whether to use the “dynamic thresholding” method. This is unsuitable for latent-space diffusion models such |
as Stable Diffusion. dynamic_thresholding_ratio (float, defaults to 0.995) — |
The ratio for the dynamic thresholding method. Valid only when thresholding=True. sample_max_value (float, defaults to 1.0) — |
The threshold value for dynamic thresholding. Valid only when thresholding=True. algorithm_type (str, defaults to deis) — |
The algorithm type for the solver. lower_order_final (bool, defaults to True) — |
Whether to use lower-order solvers in the final steps. Only valid for < 15 inference steps. use_karras_sigmas (bool, optional, defaults to False) — |
Whether to use Karras sigmas for step sizes in the noise schedule during the sampling process. If True, |
the sigmas are determined according to a sequence of noise levels {σi}. timestep_spacing (str, defaults to "linspace") — |
The way the timesteps should be scaled. Refer to Table 2 of the Common Diffusion Noise Schedules and |
Sample Steps are Flawed for more information. steps_offset (int, defaults to 0) — |
An offset added to the inference steps. You can use a combination of offset=1 and |
set_alpha_to_one=False to make the last step use step 0 for the previous alpha product like in Stable |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.