Enable output folder asset scanning automatically
- Add enable_output_asset_scanning() to __init__.py - Calls seed_assets(["output"]) when extension loads - Output images now appear in Media Assets "Imported" tab - No manual ComfyUI patching required - works automatically Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
3dfe652ffc
commit
6c1ad0cc35
+19
@@ -31,5 +31,24 @@ def setup_api():
|
||||
print(f"[ModelSync] Failed to setup API routes: {e}")
|
||||
|
||||
|
||||
def enable_output_asset_scanning():
|
||||
"""
|
||||
Enable scanning of output folder for Media Assets panel.
|
||||
|
||||
By default, ComfyUI only scans the models folder. This adds the output
|
||||
folder so generated images appear in the Media Assets "Imported" tab.
|
||||
"""
|
||||
try:
|
||||
from app.assets.scanner import seed_assets
|
||||
seed_assets(["output"], enable_logging=False)
|
||||
print("[ModelSync] Output folder asset scanning enabled")
|
||||
except ImportError:
|
||||
# Older ComfyUI version without assets system
|
||||
pass
|
||||
except Exception as e:
|
||||
print(f"[ModelSync] Could not enable output asset scanning: {e}")
|
||||
|
||||
|
||||
# Initialize when loaded by ComfyUI
|
||||
setup_api()
|
||||
enable_output_asset_scanning()
|
||||
|
||||
Reference in New Issue
Block a user