Spaces:
Sleeping
Sleeping
Update app.py
Browse filesdgnsfgndghkw4ygafb
app.py
CHANGED
|
@@ -24,7 +24,7 @@ COMF_PATH = config('COMF_PATH')
|
|
| 24 |
|
| 25 |
import torch
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
| 30 |
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
|
@@ -84,7 +84,7 @@ def check_server_ready(port):
|
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
-
|
| 88 |
def generate_image(prompt, image):
|
| 89 |
prefix_filename = str(random.randint(0, 999999))
|
| 90 |
prompt = prompt.replace('ComfyUI', prefix_filename)
|
|
|
|
| 24 |
|
| 25 |
import torch
|
| 26 |
|
| 27 |
+
import spaces
|
| 28 |
|
| 29 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
| 30 |
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
|
|
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
+
@spaces.GPU(duration=240)
|
| 88 |
def generate_image(prompt, image):
|
| 89 |
prefix_filename = str(random.randint(0, 999999))
|
| 90 |
prompt = prompt.replace('ComfyUI', prefix_filename)
|