sage/scripts/demucs_worker_usage_fix.py
yumoqing 4927f7f330 refactor: backend_accounting.py now uses product_management module
- Import from product_management.get_manager() instead of llmage.accounting
- Also loads load_llmage for pricing/discount initialization
2026-07-07 12:27:48 +08:00

10 lines
417 B
Python

# Patch for /data/ymq/demucs-service/workers/separate.py
# In run_separate_full(), ensure the return dict includes:
# "usage": {"audio_seconds": duration}
# Find the return statement in run_separate_full and add usage field.
# The function currently returns something like:
# return {"vocals_path": ..., "accompaniment_path": ..., "duration": ...}
#
# Add: "usage": {"audio_seconds": result.get("duration", 0)}