Don't print trace if a model can't be detected (leads to more confusion than it helps)

This commit is contained in:
Acly
2024-09-20 09:53:12 +02:00
parent 61fa161c34
commit 1a24975f99
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -170,13 +170,15 @@ Lists available models with additional classification info:
```json
{
"checkpoint_file.safetensors": {
"base_model": "sd15"|"sd20"|"sd21"|"sd3"|"sdxl"|"ssd1b"|"svd"|"cascade-b"|"cascade-c",
"is_inpaint": true|false,
"is_refiner": true|false
"base_model": "sd15",
"is_inpaint": false,
"is_refiner": false
},
...
}
```
Possible values for base model: `sd15, sd20, sd21, sd3, sdxl, ssd1b, svd, cascade-b, cascade-c, aura-flow, hunyuan-dit, flux, flux-schnell`
The entry is `{"base_model": "unknown"}` for models which are not in safetensors format or do not match any of the known base models.
### GET /api/etn/languages
+1 -1
View File
@@ -88,7 +88,7 @@ def inspect_diffusion_model(filename: str, prefix: str | None, model_type: str):
}
return {"base_model": "unknown"}
except Exception as e:
traceback.print_exc()
# traceback.print_exc()
return {"base_model": "unknown", "error": f"Failed to detect base model: {e}"}