CI / test (push) Failing after 7m17s
From review. A mirror set already on the node is looked at again, not trusted for having been fetched once; Pickled cuts a query or a fragment from any source, hf: too; .pt2 is a pickle. The flag check reads a flag as the engine does: underscores as dashes and any beginning of a refused flag as that flag, since argparse takes --trust-remote for --trust-remote-code; SGLang refuses --load-format, which would undo the agent's safetensors. TripoSR's preset says allow_pickle: without it the preset could not be added and the presets pass failed on it each time. A shared ComfyUI environment's hidden entry takes its first member's allow_pickle, as it takes its source. The GenAI trace attributes made temperature and top_p typed fields of the request's parse, so "0.7" as a string was a 400; they are read loosely, as they are read only for the trace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
103 lines
3.7 KiB
Go
103 lines
3.7 KiB
Go
package catalog
|
|
|
|
import (
|
|
"slices"
|
|
"time"
|
|
)
|
|
|
|
// Preset is a catalog entry that comes with llmgw: a model whose workflow,
|
|
// custom nodes, packages and licence somebody has already found and tried,
|
|
// so that adding it is naming it.
|
|
//
|
|
// A ComfyUI model cannot be worked out from its repository the way a GGUF
|
|
// can: which workflow runs it, which node at which commit, which packages at
|
|
// which ranges, and under which licence what it makes is shipped are learned
|
|
// by running it. Written in a document, they were copied by hand on every
|
|
// site, and a line left out — the node that cuts the picture out — gave
|
|
// meshes with their background as geometry.
|
|
type Preset struct {
|
|
// Makes is what it makes: pictures or meshes.
|
|
Makes string
|
|
Model Model
|
|
}
|
|
|
|
// Presets are the entries that come with llmgw, by name. Each profile says
|
|
// the card it needs rather than naming a class, so the entry places on any
|
|
// site's cards.
|
|
func Presets() []Preset {
|
|
yes := true
|
|
return []Preset{
|
|
{
|
|
Makes: OutputPictures,
|
|
Model: Model{
|
|
Name: "flux-schnell",
|
|
Description: "FLUX.1 [schnell]: pictures from a prompt, in four steps",
|
|
Source: "hf:Comfy-Org/flux1-schnell/flux1-schnell-fp8.safetensors",
|
|
ComfyUI: &ComfyUI{Workflow: "flux-schnell"},
|
|
License: &License{
|
|
ID: "Apache-2.0", Name: "Apache-2.0", Commercial: &yes,
|
|
URL: "https://huggingface.co/black-forest-labs/FLUX.1-schnell",
|
|
Notice: "Made with FLUX.1 [schnell] (Black Forest Labs, Apache 2.0).",
|
|
},
|
|
Scaling: Scaling{Min: 0, Max: 1, IdleTimeout: 15 * time.Minute},
|
|
// The checkpoint is 17 GB with its text encoders; a card with
|
|
// no fp8 has its weights upcast as they load.
|
|
Profiles: []Profile{{Name: "gpu", Engine: EngineComfyUI, TP: 1,
|
|
GPU: &GPUNeed{MinComputeCapability: 7.0, MinMemoryGB: 24}}},
|
|
},
|
|
},
|
|
{
|
|
Makes: OutputMeshes,
|
|
Model: Model{
|
|
Name: "triposr",
|
|
Description: "TripoSR: a 3D model (GLB) from a picture of one object on a plain background, as a job",
|
|
Source: "hf:stabilityai/TripoSR/model.ckpt",
|
|
// TripoSR is published as this checkpoint only; it is
|
|
// Stability AI's, pinned, and the one pickle llmgw ships.
|
|
AllowPickle: true,
|
|
ComfyUI: &ComfyUI{
|
|
Workflow: "triposr",
|
|
Output: OutputMeshes,
|
|
Nodes: []CustomNode{{
|
|
Repo: "https://github.com/flowtyone/ComfyUI-Flowty-TripoSR",
|
|
Commit: "a0c94ac60a7cc062604f61aeeea6d0d493521de3",
|
|
// transformers 5 renames the checkpoint's keys; rembg
|
|
// and onnxruntime cut out a picture with no alpha.
|
|
Requirements: []string{"omegaconf", "trimesh", "scikit-image", "imageio",
|
|
"transformers>=4.50.3,<5", "huggingface-hub<1", "tokenizers", "rembg", "onnxruntime"},
|
|
}},
|
|
},
|
|
License: &License{
|
|
ID: "MIT", Name: "MIT", Commercial: &yes,
|
|
URL: "https://huggingface.co/stabilityai/TripoSR/blob/main/LICENSE",
|
|
Notice: "Made with TripoSR (Stability AI and Tripo AI, MIT). Its image encoder is " +
|
|
"facebook/dino-vitb16 (Apache 2.0). TripoSR was trained on a filtered subset of " +
|
|
"Objaverse, some of whose objects carry their own licences.",
|
|
},
|
|
Scaling: Scaling{Min: 0, Max: 1, IdleTimeout: 10 * time.Minute},
|
|
Profiles: []Profile{{Name: "gpu", Engine: EngineComfyUI, TP: 1,
|
|
GPU: &GPUNeed{MinComputeCapability: 7.0, MinMemoryGB: 8}}},
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
// PresetNamed is the preset of that name.
|
|
func PresetNamed(name string) (Preset, bool) {
|
|
ps := Presets()
|
|
i := slices.IndexFunc(ps, func(p Preset) bool { return p.Model.Name == name })
|
|
if i < 0 {
|
|
return Preset{}, false
|
|
}
|
|
return ps[i], true
|
|
}
|
|
|
|
// PresetNames are the presets' names, in order.
|
|
func PresetNames() []string {
|
|
var out []string
|
|
for _, p := range Presets() {
|
|
out = append(out, p.Model.Name)
|
|
}
|
|
return out
|
|
}
|