一件成片积分计算补上

This commit is contained in:
Azmat@qq.com
2026-09-04 18:30:43 +08:00
parent 0d042edc73
commit 75b1665f76
2 changed files with 8 additions and 4 deletions
@@ -113,14 +113,16 @@ def estimate_quick_create_points(
resolution: str,
total_duration: int,
):
"""与前端按钮预估同口径:脚本挂牌 + 默认出图×场次 + 视频挂牌秒价×时长(无引用视频)。"""
"""与前端按钮预估同口径:脚本挂牌 + 出图粗估(1商品+每场1角色+1场景) + 视频挂牌秒价×时长(无引用视频)。"""
from decimal import Decimal
from apps.billing.pricing import quote_flat, quote_video_estimate
scene_count = max(1, int(total_duration) // 15)
# 与 _ensure_fallback_entities / _specs_from_entities 下限对齐:商品1 + 角色1×场 + 场景1×场
image_count = 1 + scene_count * 2
script_points = quote_flat(text_model, units=1, team=team).points
image_points = quote_flat(image_model, units=scene_count, team=team).points
image_points = quote_flat(image_model, units=image_count, team=team).points
_tokens, video_quote = quote_video_estimate(
video_model,
aspect_ratio=aspect_ratio,