杂鱼煲商品三视图本地/线上都 400:主图 6000×4000 / 5.8MB,yunqi(gpt-image edits)拒收过大参考图 报 invalid_image_file(实测缩到 ≤2048 即过)。image_edit 发参考图前按需降采样:最长边 >2048 或 >4MB 才缩(否则原图直发不损质量);三视图成品 ≤1536px,2048 已 ≥ 成品分辨率 → 对成品无损。 保留透明通道(有 alpha 存 PNG,否则 JPEG q92),解析失败原样放行。商品三视图/故事板/模特上身等 所有 image_edit 路径一并受益。 验证:用真实 6000×4000 主图走打补丁的 provider.image_edit → 当场出图(原必 400);探测 yunqi 接受 ≥4096、6000 拒;48 测全绿。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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