akhaliq HF Staff commited on
Commit
b1f5c81
·
verified ·
1 Parent(s): 58cb69f

eval_v7_job v3: eval armV7s1 in parallel with stage 2

Browse files
Files changed (1) hide show
  1. training/eval_v7_job.py +9 -9
training/eval_v7_job.py CHANGED
@@ -143,7 +143,7 @@ def main():
143
  loras = {
144
  "chinoll": hf_hub_download("chinoll/Moss-Image-Edit", "adapter_model.safetensors"),
145
  "armV5": hf_hub_download(REPO, "weights/armV5/armV5.safetensors"),
146
- "armV7": hf_hub_download(REPO, "weights/armV7/armV7.safetensors"),
147
  }
148
  results = {} # cand -> [PIL]
149
  for cand, path in loras.items():
@@ -166,8 +166,8 @@ def main():
166
  print(f"{cand} {name}: done", flush=True)
167
  results[cand] = outs
168
 
169
- # grid: rows=images, cols=source|chinoll|armV5|armV7 with prompts
170
- cands = ["chinoll", "armV5", "armV7"]
171
  tile_w = max(img.size[0] for _, _, img in items)
172
  tile_h = max(img.size[1] for _, _, img in items)
173
 
@@ -213,14 +213,14 @@ def main():
213
  buf = io.BytesIO(); results[c][i].save(buf, "JPEG", quality=92)
214
  api.upload_file(path_or_fileobj=buf.getvalue(), path_in_repo=f"{c}/{name}.jpg",
215
  repo_id=EVAL_DS, repo_type="dataset", commit_message=f"{c} {name}")
216
- # convert armV7 to ComfyUI moss-edit-lora format and push to repo root
217
  conv = hf_hub_download(REPO, "training/convert_to_moss_format.py")
218
- sh(f"{sys.executable} {conv} {loras['armV7']} {WORK}/armV7-moss-edit-lora.safetensors")
219
- api.upload_file(path_or_fileobj=f"{WORK}/armV7-moss-edit-lora.safetensors",
220
- path_in_repo="armV7-moss-edit-lora.safetensors",
221
  repo_id=REPO, repo_type="model",
222
- commit_message="armV7 in ComfyUI moss-edit-lora format")
223
- print("CONVERTED + PUSHED armV7-moss-edit-lora.safetensors", flush=True)
224
  print("REAL EVAL COMPLETE", flush=True)
225
 
226
 
 
143
  loras = {
144
  "chinoll": hf_hub_download("chinoll/Moss-Image-Edit", "adapter_model.safetensors"),
145
  "armV5": hf_hub_download(REPO, "weights/armV5/armV5.safetensors"),
146
+ "armV7s1": hf_hub_download(REPO, "weights/armV7s1/armV7s1.safetensors"),
147
  }
148
  results = {} # cand -> [PIL]
149
  for cand, path in loras.items():
 
166
  print(f"{cand} {name}: done", flush=True)
167
  results[cand] = outs
168
 
169
+ # grid: rows=images, cols=source|chinoll|armV5|armV7s1 with prompts
170
+ cands = ["chinoll", "armV5", "armV7s1"]
171
  tile_w = max(img.size[0] for _, _, img in items)
172
  tile_h = max(img.size[1] for _, _, img in items)
173
 
 
213
  buf = io.BytesIO(); results[c][i].save(buf, "JPEG", quality=92)
214
  api.upload_file(path_or_fileobj=buf.getvalue(), path_in_repo=f"{c}/{name}.jpg",
215
  repo_id=EVAL_DS, repo_type="dataset", commit_message=f"{c} {name}")
216
+ # convert armV7s1 to ComfyUI moss-edit-lora format and push to repo root
217
  conv = hf_hub_download(REPO, "training/convert_to_moss_format.py")
218
+ sh(f"{sys.executable} {conv} {loras['armV7s1']} {WORK}/armV7s1-moss-edit-lora.safetensors")
219
+ api.upload_file(path_or_fileobj=f"{WORK}/armV7s1-moss-edit-lora.safetensors",
220
+ path_in_repo="armV7s1-moss-edit-lora.safetensors",
221
  repo_id=REPO, repo_type="model",
222
+ commit_message="armV7s1 in ComfyUI moss-edit-lora format")
223
+ print("CONVERTED + PUSHED armV7s1-moss-edit-lora.safetensors", flush=True)
224
  print("REAL EVAL COMPLETE", flush=True)
225
 
226