Skip to content

Commit e028b43

Browse files
[Quality] Make style (huggingface#3341)
1 parent d65b2b5 commit e028b43

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

dependency_versions_table.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@
3535
"torch": "torch>=1.4",
3636
"torchvision": "torchvision",
3737
"transformers": "transformers>=4.25.1",
38+
"urllib3": "urllib3<=2.0.0",
3839
}

pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ def preprocess_image(self, image: PIL.Image.Image, num_images_per_prompt, device
762762
image = [np.array(i).astype(np.float32) / 255.0 for i in image]
763763

764764
image = np.stack(image, axis=0) # to np
765-
torch.from_numpy(image.transpose(0, 3, 1, 2))
765+
image = torch.from_numpy(image.transpose(0, 3, 1, 2))
766766
elif isinstance(image[0], np.ndarray):
767767
image = np.stack(image, axis=0) # to np
768768
if image.ndim == 5:

pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ def preprocess_image(self, image: PIL.Image.Image, num_images_per_prompt, device
798798
image = [np.array(i).astype(np.float32) / 255.0 for i in image]
799799

800800
image = np.stack(image, axis=0) # to np
801-
torch.from_numpy(image.transpose(0, 3, 1, 2))
801+
image = torch.from_numpy(image.transpose(0, 3, 1, 2))
802802
elif isinstance(image[0], np.ndarray):
803803
image = np.stack(image, axis=0) # to np
804804
if image.ndim == 5:

0 commit comments

Comments
 (0)