21
21
22
22
from ...models import AutoencoderKL , PriorTransformer , UNet2DConditionModel
23
23
from ...models .embeddings import get_timestep_embedding
24
- from ...schedulers import DDIMScheduler , DDPMScheduler
24
+ from ...schedulers import KarrasDiffusionSchedulers
25
25
from ...utils import is_accelerate_available , logging , randn_tensor , replace_example_docstring
26
26
from ..pipeline_utils import DiffusionPipeline , ImagePipelineOutput
27
27
from .stable_unclip_image_normalizer import StableUnCLIPImageNormalizer
@@ -62,12 +62,12 @@ class StableUnCLIPPipeline(DiffusionPipeline):
62
62
Frozen text-encoder.
63
63
prior ([`PriorTransformer`]):
64
64
The canonincal unCLIP prior to approximate the image embedding from the text embedding.
65
- prior_scheduler ([`DDPMScheduler `]):
65
+ prior_scheduler ([`KarrasDiffusionSchedulers `]):
66
66
Scheduler used in the prior denoising process.
67
67
image_normalizer ([`StableUnCLIPImageNormalizer`]):
68
68
Used to normalize the predicted image embeddings before the noise is applied and un-normalize the image
69
69
embeddings after the noise has been applied.
70
- image_noising_scheduler ([`DDPMScheduler `]):
70
+ image_noising_scheduler ([`KarrasDiffusionSchedulers `]):
71
71
Noise schedule for adding noise to the predicted image embeddings. The amount of noise to add is determined
72
72
by `noise_level` in `StableUnCLIPPipeline.__call__`.
73
73
tokenizer (`CLIPTokenizer`):
@@ -76,7 +76,7 @@ class StableUnCLIPPipeline(DiffusionPipeline):
76
76
text_encoder ([`CLIPTextModel`]):
77
77
Frozen text-encoder.
78
78
unet ([`UNet2DConditionModel`]): Conditional U-Net architecture to denoise the encoded image latents.
79
- scheduler ([`DDIMScheduler `]):
79
+ scheduler ([`KarrasDiffusionSchedulers `]):
80
80
A scheduler to be used in combination with `unet` to denoise the encoded image latents.
81
81
vae ([`AutoencoderKL`]):
82
82
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.
@@ -86,17 +86,17 @@ class StableUnCLIPPipeline(DiffusionPipeline):
86
86
prior_tokenizer : CLIPTokenizer
87
87
prior_text_encoder : CLIPTextModelWithProjection
88
88
prior : PriorTransformer
89
- prior_scheduler : DDPMScheduler
89
+ prior_scheduler : KarrasDiffusionSchedulers
90
90
91
91
# image noising components
92
92
image_normalizer : StableUnCLIPImageNormalizer
93
- image_noising_scheduler : DDPMScheduler
93
+ image_noising_scheduler : KarrasDiffusionSchedulers
94
94
95
95
# regular denoising components
96
96
tokenizer : CLIPTokenizer
97
97
text_encoder : CLIPTextModel
98
98
unet : UNet2DConditionModel
99
- scheduler : DDIMScheduler
99
+ scheduler : KarrasDiffusionSchedulers
100
100
101
101
vae : AutoencoderKL
102
102
@@ -106,15 +106,15 @@ def __init__(
106
106
prior_tokenizer : CLIPTokenizer ,
107
107
prior_text_encoder : CLIPTextModelWithProjection ,
108
108
prior : PriorTransformer ,
109
- prior_scheduler : DDPMScheduler ,
109
+ prior_scheduler : KarrasDiffusionSchedulers ,
110
110
# image noising components
111
111
image_normalizer : StableUnCLIPImageNormalizer ,
112
- image_noising_scheduler : DDPMScheduler ,
112
+ image_noising_scheduler : KarrasDiffusionSchedulers ,
113
113
# regular denoising components
114
114
tokenizer : CLIPTokenizer ,
115
115
text_encoder : CLIPTextModelWithProjection ,
116
116
unet : UNet2DConditionModel ,
117
- scheduler : DDIMScheduler ,
117
+ scheduler : KarrasDiffusionSchedulers ,
118
118
# vae
119
119
vae : AutoencoderKL ,
120
120
):
0 commit comments