Unify ComfyUI ingress model ID and fix seed validation errors.
CI / docker (push) Successful in 3m46s

Merge model_id/alias in the image provider UI, and ensure ComfyUI never receives seed -1 after cloneMap type coercion.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
renjue
2026-06-24 14:17:49 +08:00
parent 76ba500417
commit e761074fb9
8 changed files with 192 additions and 34 deletions
+6
View File
@@ -275,6 +275,9 @@ func (h *Handler) CreateModel(c *gin.Context) {
VersionHash: prediction.HashWorkflowJSON(req.WorkflowJSON),
Enabled: true,
}
if prov.Category == model.CategoryImage {
m.Alias = ""
}
if m.DisplayName == "" {
m.DisplayName = req.ModelID
}
@@ -347,6 +350,9 @@ func (h *Handler) UpdateModel(c *gin.Context) {
m.InputBindingJSON = string(b)
}
prov, _ := h.cache.GetProvider(m.ProviderID)
if prov.Category == model.CategoryImage {
m.Alias = ""
}
if prov.Category == model.CategoryImage && m.WorkflowJSON != "" {
if err := validateImageModelCreate(struct {
ModelID, DisplayName string