The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
feat: make asset hashing opt-in via --enable-asset-hashing, off by default (#14663)
Matt Miller1c59659a2f44
diff --git a/comfy/cli_args.py b/comfy/cli_args.pyindex e3099a230..4bef096fb 100644--- a/comfy/cli_args.py+++ b/comfy/cli_args.py@@ -240,6 +240,7 @@ database_default_path = os.path.abspath()parser.add_argument("--database-url", type=str, default=f"sqlite:///{database_default_path}", help="Specify the database URL, e.g. for an in-memory database you can use 'sqlite:///:memory:'.")parser.add_argument("--enable-assets", action="store_true", help="Enable the assets system (API routes, database synchronization, and background scanning).")+parser.add_argument("--enable-asset-hashing", action="store_true", help="Compute blake3 content hashes when scanning assets. Hashing enables future asset-portability features (deduplication, cross-machine model resolution) but adds startup cost and per-output cost on large models directories. Off by default; enable to opt in.")parser.add_argument("--feature-flag", type=str, action='append', default=[], metavar="KEY[=VALUE]", help="Set a server feature flag. Use KEY=VALUE to set an explicit value, or bare KEY to set it to true. Can be specified multiple times. Boolean values (true/false) and numbers are auto-converted. Examples: --feature-flag show_signin_button=true or --feature-flag show_signin_button")parser.add_argument("--list-feature-flags", action="store_true", help="Print the registry of known CLI-settable feature flags as JSON and exit.")diff --git a/main.py b/main.pyindex aa4ee2adb..20ec83c9e 100644--- a/main.py+++ b/main.py@@ -403,7 +403,7 @@ def prompt_worker(q, server_instance):hook_breaker_ac10a0.restore_functions()if not asset_seeder.is_disabled():- asset_seeder.enqueue_enrich(roots=("output",), compute_hashes=True)+ asset_seeder.enqueue_enrich(roots=("output",), compute_hashes=args.enable_asset_hashing)asset_seeder.resume()@@ -458,7 +458,7 @@ def setup_database():if dependencies_available():init_db()if args.enable_assets:- if asset_seeder.start(roots=("models", "input", "output"), prune_first=True, compute_hashes=True):+ if asset_seeder.start(roots=("models", "input", "output"), prune_first=True, compute_hashes=args.enable_asset_hashing):logging.info("Background asset scan initiated for models, input, output")except Exception as e:if "database is locked" in str(e):