LysandreJik
commited on
Commit
•
e68ce70
1
Parent(s):
4c9b1e8
Update image_transformation.py
Browse files- image_transformation.py +1 -5
image_transformation.py
CHANGED
@@ -3,12 +3,10 @@ import torch
|
|
3 |
from transformers.tools.base import Tool, get_default_device
|
4 |
from transformers.utils import (
|
5 |
is_accelerate_available,
|
6 |
-
is_diffusers_available,
|
7 |
is_vision_available,
|
8 |
)
|
9 |
|
10 |
-
|
11 |
-
from diffusers import DiffusionPipeline
|
12 |
|
13 |
|
14 |
IMAGE_TRANSFORMATION_DESCRIPTION = (
|
@@ -27,8 +25,6 @@ class ImageTransformationTool(Tool):
|
|
27 |
def __init__(self, device=None, controlnet=None, stable_diffusion=None, **hub_kwargs) -> None:
|
28 |
if not is_accelerate_available():
|
29 |
raise ImportError("Accelerate should be installed in order to use tools.")
|
30 |
-
if not is_diffusers_available():
|
31 |
-
raise ImportError("Diffusers should be installed in order to use the StableDiffusionTool.")
|
32 |
if not is_vision_available():
|
33 |
raise ImportError("Pillow should be installed in order to use the StableDiffusionTool.")
|
34 |
|
|
|
3 |
from transformers.tools.base import Tool, get_default_device
|
4 |
from transformers.utils import (
|
5 |
is_accelerate_available,
|
|
|
6 |
is_vision_available,
|
7 |
)
|
8 |
|
9 |
+
from diffusers import DiffusionPipeline
|
|
|
10 |
|
11 |
|
12 |
IMAGE_TRANSFORMATION_DESCRIPTION = (
|
|
|
25 |
def __init__(self, device=None, controlnet=None, stable_diffusion=None, **hub_kwargs) -> None:
|
26 |
if not is_accelerate_available():
|
27 |
raise ImportError("Accelerate should be installed in order to use tools.")
|
|
|
|
|
28 |
if not is_vision_available():
|
29 |
raise ImportError("Pillow should be installed in order to use the StableDiffusionTool.")
|
30 |
|