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:
@@ -298,7 +298,9 @@ class JobManager:
|
||||
if not job.lora_path:
|
||||
return
|
||||
try:
|
||||
rel = published_relative_path(job.params["output_dir"], job.params["output_name"])
|
||||
rel = published_relative_path(
|
||||
job.params["output_dir"], job.params["output_name"], job.params.get("train_id")
|
||||
)
|
||||
dest = config.LORAS_PUBLISH_ROOT / rel
|
||||
dest.parent.mkdir(parents=True, exist_ok=True)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user