Skip to content

Commit 1f813ea

Browse files
committed
style: apply formatting to network volume diagnostics
1 parent dd8caec commit 1f813ea

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

handler.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def run_network_volume_diagnostics():
5050
print("=" * 70)
5151
print("NETWORK VOLUME DIAGNOSTICS (NETWORK_VOLUME_DEBUG=true)")
5252
print("=" * 70)
53-
53+
5454
# Check extra_model_paths.yaml
5555
extra_model_paths_file = "/comfyui/extra_model_paths.yaml"
5656
print("\n[1] Checking extra_model_paths.yaml configuration...")
@@ -63,19 +63,23 @@ def run_network_volume_diagnostics():
6363
print(f" {line}")
6464
else:
6565
print(f" ✗ NOT FOUND: {extra_model_paths_file}")
66-
print(" This file is required for ComfyUI to find models on the network volume.")
67-
66+
print(
67+
" This file is required for ComfyUI to find models on the network volume."
68+
)
69+
6870
# Check network volume mount
6971
runpod_volume = "/runpod-volume"
7072
print(f"\n[2] Checking network volume mount at {runpod_volume}...")
7173
if os.path.isdir(runpod_volume):
7274
print(f" ✓ MOUNTED: {runpod_volume}")
7375
else:
7476
print(f" ✗ NOT MOUNTED: {runpod_volume}")
75-
print(" Make sure you have attached a network volume to your serverless endpoint.")
77+
print(
78+
" Make sure you have attached a network volume to your serverless endpoint."
79+
)
7680
print("=" * 70)
7781
return
78-
82+
7983
# Check directory structure
8084
print(f"\n[3] Checking directory structure...")
8185
models_dir = os.path.join(runpod_volume, "models")
@@ -88,11 +92,11 @@ def run_network_volume_diagnostics():
8892
print_expected_structure()
8993
print("=" * 70)
9094
return
91-
95+
9296
# List model directories and their contents
9397
print(f"\n[4] Scanning model directories...")
9498
found_any_models = False
95-
99+
96100
for model_type, extensions in MODEL_TYPES.items():
97101
model_path = os.path.join(models_dir, model_type)
98102
if os.path.isdir(model_path):
@@ -113,7 +117,7 @@ def run_network_volume_diagnostics():
113117
except Exception as e:
114118
print(f" {model_type}/: Error reading directory - {e}")
115119
continue
116-
120+
117121
if files:
118122
print(f"\n {model_type}/:")
119123
for f in files:
@@ -122,7 +126,7 @@ def run_network_volume_diagnostics():
122126
print(f"\n {model_type}/: (empty)")
123127
else:
124128
print(f"\n {model_type}/: (directory not found)")
125-
129+
126130
# Summary
127131
print(f"\n[5] Summary")
128132
if found_any_models:
@@ -135,7 +139,7 @@ def run_network_volume_diagnostics():
135139
print(" - LoRAs: .safetensors, .pt")
136140
print(" - VAE: .safetensors, .pt, .bin")
137141
print(" - etc.")
138-
142+
139143
print_expected_structure()
140144
print("=" * 70)
141145

@@ -162,6 +166,7 @@ def format_size(size_bytes):
162166
size_bytes /= 1024
163167
return f"{size_bytes:.1f} TB"
164168

169+
165170
# Time to wait between API check attempts in milliseconds
166171
COMFY_API_AVAILABLE_INTERVAL_MS = 50
167172
# Maximum number of API check attempts

0 commit comments

Comments
 (0)