Civitai detects image resources from declared metadata only, and it already
accepts `embed:<name>` hashes and embedding AIRs. The Save Image node wrote
neither, so an image that used textual inversions uploaded without them.
Resolve `embedding:<name>` tokens from the saved prompts against the local
embedding scanner (cache reads only, no Civitai API call) and record each one
that exists in the library -- ComfyUI can only load an embedding that is on
disk, so an unresolved name was not used by the image. The prompt parser
mirrors ComfyUI's SDTokenizer boundaries, so a token glued to a word or a
comma is not treated as an embedding.
When the scanner cache knows the Civitai version, emit only that exact
resource (`Civitai resources`, AIR type `embedding`). The `embed:` hash is
emitted only as a fallback when no version id is known: Civitai matches a
hash against every byte-identical version and keeps the oldest published
one, which showed up as a second row for a re-uploaded embedding file.