PotionUI Docs v0.3.0

Contributing a model type

A model type is a folder of model files PotionUI scans, indexes, shows in Admin -> Models and offers to model fields. Core registers its own types (checkpoint, lora, vae, ...) through the same registry a plugin uses. Declare yours under model_types::

yaml
model_types:
  - id: pose_rig                  # lowercase, digits and underscores; unique across core and plugins
    label: "Pose rig"             # shown wherever the type is named
    purpose: "Skeleton for pose transfer"   # optional one-line description
    folder: pose_rigs             # one folder name under each models root; downloads land here
    aliases: [PoseRigs]           # optional other folder names that mean this type
    extensions: [.onnx, .safetensors]       # optional; defaults to the core model file extensions
    layout: file                  # optional; `directory` treats each subfolder with a config.json as one model
    header_classified: false      # optional; files are typed from their headers, like checkpoints
    assignable: true              # optional; whether an admin may move a model to this type

Enabling the plugin registers the type and binds folder under the PotionUI models root, so the next indexing run (a restart, or Rescan in Admin -> Models) catalogues the files in it. A model field with model_type: pose_rig lists them. An id, folder or alias that is already taken, by core or another plugin, fails the enable with an error naming both owners.

Disabling the plugin removes the type. Its folder is no longer scanned and its files are no longer resolvable, but the models already indexed keep their rows: Admin -> Models shows them under the type id, marked as no longer available, until the plugin is enabled again.

Python code reads the live set through src.plugin_api.models.model_types(); a frontend reads window.__potionui.modelTypes (list(), get(id), presentation(id)), which follows GET /api/models/type-definitions. Both include plugin types while their plugin is enabled.