Comfy-Org / Comfy-Org/ComfyUI

Feature Request: Decentralised Asset Metadata & Version‑Tracking in ComfyUI via Hypercore/IPFS

Open
#8,721 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### 1 | Problem & Motivation

ComfyUI users routinely import **workflows, models, LoRAs, embeddings, ControlNets, and node presets** from sites such as Civitai, Hugging Face, and OpenArt. Today each download arrives as an isolated file **without**:

- the author’s identity or signing key
- the licence text the author expects the user to accept
- preview images, descriptive guidance, or usage notes
- a reliable signal that a newer, improved, or security‑patched version exists

The result is a mesh of **metadata‑missing misery**, **manual re‑checking drudgery**, and **silent stale‑asset syndrome** that costs users time and clutters support channels with “Why doesn’t this workflow work any more?” issues.

### 2 | High‑Level Proposal

Leverage **IPFS + Hypercore** so that **every asset ships with its own append‑only Hypercore feed** (one feed per asset). ComfyUI would:

1. **Run (or fetch) an IPFS node by default** – users may switch this off in Settings.

2. **On first import**, fetch the asset’s Hypercore document; store the binary payload plus a JSON metadata record:

| Field | Purpose |
| ----------------------------- | ---------------------- |
| `author` (handle) | Display & discovery |
| `author_key` (pubkey) | Signature verification |
| `version` (semver / git hash) | Update detection |
| `license` (text + SPDX ID) | Display & acceptance |
| `description` | In‑UI guidance |
| `previews[]` (image CIDs) | Thumbnails |

3. **Verify** the metadata signature against `author_key`.

4. **Check the feed at configurable intervals** (e.g., on start‑up or when the Asset Manager opens).

5. **Notify** the user if a higher `version` exists; one click downloads & swaps in the new asset.

6. **Enforce per‑version licence acceptance**: a modal appears the first time an updated asset is launched.

7. **Respect publication scope** chosen by the user/author:

- **Private** (default): data never leaves the local node.
- **Unlisted**: CID known, but asset not discoverable via author catalogues.
- **Public**: asset indexed under the author’s public Hypercore “portfolio” feed so ComfyUI can show “Other assets by this creator”.

> **Note:** Hypercore is proposed as the default decentralised datastore, but the overall architecture is storage‑engine agnostic—maintainers could substitute another peer‑to‑peer database (e.g., OrbitDB, GunDB) if it better suits ComfyUI’s roadmap.

### 3 | User Experience Sketch

```
┌─────────────────────────────┐
│ Asset Manager (β) │
├─────────────────────────────┤
│ • DreamShaperXL.safetensors │ v1.2 ⇧ v1.3 available! [Update]
│ — by lukev (MIT) │
│ • anime_lora_pastel.ckpt │ v0.9 Up‑to‑date
│ — by starlight (CC‑BY‑SA)│
│ • workflow_woodland.json │ v7.4 ⇧ v8.0 available! [Changelog] │
└─────────────────────────────┘
```

Clicking an asset opens a side panel with preview images, full description, licence text, and a *“Download newer version”* button. Licence acceptance is a checkbox stored per `(asset‑id, version)` tuple.

### 4 | Benefits for ComfyUI & Community

| Stakeholder | Value Delivered |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **End‑users** | No more tab‑toggling to track updates; richer in‑UI guidance; effortless licence compliance. |
| **Model/Workflow authors** | Assets remain discoverable & update‑able **without** central hosting bills; licences enforced; signature proves authenticity. |
| **ComfyUI maintainers** | Fewer “my workflow broke” tickets; strong security story (signed metadata); clear architecture for future marketplace features. |
| **Enterprise users** | Can disable built‑in IPFS and point ComfyUI at a **paid, firewall‑friendly proxy service—an optional subscription that generates direct revenue for the ComfyUI project.** |

### 5 | Minimal‑Viable Implementation (MVP)

1. **Auto‑download IPFS binaries via IPFS:** On first run, ComfyUI retrieves the platform‑appropriate `go‑ipfs` (or `js‑ipfs`) binary through an IPFS CID, caching it locally; users can opt out.
2. Implement an ``** schema** (fields listed in §2).
3. Extend the **Asset Manager** to read/write the schema and display its contents.
4. Add a **background update‑check task** (startup + every X hours).
5. Provide a **Licence modal** with ― *Accept* | *View licence* | *Decline & keep current version*.

### 6 | Security, Privacy & Governance

- **Signature verification** prevents spoofed updates.
- **Opt‑out IPFS node** honours local policy constraints.
- “Private / Unlisted / Public” publication model defaults to *Private*.
- No telemetry beyond necessary DHT lookups unless the user explicitly opts in.

### 7 | Conclusion

This proposal transforms asset handling from a **file‑centric, metadata‑missing chore** into a **self‑updating, trustable, discoverable experience**—all while leaning on mature decentralised tech that aligns with ComfyUI’s open‑source spirit.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.