Use configured H3 sampler capture directory
This commit is contained in:
parent
663534f5dc
commit
9d463b0201
1 changed files with 1 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ if "import os\n" not in source:
|
||||||
|
|
||||||
old = " if callback is not None:\n callback(x[\"i\"], x[\"denoised\"], x[\"x\"], total_steps)\n"
|
old = " if callback is not None:\n callback(x[\"i\"], x[\"denoised\"], x[\"x\"], total_steps)\n"
|
||||||
new = (
|
new = (
|
||||||
" capture_dir = os.getenv(\"H3_SAMPLER_CAPTURE_DIR\")\n"
|
" capture_dir = os.getenv(\"H3_SAMPLER_CAPTURE_DIR\") or os.getenv(\"H3_CAPTURE_DIR\")\n"
|
||||||
" if capture_dir:\n"
|
" if capture_dir:\n"
|
||||||
" os.makedirs(capture_dir, exist_ok=True)\n"
|
" os.makedirs(capture_dir, exist_ok=True)\n"
|
||||||
" torch.cuda.synchronize(x[\"x\"].device)\n"
|
" torch.cuda.synchronize(x[\"x\"].device)\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue