Randomdude432 commited on
Commit
6352909
·
1 Parent(s): f6c12e1

bug test3

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -10,7 +10,7 @@ import os
10
  MAX_SEED = np.iinfo(np.int32).max
11
  MAX_IMAGE_SIZE = 2048
12
 
13
- # Debugging CUDA environment
14
  print("CUDA_VISIBLE_DEVICES:", os.environ.get("CUDA_VISIBLE_DEVICES", "Not set"))
15
  print("CUDA Available:", torch.cuda.is_available())
16
  print("GPU Count:", torch.cuda.device_count())
@@ -18,6 +18,7 @@ print(
18
  "Current Device:",
19
  torch.cuda.current_device() if torch.cuda.is_available() else "None",
20
  )
 
21
 
22
 
23
  def calculate_optimal_dimensions(image: Image.Image):
@@ -51,7 +52,7 @@ def create_full_mask(image):
51
  ).convert("L")
52
 
53
 
54
- @spaces.GPU(duration=60) # Reintroduced with shorter duration
55
  def infer(
56
  image,
57
  prompt,
 
10
  MAX_SEED = np.iinfo(np.int32).max
11
  MAX_IMAGE_SIZE = 2048
12
 
13
+ # Debugging CUDA environment and decorator
14
  print("CUDA_VISIBLE_DEVICES:", os.environ.get("CUDA_VISIBLE_DEVICES", "Not set"))
15
  print("CUDA Available:", torch.cuda.is_available())
16
  print("GPU Count:", torch.cuda.device_count())
 
18
  "Current Device:",
19
  torch.cuda.current_device() if torch.cuda.is_available() else "None",
20
  )
21
+ print("Spaces GPU Decorator Active: True")
22
 
23
 
24
  def calculate_optimal_dimensions(image: Image.Image):
 
52
  ).convert("L")
53
 
54
 
55
+ @spaces.GPU # Removed duration parameter
56
  def infer(
57
  image,
58
  prompt,