Files
ComfyUI/app/assets
Luke Mino-Altherr 2f3d18ae71 feat(assets): register output files as assets after prompt execution
Add ingest_existing_file() to services/ingest.py as a public one-call
wrapper for registering on-disk files (stat, BLAKE3 hash, MIME detection,
path-based tag derivation).

After each prompt execution in the main loop, iterate
history_result['outputs'] and register files with type 'output' as
assets. Runs while the asset seeder is paused, gated behind
asset_seeder.is_disabled(). Stores prompt_id in user_metadata for
provenance tracking.

Amp-Thread-ID: https://ampcode.com/threads/T-019cc013-1444-73c8-81d6-07cae6e5e38d
Co-authored-by: Amp <amp@ampcode.com>

refactor(assets): two-phase ingest — stub insert then hash

ingest_existing_file() now inserts a stub record (hash=NULL) first for
instant UX visibility, then computes the BLAKE3 hash and runs the full
ingest pipeline. No compute_hash flag exposed — both phases always run.

Amp-Thread-ID: https://ampcode.com/threads/T-019cc013-1444-73c8-81d6-07cae6e5e38d
Co-authored-by: Amp <amp@ampcode.com>

refactor(assets): defer hashing to background seeder enrich phase

ingest_existing_file() now only inserts a stub record (hash=NULL) for
instant UX visibility. After registering outputs, triggers
asset_seeder.start_enrich() to compute hashes in the background.
This avoids blocking the prompt worker thread on hash computation.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ccb2f-8bfd-74b3-9005-3a4ace919554
2026-03-08 16:15:10 -07:00
..