Files
yingqing/core/backend
seaislee1209andClaude Opus 4.8 827fa7fa54 feat(ai): 实体提取解耦 — 定稿剧本后独立提取角色/场景 + 商品参考图永远带上
根因:实体跟脚本生成耦合,模型不稳(尤其改稿 revise)常丢实体 → 角色提不出、
参考图全空 → 故事板/视频退化纯文生图(用户 demo 全错的真因)。

- 新 skill ecommerce-entity-extract(按 skill-creator 法写):只提角色+场景,
  角色铁律=穿整套衣服/空手/不带与商品同类物/不暴露;商品不提。4 项目实测稳定产出。
- extract_entities_for_project + /extract-entities 端点:读定稿剧本→提实体→
  落库覆盖 metadata + 回填每镜 entity_refs(提取为唯一权威来源,脚本生成完全不动)。
- 商品参考图永远带上:_storyboard_reference_images(视频继承)改为无条件带
  商品三视图→主图兜底,不再依赖 entity_refs 里有没有商品实体。
- 创建商品后端强制要主图(堵兜底洞:无图商品会让下游参考图彻底落空)。

实测:杂鱼煲(原实体0)→6实体,每镜参考图齐(角色+商品+场景),不再文生图。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 17:37:18 +08:00
..

AirShelf Backend

All backend code lives under AirShelf/core/backend by project decision.

Local bootstrap

cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python manage.py migrate
python manage.py runserver 0.0.0.0:8000

Start workers in separate terminals:

cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
source .venv/bin/activate
celery -A airshelf worker -l info -P threads -c 4   # 线程池 4 并发(出图/视频可并行;勿用 -P solo 串行)

ffmpeg must be available on PATH for Stage5 export jobs.

Runtime layout

  • Django project: airshelf
  • Domain apps: apps/*
  • Settings module: airshelf.settings.development
  • Celery app: airshelf.celery

Secrets must be supplied by environment variables or .env; never commit values from account.md.

Useful commands

python manage.py check
python manage.py makemigrations --check --dry-run
python manage.py migrate
python manage.py bootstrap_volcano_models
python manage.py test apps.accounts apps.projects apps.billing