Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
4b15eb4
add warning and add back copy from for img2img
May 25, 2023
7cd26ef
style
May 25, 2023
d58276c
fix copies
May 25, 2023
4c75754
add import warning
May 25, 2023
db25d47
update
May 25, 2023
f779977
handle image as latents
May 26, 2023
c9ef024
add a test for latents input
May 26, 2023
bc66a2a
add
May 26, 2023
bf0331d
copies
May 26, 2023
5c597c5
Merge remote-tracking branch 'origin/main' into vae-preprocessor
May 26, 2023
91423d7
add
May 26, 2023
19747b7
add
May 26, 2023
96a2a05
refactor img2img test
May 27, 2023
f7be498
refactor cycle diffusion
May 27, 2023
df73ada
refactor depth pipeline preprocess + handle np input for prepare_dept…
May 28, 2023
eb23e59
refactor latent tester
May 28, 2023
1655b1b
pix2pix0
May 29, 2023
076afc8
add a pt_np_pil input tests to pix2pix zero
May 30, 2023
706a53e
refactor postprocess for pix2pix0 invert method
May 30, 2023
d63c444
remove the unused image parameter from pix2pix0 call method
May 30, 2023
cc7fffc
add test for postprocess for pix2pix0 invert
May 30, 2023
007deda
alt
May 30, 2023
188de72
style
May 30, 2023
eae044f
fix-copies
May 30, 2023
0f01f9c
instruction pix2pix
May 30, 2023
3a95cc6
fix
May 30, 2023
d410a1b
add
May 30, 2023
70904ac
refactor image_processor, add convert_to_rgb
May 30, 2023
48896b3
refactor latent input tests
May 30, 2023
a412fac
remove _accept_image_latents variable
May 30, 2023
6c44410
add height weight optional arguments to image_processor.preprocess
May 31, 2023
1ad9c35
refactor controlnet img2img
May 31, 2023
7bfeee8
style
May 31, 2023
0d10b3b
fix
May 31, 2023
e0b6d96
refactor controlnet
May 31, 2023
b1353fb
refactor controlnet inpaint (only control_image)
May 31, 2023
4a35707
copy
May 31, 2023
53fb437
style
May 31, 2023
958b527
remove _default_height_width
May 31, 2023
02688a5
fix
May 31, 2023
7394a66
Update src/diffusers/pipelines/controlnet/pipeline_controlnet.py
yiyixuxu May 31, 2023
5a7cae0
pass width and height to controlnet pipelines
May 31, 2023
13671d3
style
May 31, 2023
b0f9e4c
Update src/diffusers/image_processor.py
yiyixuxu May 31, 2023
a24e41e
Update src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py
yiyixuxu May 31, 2023
90110ec
Update src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py
yiyixuxu May 31, 2023
1c3457e
Update src/diffusers/pipelines/controlnet/pipeline_controlnet.py
yiyixuxu May 31, 2023
76bc363
add doc string, images -> image
May 31, 2023
f8a0705
add types and doc strings for image input arguments that's refactored
May 31, 2023
7af8a1f
alt copy
May 31, 2023
0ca3473
refacotor 4x upscale
Jun 1, 2023
c822a27
refactor latent_upscaler
Jun 1, 2023
ee38476
Apply suggestions from code review
yiyixuxu Jun 1, 2023
2f13a14
add typing
Jun 1, 2023
b02ca59
Revert "refacotor 4x upscale"
Jun 2, 2023
9a5dd1a
Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffu…
yiyixuxu Jun 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@

# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_img2img.preprocess
def preprocess(image):
warnings.warn(
"The preprocess method is deprecated and will be removed in a future version. Please"
" use VaeImageProcessor.preprocess instead",
FutureWarning,
)
if isinstance(image, torch.Tensor):
return image
elif isinstance(image, PIL.Image.Image):
Expand Down
6 changes: 6 additions & 0 deletions src/diffusers/pipelines/repaint/pipeline_repaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.


import warnings
from typing import List, Optional, Tuple, Union

import numpy as np
Expand All @@ -30,6 +31,11 @@

# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_img2img.preprocess
def _preprocess_image(image: Union[List, PIL.Image.Image, torch.Tensor]):
warnings.warn(
"The preprocess method is deprecated and will be removed in a future version. Please"
" use VaeImageProcessor.preprocess instead",
FutureWarning,
)
if isinstance(image, torch.Tensor):
return image
elif isinstance(image, PIL.Image.Image):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@

# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_img2img.preprocess
def preprocess(image):
warnings.warn(
"The preprocess method is deprecated and will be removed in a future version. Please"
" use VaeImageProcessor.preprocess instead",
FutureWarning,
)
if isinstance(image, torch.Tensor):
return image
elif isinstance(image, PIL.Image.Image):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import inspect
import warnings
from typing import Callable, List, Optional, Union

import numpy as np
Expand All @@ -33,6 +34,13 @@

# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_img2img.preprocess with 8->64
def preprocess(image):
warnings.warn(
(
"The preprocess method is deprecated and will be removed in a future version. Please"
" use VaeImageProcessor.preprocess instead"
),
FutureWarning,
)
if isinstance(image, torch.Tensor):
return image
elif isinstance(image, PIL.Image.Image):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@

# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_img2img.preprocess
def preprocess(image):
warnings.warn(
"The preprocess method is deprecated and will be removed in a future version. Please"
" use VaeImageProcessor.preprocess instead",
FutureWarning,
)
if isinstance(image, torch.Tensor):
return image
elif isinstance(image, PIL.Image.Image):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ def kl_divergence(hidden_states):

# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_img2img.preprocess
def preprocess(image):
warnings.warn(
"The preprocess method is deprecated and will be removed in a future version. Please"
" use VaeImageProcessor.preprocess instead",
FutureWarning,
)
if isinstance(image, torch.Tensor):
return image
elif isinstance(image, PIL.Image.Image):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@


def preprocess(image):
warnings.warn(
"The preprocess method is deprecated and will be removed in a future version. Please"
" use VaeImageProcessor.preprocess instead",
FutureWarning,
)
if isinstance(image, torch.Tensor):
return image
elif isinstance(image, PIL.Image.Image):
Expand Down Expand Up @@ -441,6 +446,7 @@ def _encode_prompt(

return prompt_embeds

# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline.run_safety_checker
def run_safety_checker(self, image, device, dtype):
if self.safety_checker is None:
has_nsfw_concept = None
Expand All @@ -455,6 +461,7 @@ def run_safety_checker(self, image, device, dtype):
)
return image, has_nsfw_concept

# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline.decode_latents
def decode_latents(self, latents):
warnings.warn(
"The decode_latents method is deprecated and will be removed in a future version. Please"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@

# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_img2img.preprocess
def preprocess(image):
warnings.warn(
"The preprocess method is deprecated and will be removed in a future version. Please"
" use VaeImageProcessor.preprocess instead",
FutureWarning,
)
if isinstance(image, torch.Tensor):
return image
elif isinstance(image, PIL.Image.Image):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ class Pix2PixInversionPipelineOutput(BaseOutput, TextualInversionLoaderMixin):

# Copied from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_img2img.preprocess
def preprocess(image):
warnings.warn(
"The preprocess method is deprecated and will be removed in a future version. Please"
" use VaeImageProcessor.preprocess instead",
FutureWarning,
)
if isinstance(image, torch.Tensor):
return image
elif isinstance(image, PIL.Image.Image):
Expand Down