The presets view says the ComfyUI the cluster installs

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-13 19:23:56 +02:00
1 parent a1974c2b45
commit e0adcc5c4e
3 files changed
+13 -2

No files matched your search

+4
View File
@@ -7661,6 +7661,10 @@
"type": "boolean",
"description": "Auto is whether a preset is added when a node fits it and the catalog has no model that makes what it makes (presets.auto)."
},
"comfyui": {
"type": "string",
"description": "ComfyUI is engines.comfyui as it stands: the version the nodes install, \"\" for none — in which case adding a preset sets it, and the control planes start again on that."
},
"presets": {
"type": "array",
"items": {
+6 -2
View File
@@ -22,7 +22,11 @@ import (
type PresetsView struct {
// Auto is whether a preset is added when a node fits it and the catalog
// has no model that makes what it makes (presets.auto).
Auto bool `json:"auto"`
Auto bool `json:"auto"`
// ComfyUI is engines.comfyui as it stands: the version the nodes
// install, "" for none — in which case adding a preset sets it, and the
// control planes start again on that.
ComfyUI string `json:"comfyui"`
Presets []PresetView `json:"presets"`
}
@@ -96,7 +100,7 @@ func (a *API) Presets(ctx context.Context) (PresetsView, error) {
cfg := a.presetCfg()
cat := a.ctl.Catalog()
kinds := a.gpuKinds()
out := PresetsView{Auto: cfg.Auto}
out := PresetsView{Auto: cfg.Auto, ComfyUI: cfg.ComfyUI}
for _, p := range catalog.Presets() {
v := PresetView{Name: p.Model.Name, Makes: p.Makes, Description: p.Model.Description,
Card: presetCard(p.Model), FitsClasses: presetFits(p.Model, kinds)}
@@ -80,6 +80,9 @@ func TestAPresetIsNotAddedByItselfWhereItShouldNotBe(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if v.ComfyUI != c.cfg.ComfyUI {
t.Errorf("comfyui %q", v.ComfyUI)
}
for _, p := range v.Presets {
if why, ok := c.want[p.Name]; ok && !strings.Contains(p.Blocked, why) {
t.Errorf("%s blocked %q, want it to say %q", p.Name, p.Blocked, why)