Remove deprecated function

#3
by lysandre HF staff - opened
Files changed (1) hide show
  1. image_transformation.py +1 -3
image_transformation.py CHANGED
@@ -1,12 +1,12 @@
1
  #!/usr/bin/env python3
2
  import numpy as np
3
  import torch
 
4
 
5
  from transformers.tools.base import Tool, get_default_device
6
  from transformers.utils import (
7
  is_accelerate_available,
8
  is_vision_available,
9
- is_opencv_available,
10
  )
11
  from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler
12
 
@@ -14,8 +14,6 @@ from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCM
14
  if is_vision_available():
15
  from PIL import Image
16
 
17
- if is_opencv_available():
18
- import cv2
19
 
20
 
21
  IMAGE_TRANSFORMATION_DESCRIPTION = (
 
1
  #!/usr/bin/env python3
2
  import numpy as np
3
  import torch
4
+ import cv2
5
 
6
  from transformers.tools.base import Tool, get_default_device
7
  from transformers.utils import (
8
  is_accelerate_available,
9
  is_vision_available,
 
10
  )
11
  from diffusers import StableDiffusionControlNetPipeline, ControlNetModel, UniPCMultistepScheduler
12
 
 
14
  if is_vision_available():
15
  from PIL import Image
16
 
 
 
17
 
18
 
19
  IMAGE_TRANSFORMATION_DESCRIPTION = (