Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,6 @@
|
|
28 |
|
29 |
import gradio as gr
|
30 |
import spaces
|
31 |
-
import torch
|
32 |
import os
|
33 |
|
34 |
# Global model variable, but do not initialize or move to CUDA here
|
@@ -39,6 +38,8 @@ def generate(model_name, image, text):
|
|
39 |
global model_pipe
|
40 |
|
41 |
# Debugging lines to trace CUDA initialization
|
|
|
|
|
42 |
print(f"PID: {os.getpid()}")
|
43 |
print(f"Before import: CUDA available: {torch.cuda.is_available()}")
|
44 |
|
|
|
28 |
|
29 |
import gradio as gr
|
30 |
import spaces
|
|
|
31 |
import os
|
32 |
|
33 |
# Global model variable, but do not initialize or move to CUDA here
|
|
|
38 |
global model_pipe
|
39 |
|
40 |
# Debugging lines to trace CUDA initialization
|
41 |
+
import torch
|
42 |
+
|
43 |
print(f"PID: {os.getpid()}")
|
44 |
print(f"Before import: CUDA available: {torch.cuda.is_available()}")
|
45 |
|