Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -30,6 +30,19 @@ MAX_IMAGE_SIZE = 2048
|
|
30 |
# Load Qwen/Qwen-Image pipeline
|
31 |
dtype = torch.bfloat16
|
32 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
pipe_qwen = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image", torch_dtype=dtype).to(device)
|
34 |
|
35 |
# Aspect ratios
|
|
|
30 |
# Load Qwen/Qwen-Image pipeline
|
31 |
dtype = torch.bfloat16
|
32 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
33 |
+
# ---- CUDA Check ----
|
34 |
+
print("CUDA_VISIBLE_DEVICES=", os.environ.get("CUDA_VISIBLE_DEVICES"))
|
35 |
+
print("torch.__version__ =", torch.__version__)
|
36 |
+
print("torch.version.cuda =", torch.version.cuda)
|
37 |
+
print("cuda available:", torch.cuda.is_available())
|
38 |
+
print("cuda device count:", torch.cuda.device_count())
|
39 |
+
if torch.cuda.is_available():
|
40 |
+
print("current device:", torch.cuda.current_device())
|
41 |
+
print("device name:", torch.cuda.get_device_name(torch.cuda.current_device()))
|
42 |
+
|
43 |
+
print("Using device:", device)
|
44 |
+
|
45 |
+
# --- Model Loading ---
|
46 |
pipe_qwen = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image", torch_dtype=dtype).to(device)
|
47 |
|
48 |
# Aspect ratios
|