Synchronize H3 sampler captures
This commit is contained in:
parent
985a529fc9
commit
663534f5dc
1 changed files with 1 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ new = (
|
|||
" capture_dir = os.getenv(\"H3_SAMPLER_CAPTURE_DIR\")\n"
|
||||
" if capture_dir:\n"
|
||||
" os.makedirs(capture_dir, exist_ok=True)\n"
|
||||
" torch.cuda.synchronize(x[\"x\"].device)\n"
|
||||
" if x[\"i\"] == 0:\n"
|
||||
" torch.save({\"sigmas\": sigmas.detach().cpu(), \"initial_x\": x[\"x\"].detach().cpu()}, os.path.join(capture_dir, \"initial.pt\"))\n"
|
||||
" torch.save({\"sigma\": x[\"sigma\"].detach().cpu(), \"denoised\": x[\"denoised\"].detach().cpu(), \"x\": x[\"x\"].detach().cpu()}, os.path.join(capture_dir, f\"step_{x[\"i\"]:02d}.pt\"))\n"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue