Skip to content

Commit 29ad75d

Browse files
[Quality] Make style (#3341)
1 parent 379197a commit 29ad75d

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
"torch>=1.4",
112112
"torchvision",
113113
"transformers>=4.25.1",
114+
"urllib3<=2.0.0",
114115
]
115116

116117
# this is a lookup table with items like:
@@ -181,7 +182,7 @@ def run(self):
181182

182183

183184
extras = {}
184-
extras["quality"] = deps_list("black", "isort", "ruff", "hf-doc-builder")
185+
extras["quality"] = deps_list("urllib3", "black", "isort", "ruff", "hf-doc-builder")
185186
extras["docs"] = deps_list("hf-doc-builder")
186187
extras["training"] = deps_list("accelerate", "datasets", "protobuf", "tensorboard", "Jinja2")
187188
extras["test"] = deps_list(

src/diffusers/dependency_versions_table.py

+1
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
}

src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py

+1-1
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:

src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py

+1-1
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)