auto-save 2026-05-18 07:22 (~2)
This commit is contained in:
21
api/main.py
21
api/main.py
@@ -1258,6 +1258,12 @@ SUBJECT_VIEW_LABELS: dict[str, str] = {
|
||||
"action_sit": "坐姿动作",
|
||||
"action_hold": "手持动作",
|
||||
"action_use": "使用动作",
|
||||
"bust_front": "肩颈半身正面近景",
|
||||
"bust_left_45": "肩颈左前 45° 近景",
|
||||
"bust_right_45": "肩颈右前 45° 近景",
|
||||
"back_neck_detail": "后颈/肩背特写",
|
||||
"bust": "半身近景",
|
||||
"back_detail": "背部特写",
|
||||
}
|
||||
|
||||
|
||||
@@ -1268,15 +1274,19 @@ def _subject_view_labels(kind: SubjectKind, requested: list[str] | None = None)
|
||||
key = "".join(ch for ch in str(raw).strip().lower() if ch.isalnum() or ch == "_")
|
||||
if key and key not in normalized:
|
||||
normalized.append(key)
|
||||
return [(key, SUBJECT_VIEW_LABELS.get(key, key.replace("_", " "))) for key in normalized[:12]]
|
||||
return [(key, SUBJECT_VIEW_LABELS.get(key, key.replace("_", " "))) for key in normalized[:10]]
|
||||
if kind == "living":
|
||||
return [
|
||||
("front", "正面站立"),
|
||||
("back", "背面站立"),
|
||||
("left", "左侧站立"),
|
||||
("right", "右侧站立"),
|
||||
("three_quarter_left", "左前 45° 站立"),
|
||||
("left", "左侧站立"),
|
||||
("back", "背面站立"),
|
||||
("right", "右侧站立"),
|
||||
("three_quarter_right", "右前 45° 站立"),
|
||||
("bust_front", "肩颈半身正面近景"),
|
||||
("bust_left_45", "肩颈左前 45° 近景"),
|
||||
("bust_right_45", "肩颈右前 45° 近景"),
|
||||
("back_neck_detail", "后颈/肩背特写"),
|
||||
]
|
||||
return [
|
||||
("front", "正面"),
|
||||
@@ -2616,7 +2626,7 @@ def _image_edit_call(
|
||||
models_cycle = [GPT_IMAGE_MODEL]
|
||||
model = GPT_IMAGE_MODEL
|
||||
image_paths = image_path if isinstance(image_path, list) else [image_path]
|
||||
image_paths = [path for path in image_paths if path and path.exists()][:6]
|
||||
image_paths = [path for path in image_paths if path and path.exists()][:10]
|
||||
if not image_paths:
|
||||
raise RuntimeError("image edit reference image missing")
|
||||
img_bytes_list = [_prepare_image_edit_bytes(path, max_side) for path in image_paths]
|
||||
@@ -3650,6 +3660,7 @@ class GenerateSubjectAssetsReq(BaseModel):
|
||||
size: AssetSize = "source"
|
||||
source_frame_indices: list[int] | None = None
|
||||
views: list[str] | None = None
|
||||
character_id: str = ""
|
||||
subject_style: Literal["transparent_human", "source_actor"] = "transparent_human"
|
||||
reconstruction_mode: Literal["same", "similar"] = "same"
|
||||
prompt: str = ""
|
||||
|
||||
Reference in New Issue
Block a user