Update app.py
Browse files
app.py
CHANGED
|
@@ -158,7 +158,10 @@ def update_Weight_Precision(temp_precisions):
|
|
| 158 |
selected_precisions = filtered_precisions.copy()
|
| 159 |
|
| 160 |
current_precision = selected_precisions
|
| 161 |
-
|
|
|
|
|
|
|
|
|
|
| 162 |
# Map selected_precisions to corresponding weights
|
| 163 |
for precision in current_precision:
|
| 164 |
if precision in precision_to_dtype:
|
|
|
|
| 158 |
selected_precisions = filtered_precisions.copy()
|
| 159 |
|
| 160 |
current_precision = selected_precisions
|
| 161 |
+
# Apply logic: If current_precision contains "16bit" or "32bit" and other values, remove the other values
|
| 162 |
+
if ("16bit" in current_precision or "32bit" in current_precision) and any(p not in ["16bit", "32bit"] for p in current_precision):
|
| 163 |
+
current_precision = [p for p in current_precision if p in ["16bit", "32bit"]]
|
| 164 |
+
|
| 165 |
# Map selected_precisions to corresponding weights
|
| 166 |
for precision in current_precision:
|
| 167 |
if precision in precision_to_dtype:
|