Skip to content

Commit 99b0f92

Browse files
committed
fix typing in kandinsky
1 parent dba12b6 commit 99b0f92

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import torch
1818

1919
from ...models import UNet2DConditionModel, VQModel
20-
from ...schedulers import DDPMScheduler
20+
from ...schedulers import DDPMScheduler, UnCLIPScheduler
2121
from ...utils import deprecate, logging, replace_example_docstring
2222
from ...utils.torch_utils import randn_tensor
2323
from ..pipeline_utils import DiffusionPipeline, ImagePipelineOutput
@@ -83,7 +83,7 @@ class KandinskyV22Pipeline(DiffusionPipeline):
8383
def __init__(
8484
self,
8585
unet: UNet2DConditionModel,
86-
scheduler: DDPMScheduler,
86+
scheduler: Union[DDPMScheduler, UnCLIPScheduler],
8787
movq: VQModel,
8888
):
8989
super().__init__()

src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ class KandinskyV22CombinedPipeline(DiffusionPipeline):
140140
def __init__(
141141
self,
142142
unet: UNet2DConditionModel,
143-
scheduler: DDPMScheduler,
143+
scheduler: Union[DDPMScheduler, UnCLIPScheduler],
144144
movq: VQModel,
145145
prior_prior: PriorTransformer,
146146
prior_image_encoder: CLIPVisionModelWithProjection,
147147
prior_text_encoder: CLIPTextModelWithProjection,
148148
prior_tokenizer: CLIPTokenizer,
149-
prior_scheduler: UnCLIPScheduler,
149+
prior_scheduler: Union[DDPMScheduler, UnCLIPScheduler],
150150
prior_image_processor: CLIPImageProcessor,
151151
):
152152
super().__init__()

src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from transformers import CLIPImageProcessor, CLIPTextModelWithProjection, CLIPTokenizer, CLIPVisionModelWithProjection
66

77
from ...models import PriorTransformer
8-
from ...schedulers import UnCLIPScheduler
8+
from ...schedulers import DDPMScheduler, UnCLIPScheduler
99
from ...utils import (
1010
logging,
1111
replace_example_docstring,
@@ -114,7 +114,7 @@ def __init__(
114114
image_encoder: CLIPVisionModelWithProjection,
115115
text_encoder: CLIPTextModelWithProjection,
116116
tokenizer: CLIPTokenizer,
117-
scheduler: UnCLIPScheduler,
117+
scheduler: Union[DDPMScheduler, UnCLIPScheduler],
118118
image_processor: CLIPImageProcessor,
119119
):
120120
super().__init__()

0 commit comments

Comments
 (0)