Skip to content

Commit 8d313bc

Browse files
committed
Remove commented-out image preparation code in AnyTextPipeline
1 parent f4abaf2 commit 8d313bc

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

examples/research_projects/anytext/anytext.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2184,18 +2184,6 @@ def __call__(
21842184

21852185
# 4. Prepare image
21862186
if isinstance(controlnet, ControlNetModel):
2187-
# image = self.prepare_image(
2188-
# image=image,
2189-
# width=width,
2190-
# height=height,
2191-
# batch_size=batch_size * num_images_per_prompt,
2192-
# num_images_per_prompt=num_images_per_prompt,
2193-
# device=device,
2194-
# dtype=controlnet.dtype,
2195-
# do_classifier_free_guidance=self.do_classifier_free_guidance,
2196-
# guess_mode=guess_mode,
2197-
# )
2198-
# height, width = image.shape[-2:]
21992187
guided_hint = self.auxiliary_latent_module(
22002188
text_info=text_info,
22012189
mode=mode,
@@ -2205,31 +2193,6 @@ def __call__(
22052193
np_hint=np_hint,
22062194
)
22072195
height, width = 512, 512
2208-
# elif isinstance(controlnet, MultiControlNetModel):
2209-
# images = []
2210-
2211-
# # Nested lists as ControlNet condition
2212-
# if isinstance(image[0], list):
2213-
# # Transpose the nested image list
2214-
# image = [list(t) for t in zip(*image)]
2215-
2216-
# for image_ in image:
2217-
# image_ = self.prepare_image(
2218-
# image=image_,
2219-
# width=width,
2220-
# height=height,
2221-
# batch_size=batch_size * num_images_per_prompt,
2222-
# num_images_per_prompt=num_images_per_prompt,
2223-
# device=device,
2224-
# dtype=controlnet.dtype,
2225-
# do_classifier_free_guidance=self.do_classifier_free_guidance,
2226-
# guess_mode=guess_mode,
2227-
# )
2228-
2229-
# images.append(image_)
2230-
2231-
# image = images
2232-
# height, width = image[0].shape[-2:]
22332196
else:
22342197
assert False
22352198

0 commit comments

Comments
 (0)