Skip to content

Commit 445f16f

Browse files
committed
preprocess -> _preprocess_adapter_image
1 parent 8a3e49f commit 445f16f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class StableDiffusionAdapterPipelineOutput(BaseOutput):
8888
"""
8989

9090

91-
def preprocess(image, height, width):
91+
def _preprocess_adapter_image(image, height, width):
9292
if isinstance(image, torch.Tensor):
9393
return image
9494
elif isinstance(image, PIL.Image.Image):
@@ -695,11 +695,11 @@ def __call__(
695695

696696
is_multi_adapter = isinstance(self.adapter, MultiAdapter)
697697
if is_multi_adapter:
698-
adapter_input = [preprocess(img, height, width).to(device) for img in image]
698+
adapter_input = [_preprocess_adapter_image(img, height, width).to(device) for img in image]
699699
n, c, h, w = adapter_input[0].shape
700700
adapter_input = torch.stack([x.reshape([n * c, h, w]) for x in adapter_input])
701701
else:
702-
adapter_input = preprocess(image, height, width).to(device)
702+
adapter_input = _preprocess_adapter_image(image, height, width).to(device)
703703
adapter_input = adapter_input.to(self.adapter.dtype)
704704

705705
# 2. Define call parameters

0 commit comments

Comments
 (0)