feat(lora-worker): add optional train_id to POST /train (explicit publish-path namespace)
comfy-dev's explicit-over-implicit call: arbo now sends train_id, so the
worker no longer derives the loras/trained/{train_id}/ namespace from
output_dir.parent (which coupled it to arbo's handoff layout). train_id is
optional + path-safe-validated; when present it wins, else the path
derivation remains as the fallback. Wired through TrainRequest ->
validate_request -> published_relative_path -> _publish_lora. 18 tests green.
This commit is contained in:
@@ -39,6 +39,7 @@ class TrainRequest(BaseModel):
|
||||
tier: str
|
||||
device_index: int = Field(ge=0, le=1)
|
||||
seed: int = Field(default=42, ge=0)
|
||||
train_id: str | None = None # Phase 2: arbo's id, the publish-path namespace (optional)
|
||||
|
||||
|
||||
@app.post("/train")
|
||||
|
||||
Reference in New Issue
Block a user