fix(mflux_image_edit): fleet-standard LoRA stash path
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
eed95c45f6
commit
8c63e21df7
@ -42,7 +42,7 @@
|
|||||||
"loras": {
|
"loras": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "Qwen-Edit LoRAs, comma-separated 'name' or 'name:scale' (e.g. 'qwen-studio-realism:0.8,gymnast'). Resolved from ~/Documents/localmodels/qwen-loras (mirror of ultra civit/_parked-qwen). Wrong-base LoRAs are silent no-ops."
|
"description": "Qwen-Edit LoRAs, comma-separated 'name' or 'name:scale' (e.g. 'qwen-studio-realism:0.8,gymnast'). Resolved from ~/Documents/localmodels/QwenLora on both mflux nodes (QWEN_LORA_DIRS overrides). Wrong-base LoRAs are silent no-ops."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -35,13 +36,20 @@ cmd = [str(cli), "--image-paths", *[str(Path(x).resolve()) for x in a.input],
|
|||||||
"--output", str(out.resolve())]
|
"--output", str(out.resolve())]
|
||||||
|
|
||||||
# Qwen-Edit LoRAs: "name" or "name:scale", comma-separated. Names resolve
|
# Qwen-Edit LoRAs: "name" or "name:scale", comma-separated. Names resolve
|
||||||
# (case-insensitive prefix match) against ~/Documents/localmodels/qwen-loras,
|
# (case-insensitive prefix match) against the fleet-standard stash, which is
|
||||||
# which mirrors ultra's civit/_parked-qwen stash. mflux natively takes
|
# present on BOTH mflux nodes (m3ultra + ultra) — a job can dispatch to either,
|
||||||
# --lora-paths/--lora-scales; a LoRA for the wrong base is a silent no-op.
|
# so a node-local dir would resolve on one and fail on the other.
|
||||||
LORA_DIR = Path.home() / "Documents" / "localmodels" / "qwen-loras"
|
# mflux natively takes --lora-paths/--lora-scales; a LoRA for the wrong base
|
||||||
|
# model is a SILENT no-op (no error, the edit just ignores it).
|
||||||
|
LORA_DIRS = [Path(d).expanduser() for d in
|
||||||
|
(os.environ.get("QWEN_LORA_DIRS") or "").split(os.pathsep) if d.strip()] \
|
||||||
|
or [Path.home() / "Documents" / "localmodels" / "QwenLora"]
|
||||||
if p.get("loras"):
|
if p.get("loras"):
|
||||||
paths, scales = [], []
|
paths, scales = [], []
|
||||||
avail = {f.name.lower(): f for f in LORA_DIR.rglob("*.safetensors")}
|
avail = {}
|
||||||
|
for d in LORA_DIRS:
|
||||||
|
for f in d.rglob("*.safetensors"):
|
||||||
|
avail.setdefault(f.name.lower(), f)
|
||||||
for item in str(p["loras"]).split(","):
|
for item in str(p["loras"]).split(","):
|
||||||
item = item.strip()
|
item = item.strip()
|
||||||
if not item:
|
if not item:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user