Provenance fields

Nine typed fields on Version, created under Settings, then SG, SG Site Setup. A publish does not need them.

fieldprogrammatic namefrom
AI Generatorsg_ai_generatorComfyUI, and the name the submitting client gave itself
AI Modelsg_ai_modelthe checkpoints the graph loaded
AI Promptsg_ai_promptpositive conditioning on this branch
AI Negative Promptsg_ai_negative_promptnegative conditioning on this branch
AI Seedsg_ai_seedtext, not a number: seeds reach 2**64-1
AI Samplersg_ai_samplersampler and scheduler
AI Stepssg_ai_stepsthe last sampler on the branch
AI CFGsg_ai_cfgthe last sampler on the branch
AI Generated Fromsg_ai_generated_fromthe Versions this was made from

sg_ai_seed is text, not a number: seeds reach 2**64-1, which no numeric field on the site has (probe 019).

Without the fields

  • The facts go in the Version's description: the note, a blank line, then one line per fact, lineage included.
  • Where some of the nine exist, those take their values. The description records the rest.
  • The nodes say nothing about creating fields.
A Version's description holding the provenance facts, one per line, on a site with none of the nine fields
The note, a blank line, then one line per fact.

Attachments

  • The record is attached as .provenance.json.
  • The workflow is attached when the submitting client sent one.
  • Provenance is scoped per branch. The node walks back through its own inputs.

Creating the fields from the command line

PYTHONPATH=src <comfy-python> -m comfyui_sg.fields
  • It reads the schema first and creates only what is missing. Pressing twice is safe.
  • It imports no torch.
  • It reads a script key from .env.local, never from Settings.
  • That key needs permission to create fields on Version. Most artist accounts do not have it.
  • Field names are permanent. Deleting a field frees the field, never its name. Trashed fields cannot be listed, so a name spent here is spent site-wide forever (probe 019).

Mapping to existing fields

Point the profile's provenance.map at them. Mapping onto a studio's own fields works and is not a release feature.

The submitting client

A Version that reads ComfyUI (unknown client) means the client that POSTed /prompt did not name itself. The name is the client's own claim, in extra_data.comfy_usage_source. Set it in your own submitter:

POST /prompt  {"prompt": {...}, "extra_data": {"comfy_usage_source": "my-farm-submitter"}}

A Comfy-Usage-Source header works too. The server copies it into extra_data only when the body left the key out.