fix(music-lab): cache-buster query 제거 + DALL·E prompt에 background_keyword 활용
1. video.py _container_to_nas, orchestrator.py _local_path에서 path 변환 전 ?쿼리 strip — 이전 commit 20c5268의 cache-buster ?v=...가 Windows path로 그대로 전달되어 input_validation 실패하던 문제 픽스 2. cover.py _generate_with_dalle가 background_keyword를 prompt에 포함 — 사용자가 PipelineStartModal에서 '배경 키워드' 입력 시 처음부터 원하는 분위기 cover 생성
This commit is contained in:
@@ -94,7 +94,8 @@ async def generate(*, pipeline_id: int, genre: str, prompt_template: str,
|
||||
if api_key:
|
||||
try:
|
||||
await _generate_with_dalle(prompt_template, mood, feedback, out_path,
|
||||
api_key=api_key, model=model)
|
||||
api_key=api_key, model=model,
|
||||
background_keyword=background_keyword)
|
||||
except (httpx.HTTPError, httpx.TimeoutException, KeyError, ValueError, OSError) as e:
|
||||
logger.warning("DALL·E 실패 — 폴백: %s", e)
|
||||
error = str(e)
|
||||
@@ -114,8 +115,11 @@ async def generate(*, pipeline_id: int, genre: str, prompt_template: str,
|
||||
|
||||
async def _generate_with_dalle(prompt_template: str, mood: str,
|
||||
feedback: str, out_path: str,
|
||||
*, api_key: str, model: str) -> None:
|
||||
*, api_key: str, model: str,
|
||||
background_keyword: str = "") -> None:
|
||||
prompt = prompt_template
|
||||
if background_keyword:
|
||||
prompt = f"{prompt}, {background_keyword}" # 사용자 직접 지정 keyword 우선 적용
|
||||
if mood:
|
||||
prompt = f"{prompt}, {mood} mood"
|
||||
if feedback:
|
||||
|
||||
Reference in New Issue
Block a user