Spaces:
Sleeping
Sleeping
Kyle Pearson commited on
Commit ·
df6e003
1
Parent(s): 8d08093
Add dynamic dtype selection for `get_device_info()` with CUDA/CPU checks, update config logic
Browse files- src/config.py +1 -1
src/config.py
CHANGED
|
@@ -82,7 +82,7 @@ def get_device_info() -> tuple[str, str]:
|
|
| 82 |
|
| 83 |
|
| 84 |
device, device_description = get_device_info()
|
| 85 |
-
dtype = torch.float16
|
| 86 |
|
| 87 |
# Check if we're on low-memory hardware and warn
|
| 88 |
def check_memory_requirements() -> bool:
|
|
|
|
| 82 |
|
| 83 |
|
| 84 |
device, device_description = get_device_info()
|
| 85 |
+
dtype = torch.float16 if device == "cuda" else torch.float32
|
| 86 |
|
| 87 |
# Check if we're on low-memory hardware and warn
|
| 88 |
def check_memory_requirements() -> bool:
|