Skip to content

Texture Mesh with Trellis2: generated asset is registered correctly but never linked to its card (Cards_Assets) #24

Description

@grugeth

Summary

Running "Texture Mesh with Trellis2" produces a correct, fully-textured mesh and correctly records it as an Asset in the local database — but the resulting asset is never linked to the card it belongs to, so the UI falls back to displaying the original source image instead of the generated mesh.

Steps to reproduce

  1. Have a card with a source image and (optionally) a prior mesh output.
  2. Run the "Texture Mesh with Trellis2" action on it.
  3. Wait for completion.
  4. Open the card — the newest item shows the source PNG again instead of the new textured mesh.

What I found investigating app.db

The generation actually succeeded completely:

  • A correct Assets row was created (e.g. id 53, name "Laughing Crying Emoji Mesh", assetTypeId=2), with fully accurate metadata:
    {
      "resolution": "Unknown",
      "format": "GLB",
      "source": "COMFYUI",
      "provider": "ComfyUI",
      "workflowId": 5,
      "workflowName": "Texture Mesh with Trellis2",
      "promptId": "cb3b0dda-6b22-41d1-a305-d7408bf0e5f2",
      "outputNodeId": "12",
      "outputFilename": "3DGenStudioTexturedMesh_00001_.glb",
      "savedOutputs": 1,
      "cardId": "2a54d580-3a70-49c3-b167-fbce15b62e93"
    }
  • The promptId matches ComfyUI's own /history exactly, and node 12 is Preview3D — the correct output node.
  • The referenced file (data/assets/meshes/<...>.glb) exists on disk and is byte-identical to ComfyUI's own output file for that prompt (21,276,048 bytes, verified).

But: there was no corresponding row in Cards_Assets linking this new asset to its card (cardId from the metadata, id 8 in this case). The card's Cards_Assets entries stopped at the prior two items (source image + earlier mesh); the newly generated, correctly-recorded textured mesh was simply never appended.

Fix applied locally as a workaround

INSERT INTO Cards_Assets (cardId, assetId, position) VALUES (8, 53, 2);

After this, the card correctly shows the textured mesh.

Suggested fix

Whatever step creates the Assets row and its metadata.cardId after a workflow finalization succeeds should also insert the corresponding Cards_Assets row (at MAX(position)+1 for that card) in the same transaction/step — right now that step appears to be silently skipped or failing independently of the (otherwise fully successful) asset creation.

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions