Nodes/GenAsset/Upsert Asset Tags Fields
ComfyUI Node

Upsert Asset Tags Fields

Upsert Asset Tags Fields — keeping your asset cards tidy

By steliosot·Created 4 months ago·Updated 3 months ago· 1
Upsert Asset Tags Fields
    • asset_id
    • asset_json
    • status_json
    base_urlhttps://genasset.xyz
    tokenComfyUI/user/genasset.json
    asset_id
    tags_csv
    notes_md

    Tags are how a library stays searchable, and they only work if they actually get set. Upsert Asset Tags Fields is the node for maintaining that layer: give it an asset_id, set some tags_csv, add notes_md, and it updates those asset-level fields on the server. "Upsert" means exactly what it sounds like - update if the fields exist, insert if they don't.

    The reason you'd do this in a node instead of the web UI is automation. This is the cleanup node you run after a save: a save creates the asset with whatever auto-derived tags it got, and then an upsert node normalizes them - replacing the messy auto-tags with the controlled vocabulary your team actually uses, or stamping the asset with notes so the next person knows what it is. It's the difference between a library and a pile.

    How it works

    It sends a PATCH to api/v1/assets/{asset_id} with the tags and notes you provide. tags_csv is a comma-separated string - "hero, approved, summer-2026" - which the server parses into tags. notes_md is multiline markdown, stored as the asset's notes. Both are additive in spirit: you're updating the asset card's fields, not touching its versions or its image.

    The output is the updated asset as asset_json - the same compact asset record the other asset nodes return - plus asset_id and status_json. So you can run this node and immediately confirm the fields landed.

    Inputs and outputs that matter

    Five required inputs: base_url, token, asset_id, tags_csv, and notes_md. The asset id is the target; the other two are what you're writing. A couple of practical notes: tags_csv with an empty default means the node will happily clear tags if you run it with empty input - it's a patch, so whatever you pass is what gets set. And keep tags comma-separated with no fancy quoting; the server splits on commas.

    Outputs: asset_id, asset_json (the updated asset), and status_json. Wire asset_json into Display Any From GenAsset to inspect the result on the canvas.

    Installation

    In the steliosot/ComfyUI-GenAsset pack. ComfyUI Manager → search GenAsset → install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/steliosot/ComfyUI-GenAsset.git
    

    Restart after. No extra dependencies; workspace token in the widget, GENASSET_WORKSPACE_TOKEN, or ComfyUI/user/genasset.json.

    Common issues

    • Tags went blank - you ran it with an empty tags_csv. Since it's a patch, empty input overwrites the existing tags with none. If you want to add to existing tags, you need the current values in the input first (or handle it in your own logic).
    • Notes don't render - notes_md is markdown; if you're pasting plain text with newlines it still works, but formatting like headers or lists expects markdown syntax.
    • Wrong asset patched - same warning as every asset-targeting node: the UUID is the only thing identifying the target, and there's no confirm. Verify before you queue.

    Pair this with Save Metadata Patch To GenAsset in your mental model: that one patches version metadata, this one patches asset-level fields. Together they cover the two layers of bookkeeping GenAsset keeps separate - and this one is the tidier of the two.

    Categorygenasset

    Inputs (5)

    NameTypeDefaultDescription
    base_urlSTRINGhttps://genasset.xyz
    tokenSTRINGComfyUI/user/genasset.json
    asset_idSTRINGAsset id to patch.
    tags_csvSTRING
    notes_mdSTRING

    Outputs (3)

    NameTypeDescription
    asset_idSTRING
    asset_jsonSTRING
    status_jsonSTRING