feat(image): 支持真 16:9(1536x864)+ 人物/商品三视图/场景默认 16:9
- gpt-image-2 实测支持 16:9(宽高需被 16 整除):真 16:9 = 1536x864(长边封顶 1536); 原来「16:9」误给成 1536x1024(实为 3:2)。修正 _RATIO_TO_SIZE 与 _ratio_to_image_size - admin「提示词」页比例按钮新增「宽 16:9」 - 迁移 0015/0016:scene + product_triview + person_triview 默认比例设为 16:9; 分镜图(storyboard_frame)/立绘/视频保持竖屏不动 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
dee269aeda
commit
fd596776e2
@@ -0,0 +1,19 @@
|
||||
from django.db import migrations
|
||||
|
||||
# 场景 / 商品三视图 默认比例改 16:9(1536x864);分镜图(storyboard_frame)保持竖屏不动。
|
||||
KEYS = ["scene", "product_triview"]
|
||||
|
||||
|
||||
def forwards(apps, schema_editor):
|
||||
apps.get_model("ai", "PromptTemplate").objects.filter(key__in=KEYS).update(ratio="16:9")
|
||||
|
||||
|
||||
def backwards(apps, schema_editor):
|
||||
apps.get_model("ai", "PromptTemplate").objects.filter(key__in=KEYS).update(ratio="landscape")
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [("ai", "0014_video_prompt_dialogue_no_meta")]
|
||||
|
||||
operations = [migrations.RunPython(forwards, backwards)]
|
||||
@@ -0,0 +1,18 @@
|
||||
from django.db import migrations
|
||||
|
||||
# 人物三视图 也改 16:9(1536x864)。0015 已处理场景/商品三视图,这里补人物三视图。
|
||||
|
||||
|
||||
def forwards(apps, schema_editor):
|
||||
apps.get_model("ai", "PromptTemplate").objects.filter(key="person_triview").update(ratio="16:9")
|
||||
|
||||
|
||||
def backwards(apps, schema_editor):
|
||||
apps.get_model("ai", "PromptTemplate").objects.filter(key="person_triview").update(ratio="landscape")
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [("ai", "0015_scene_product_16_9")]
|
||||
|
||||
operations = [migrations.RunPython(forwards, backwards)]
|
||||
Reference in New Issue
Block a user