Chris4K commited on
Commit
9a7039c
1 Parent(s): c7d4c37

Update image_upscaling.py

Browse files
Files changed (1) hide show
  1. image_upscaling.py +7 -0
image_upscaling.py CHANGED
@@ -48,10 +48,17 @@ class ImageUpscalingTool(Tool):
48
  if not self.is_initialized:
49
  self.setup()
50
 
 
 
51
  # Convert NumPy array to PIL Image
52
  if isinstance(image, np.ndarray):
53
  image = Image.fromarray((image * 255).astype(np.uint8))
 
 
54
 
 
 
 
55
  return self.pipeline(
56
  image=image,
57
  prompt="",
 
48
  if not self.is_initialized:
49
  self.setup()
50
 
51
+ print(f"Received image type: {type(image)}")
52
+
53
  # Convert NumPy array to PIL Image
54
  if isinstance(image, np.ndarray):
55
  image = Image.fromarray((image * 255).astype(np.uint8))
56
+
57
+ print(f"Converted image type: {type(image)}")
58
 
59
+ # After converting the image
60
+ image.show()
61
+
62
  return self.pipeline(
63
  image=image,
64
  prompt="",