Skip to content

Commit 974eb83

Browse files
committed
convert
1 parent 6a02662 commit 974eb83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/text_to_image/pipeline_stable_diffusion_img2img_render_text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def preprocess(image):
3939
image = [i.convert("RGB") for i in image]
4040
image = [np.array(i.resize((w, h), resample=PIL_INTERPOLATION["lanczos"]))[None, :] for i in image]
4141
image = np.concatenate(image, axis=0)
42-
image = np.array(image).astype(np.float32) / 255.0
42+
#image = np.array(image).astype(np.float32) / 255.0
4343
image = image.transpose(0, 3, 1, 2)
44-
image = 2.0 * image - 1.0
44+
#image = 2.0 * image - 1.0
4545
image = torch.from_numpy(image)
4646
elif isinstance(image[0], torch.Tensor):
4747
image = torch.cat(image, dim=0)

0 commit comments

Comments
 (0)