auto-save 2026-05-13 00:28 (~4)
This commit is contained in:
@@ -597,7 +597,8 @@ def get_frame(job_id: str, idx: int):
|
||||
|
||||
class GenerateReq(BaseModel):
|
||||
prompt: str
|
||||
extra_prompt: str = ""
|
||||
extra_prompt: str = "" # ✓ 需要的元素(正向)
|
||||
negative_prompt: str = "" # ✗ 不需要的元素(负向)
|
||||
model: str = "" # 留空用 IMAGE_MODEL 默认
|
||||
mode: str = "edit" # "edit" 带参考图,"text" 纯文字
|
||||
|
||||
@@ -617,7 +618,9 @@ def generate_image(job_id: str, idx: int, req: GenerateReq) -> Job:
|
||||
|
||||
full_prompt = req.prompt.strip()
|
||||
if req.extra_prompt.strip():
|
||||
full_prompt = f"{full_prompt}. {req.extra_prompt.strip()}"
|
||||
full_prompt = f"{full_prompt}. Include: {req.extra_prompt.strip()}"
|
||||
if req.negative_prompt.strip():
|
||||
full_prompt = f"{full_prompt}. Do NOT include: {req.negative_prompt.strip()}. Output must be clean without any watermark, username text, or platform logo."
|
||||
if not full_prompt:
|
||||
raise HTTPException(400, "prompt required")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user