Run this model with HF Jobs

Run MATLOWAI/MOSS-Image-SFT-DeBand on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/MATLOWAI/MOSS-Image-SFT-DeBand. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/MATLOWAI/MOSS-Image-SFT-DeBand on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
matlod's picture
Add DeBand Strong, research write-up, comparison viewer and tools
e1a9442 verified
Raw History Blame Contribute Delete
1.3 kB
#!/usr/bin/env python3
"""Every few minutes, score drift arms whose render count changed and rebuild compare_solve.html. Stops when the queue is empty.
comfyui_venv/bin/python workflows/moss/auto_score.py arm [arm ...]
"""
import glob, json, os, subprocess, sys, time, urllib.request
HERE = os.path.dirname(os.path.abspath(__file__))
D = os.path.join(HERE, "..", "..", "output", "moss", "drift")
PY = sys.executable
arms, seen = sys.argv[1:], {}
def queue_empty():
try:
q = json.load(urllib.request.urlopen("http://127.0.0.1:8188/queue"))
except OSError: # server restarting
return False
return not q["queue_running"] and not q["queue_pending"]
while True:
last = queue_empty()
changed = [a for a in arms if len(glob.glob(os.path.join(D, a, "*.png"))) != seen.get(a, 0)]
for a in changed:
seen[a] = len(glob.glob(os.path.join(D, a, "*.png")))
if changed:
out = subprocess.run([PY, os.path.join(HERE, "drift_score.py"), "sft", *changed], capture_output=True, text=True).stdout
print(time.strftime("%H:%M"), "\n".join(l for l in out.splitlines() if l.startswith(("===", " solid", " people"))), flush=True)
subprocess.run([PY, os.path.join(HERE, "build_compare.py")])
if last:
break
time.sleep(600)