Skip to content

Commit a05cc4f

Browse files
author
yiyixuxu
committed
Revert "[WIP] Add img2img (#3426)"
This reverts commit 88efed5.
1 parent 88efed5 commit a05cc4f

File tree

7 files changed

+6
-751
lines changed

7 files changed

+6
-751
lines changed

src/diffusers/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@
129129
IFPipeline,
130130
IFSuperResolutionPipeline,
131131
KandinskyInpaintPipeline,
132-
KandinskyImg2ImgPipeline,
133132
KandinskyPipeline,
134133
KandinskyPriorPipeline,
135134
LDMTextToImagePipeline,

src/diffusers/pipelines/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
IFPipeline,
5353
IFSuperResolutionPipeline,
5454
)
55-
from .kandinsky import KandinskyInpaintPipeline, KandinskyPipeline, KandinskyPriorPipeline, KandinskyImg2ImgPipeline
55+
from .kandinsky import KandinskyInpaintPipeline, KandinskyPipeline, KandinskyPriorPipeline
5656
from .latent_diffusion import LDMTextToImagePipeline
5757
from .paint_by_example import PaintByExamplePipeline
5858
from .semantic_stable_diffusion import SemanticStableDiffusionPipeline

src/diffusers/pipelines/kandinsky/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
else:
1515
from .pipeline_kandinsky import KandinskyPipeline
1616
from .pipeline_kandinsky_inpaint import KandinskyInpaintPipeline
17-
from .pipeline_kandinsky_img2img import KandinskyImg2ImgPipeline
1817
from .pipeline_kandinsky_prior import KandinskyPriorPipeline
1918
from .text_encoder import MultilingualCLIP
2019
from .text_proj import KandinskyTextProjModel

src/diffusers/pipelines/kandinsky/pipeline_kandinsky.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from ...models import UNet2DConditionModel, VQModel
2323
from ...pipelines import DiffusionPipeline
2424
from ...pipelines.pipeline_utils import ImagePipelineOutput
25-
from ...schedulers import DDPMScheduler
25+
from ...schedulers import UnCLIPScheduler
2626
from ...utils import (
2727
is_accelerate_available,
2828
is_accelerate_version,
@@ -58,7 +58,7 @@ class KandinskyPipeline(DiffusionPipeline):
5858
Frozen text-encoder.
5959
tokenizer ([`XLMRobertaTokenizer`]):
6060
Tokenizer of class
61-
scheduler ([`DDPMScheduler`]):
61+
scheduler ([`UnCLIPScheduler`]):
6262
A scheduler to be used in combination with `unet` to generate image latents.
6363
unet ([`UNet2DConditionModel`]):
6464
Conditional U-Net architecture to denoise the image embedding.
@@ -74,7 +74,7 @@ def __init__(
7474
tokenizer: XLMRobertaTokenizer,
7575
text_proj: KandinskyTextProjModel,
7676
unet: UNet2DConditionModel,
77-
scheduler: DDPMScheduler,
77+
scheduler: UnCLIPScheduler,
7878
movq: VQModel,
7979
):
8080
super().__init__()
@@ -376,7 +376,9 @@ def __call__(
376376
noise_pred,
377377
t,
378378
latent_model_input,
379+
prev_timestep=prev_timestep,
379380
generator=generator,
381+
batch_size=batch_size,
380382
).prev_sample
381383

382384
_, latents = latents.chunk(2)

0 commit comments

Comments
 (0)