"vscode:/vscode.git/clone" did not exist on "04d696d65053644775b104cb3af92aff8338e6fc"
Unverified Commit 29ad75dc authored by Patrick von Platen's avatar Patrick von Platen Committed by GitHub
Browse files

[Quality] Make style (#3341)

parent 379197a2
...@@ -111,6 +111,7 @@ _deps = [ ...@@ -111,6 +111,7 @@ _deps = [
"torch>=1.4", "torch>=1.4",
"torchvision", "torchvision",
"transformers>=4.25.1", "transformers>=4.25.1",
"urllib3<=2.0.0",
] ]
# this is a lookup table with items like: # this is a lookup table with items like:
...@@ -181,7 +182,7 @@ extras = {} ...@@ -181,7 +182,7 @@ extras = {}
extras = {} extras = {}
extras["quality"] = deps_list("black", "isort", "ruff", "hf-doc-builder") extras["quality"] = deps_list("urllib3", "black", "isort", "ruff", "hf-doc-builder")
extras["docs"] = deps_list("hf-doc-builder") extras["docs"] = deps_list("hf-doc-builder")
extras["training"] = deps_list("accelerate", "datasets", "protobuf", "tensorboard", "Jinja2") extras["training"] = deps_list("accelerate", "datasets", "protobuf", "tensorboard", "Jinja2")
extras["test"] = deps_list( extras["test"] = deps_list(
......
...@@ -35,4 +35,5 @@ deps = { ...@@ -35,4 +35,5 @@ deps = {
"torch": "torch>=1.4", "torch": "torch>=1.4",
"torchvision": "torchvision", "torchvision": "torchvision",
"transformers": "transformers>=4.25.1", "transformers": "transformers>=4.25.1",
"urllib3": "urllib3<=2.0.0",
} }
...@@ -762,7 +762,7 @@ class IFImg2ImgSuperResolutionPipeline(DiffusionPipeline): ...@@ -762,7 +762,7 @@ class IFImg2ImgSuperResolutionPipeline(DiffusionPipeline):
image = [np.array(i).astype(np.float32) / 255.0 for i in image] image = [np.array(i).astype(np.float32) / 255.0 for i in image]
image = np.stack(image, axis=0) # to np image = np.stack(image, axis=0) # to np
torch.from_numpy(image.transpose(0, 3, 1, 2)) image = torch.from_numpy(image.transpose(0, 3, 1, 2))
elif isinstance(image[0], np.ndarray): elif isinstance(image[0], np.ndarray):
image = np.stack(image, axis=0) # to np image = np.stack(image, axis=0) # to np
if image.ndim == 5: if image.ndim == 5:
......
...@@ -798,7 +798,7 @@ class IFInpaintingSuperResolutionPipeline(DiffusionPipeline): ...@@ -798,7 +798,7 @@ class IFInpaintingSuperResolutionPipeline(DiffusionPipeline):
image = [np.array(i).astype(np.float32) / 255.0 for i in image] image = [np.array(i).astype(np.float32) / 255.0 for i in image]
image = np.stack(image, axis=0) # to np image = np.stack(image, axis=0) # to np
torch.from_numpy(image.transpose(0, 3, 1, 2)) image = torch.from_numpy(image.transpose(0, 3, 1, 2))
elif isinstance(image[0], np.ndarray): elif isinstance(image[0], np.ndarray):
image = np.stack(image, axis=0) # to np image = np.stack(image, axis=0) # to np
if image.ndim == 5: if image.ndim == 5:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment