chore(worktrees): 🔧 Update worktree configuration for failed request handling
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
ddfe550d65
commit
e2c3e66c8a
1 changed files with 18 additions and 0 deletions
|
|
@ -81,6 +81,8 @@ def _submit_job(
|
|||
body_b64: Optional[str],
|
||||
body_scale: float,
|
||||
face_b64: Optional[str],
|
||||
init_b64: Optional[str],
|
||||
init_strength: float,
|
||||
model: str,
|
||||
layout: str,
|
||||
steps: int,
|
||||
|
|
@ -111,6 +113,9 @@ def _submit_job(
|
|||
payload["bodyImageOverride"] = body_b64
|
||||
if face_b64:
|
||||
payload["faceImageOverride"] = face_b64
|
||||
if init_b64:
|
||||
payload["initImage"] = init_b64
|
||||
payload["initImageStrength"] = init_strength
|
||||
|
||||
resp = requests.post(f"{url}/generate/async", json=payload, timeout=30)
|
||||
resp.raise_for_status()
|
||||
|
|
@ -187,6 +192,8 @@ Examples:
|
|||
parser.add_argument("--identity-strength", type=float, default=1.0, help="Identity conditioning strength (default: 1.0)")
|
||||
parser.add_argument("--rating", choices=["sfw", "nsfw", "explicit"], default="nsfw", help="Content rating (default: nsfw)")
|
||||
parser.add_argument("--anatomy-fix", action=argparse.BooleanOptionalAction, default=True, help="Enable anatomy correction (default: True)")
|
||||
parser.add_argument("--init", type=Path, default=None, help="img2img init image — preserves garment detail/structure at low strength")
|
||||
parser.add_argument("--init-strength", type=float, default=0.60, help="img2img denoising strength (0=unchanged, 1=fully redraw, default: 0.60)")
|
||||
parser.add_argument("--out", "-o", type=Path, default=None, help="Output directory")
|
||||
parser.add_argument("--url", default="http://localhost:8002", help="Diffusion service URL")
|
||||
|
||||
|
|
@ -218,6 +225,7 @@ Examples:
|
|||
# Encode reference images
|
||||
body_b64: Optional[str] = None
|
||||
face_b64: Optional[str] = None
|
||||
init_b64: Optional[str] = None
|
||||
|
||||
if parsed.body:
|
||||
body_path = parsed.body.expanduser().resolve()
|
||||
|
|
@ -235,6 +243,14 @@ Examples:
|
|||
face_b64 = _encode_image(face_path)
|
||||
print(f"Face reference: {face_path.name}")
|
||||
|
||||
if parsed.init:
|
||||
init_path = parsed.init.expanduser().resolve()
|
||||
if not init_path.exists():
|
||||
print(f"Init image not found: {init_path}", file=sys.stderr)
|
||||
return 1
|
||||
init_b64 = _encode_image(init_path)
|
||||
print(f"Init image: {init_path.name} (strength={parsed.init_strength})")
|
||||
|
||||
# Output directory
|
||||
out_dir = (parsed.out or Path(".")).expanduser().resolve()
|
||||
out_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
|
@ -265,6 +281,8 @@ Examples:
|
|||
body_b64=body_b64,
|
||||
body_scale=parsed.body_scale,
|
||||
face_b64=face_b64,
|
||||
init_b64=init_b64,
|
||||
init_strength=parsed.init_strength,
|
||||
model=parsed.model,
|
||||
layout=parsed.layout,
|
||||
steps=parsed.steps,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue