Use configured H3 sampler capture directory

This commit is contained in:
Daniel Maddern 2026-08-13 14:07:28 +07:00
parent 663534f5dc
commit 9d463b0201

View file

@ -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"
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"
" os.makedirs(capture_dir, exist_ok=True)\n"
" torch.cuda.synchronize(x[\"x\"].device)\n"