[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-nvidia-nv-generate-mr-brain-finetune":3,"mdc-vcfs38-key":34,"related-org-nvidia-nv-generate-mr-brain-finetune":2895,"related-repo-nvidia-nv-generate-mr-brain-finetune":3053},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"nv-generate-mr-brain-finetune","finetune MR brain diffusion models","Used for finetuning NV-Generate-CTMR MR-brain diffusion UNet from a NIfTI datalist. Not for clinical or production data approval.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"nvidia","NVIDIA","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fnvidia.png",[12,16,19,20],{"name":13,"slug":14,"type":15},"Machine Learning","machine-learning","tag",{"name":17,"slug":18,"type":15},"Medical Necessity","medical-necessity",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"Imaging","imaging",2473,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fskills","2026-07-14T05:30:08.312753","Apache-2.0",281,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"AI agent skills published by NVIDIA","https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fnv-generate-mr-brain-finetune","---\nname: nv-generate-mr-brain-finetune\ndescription: Used for finetuning NV-Generate-CTMR MR-brain diffusion UNet from a NIfTI datalist. Not for clinical or production data approval.\nlicense: Apache-2.0\nallowed-tools: Bash\nmetadata:\n  author: NVIDIA MedTech Team\n  tags:\n    - MedTech\n    - MRI\n    - brain\n    - finetune\n---\n\n# NV-Generate-MR-Brain-Finetune\n\n## Purpose\n- Used for finetuning the NV-Generate-CTMR `rflow-mr-brain` diffusion UNet from user-supplied NIfTI training volumes.\n- Not for clinical interpretation, regulatory use, or approving synthetic data for production training.\n- The wrapper stages the config glue locally and delegates execution to existing upstream scripts: `scripts.diff_model_create_training_data`, `scripts.diff_model_train`, and optionally `scripts.diff_model_infer`. It does not execute the notebook.\n- Manifest I\u002FO: inputs are `datalist` and `data_base_dir`; outputs are `finetuned_checkpoint`, optional `inference_outputs`, and `result_json`.\n- The underlying training contract is the upstream config\u002Fenv JSON (the same one driven from cell `[10]` of `train_diff_unet_tutorial.ipynb`). The wrapper stages those JSON files for you and exposes the most-tuned fields as CLI flags; the sections below document the fields, their defaults, and how to monitor\u002Ftune a run.\n\n## Instructions\n- Read `skill_manifest.yaml` before changing arguments, side effects, or validation gates.\n- Run `scripts\u002Frun_mr_brain_finetune.py` from the Medical AI Skills repo root.\n- If a host agent exposes `run_script`, use `run_script(\"scripts\u002Frun_mr_brain_finetune.py\", args=[...])`; otherwise run the Bash\u002FPython command below.\n- Use `--preflight` first when checking a new datalist; remove `--preflight` only when the user explicitly wants to launch GPU finetuning.\n- For a staged preflight input bundle directory, use `BUNDLE\u002Fpreflight_datalist.json` as the datalist and `BUNDLE\u002Fpreflight_dataset` as `--data-base-dir` when those files are present.\n\n## Examples\n\nValidate and stage a preflight finetune check from an input bundle (the recommended first step — no GPU, no training). This is the single canonical command; replace `INPUT_BUNDLE` and `OUT_DIR` with your paths:\n\n```bash\nexport NV_GENERATE_ROOT=\"${NV_GENERATE_ROOT:-$HOME\u002F.cache\u002Fnvidia-skills\u002Fupstreams\u002FNV-Generate-CTMR-61c4ec7}\" && \\\npython skills\u002Fnv-generate-mr-brain-finetune\u002Fscripts\u002Frun_mr_brain_finetune.py \\\n  INPUT_BUNDLE\u002Fpreflight_datalist.json \\\n  --data-base-dir INPUT_BUNDLE\u002Fpreflight_dataset \\\n  --output-dir OUT_DIR \\\n  --modality mri_t1 \\\n  --preflight\n```\n\nFor real GPU finetuning and other variations, see [Usage](#2-usage-one-line-training) below.\n\n## Available Scripts\n| Script | Purpose | Arguments |\n|---|---|---|\n| `scripts\u002Frun_mr_brain_finetune.py` | Primary entrypoint declared by `skill_manifest.yaml`. | `DATALIST.json --data-base-dir DATA_DIR --output-dir OUT_DIR [--epochs N] [--modality mri_t1] [--num-gpus N] [--no-amp] [--model-config FILE] [--run-inference] [--preflight]` |\n\n## Prerequisites\n- An explicit `NV_GENERATE_ROOT` may point to the caller's local checkout and\n  must contain `scripts\u002Fdiff_model_create_training_data.py`,\n  `scripts\u002Fdiff_model_train.py`, and `scripts\u002Fdiff_model_infer.py`. The result\n  records its current commit.\n- If `NV_GENERATE_ROOT` is unset, the wrapper searches `.workbench_data\u002Fupstreams\u002FNV-Generate-CTMR`.\n- `CUDA_VISIBLE_DEVICES` is optional and can be used to select the GPU for real training.\n- Runtime requirements: NVIDIA CUDA GPU for real training, Python packages from the upstream `requirements.txt`, and downloaded MR-brain weights.\n- Side effects: writes staged configs, embeddings, checkpoints, optional inference images, and logs under the caller-provided `--output-dir`; may write model caches under the upstream checkout and `~\u002F.cache\u002Fhuggingface\u002F`; may contact `https:\u002F\u002Fhuggingface.co` for model assets and `https:\u002F\u002Fgithub.com` for the upstream checkout.\n- The datalist is a MONAI-style JSON object with `training[].image` paths relative to `--data-base-dir`. `training[].modality` is optional and defaults to `mri_t1`.\n\nWhen no local checkout is supplied, create the recommended pinned default\ncheckout once:\n\n```bash\nif [ -z \"${NV_GENERATE_ROOT:-}\" ]; then\n  export NV_GENERATE_COMMIT=61c4ec709b84cad468852243c48e250bec732074\n  export NV_GENERATE_ROOT=\"$HOME\u002F.cache\u002Fnvidia-skills\u002Fupstreams\u002FNV-Generate-CTMR-61c4ec7\"\n  if [ ! -d \"$NV_GENERATE_ROOT\u002F.git\" ]; then\n    git clone https:\u002F\u002Fgithub.com\u002FNVIDIA-Medtech\u002FNV-Generate-CTMR.git \"$NV_GENERATE_ROOT\"\n    git -C \"$NV_GENERATE_ROOT\" checkout --detach \"$NV_GENERATE_COMMIT\"\n  fi\nfi\n```\n\n## 1. Config and environment JSON (adapt to your data)\n\nThis is a thin wrapper around the upstream `train_diff_unet_tutorial.ipynb` flow. Each run performs four steps, delegating the heavy lifting to the model author's scripts:\n\n1. **Stage configs** — copy the three config JSONs and rewrite only the run-specific paths and `n_epochs` (notebook cell 15).\n2. `python -m scripts.diff_model_create_training_data` → latent `*_emb.nii.gz` embeddings (cell 17).\n3. **Write embedding sidecars** — a `\u003Cemb>.nii.gz.json` per embedding with `spacing`\u002F`modality` (and body-region indices when the model uses them). This is the one piece of glue that lives in the notebook (cell 19), not in upstream `scripts\u002F`, and `diff_model_train` requires it; the skill owns it.\n4. `python -m scripts.diff_model_train` (cell 21), optionally `python -m scripts.diff_model_infer`.\n\n**Tune by editing the config JSON, not by adding flags.** All training\u002Finference hyperparameters (`lr`, `batch_size`, `cache_rate`, inference `dim`\u002F`spacing`\u002F`num_inference_steps`\u002F`cfg_guidance_scale`, …) live in `config_maisi_diff_model_rflow-mr-brain.json`. Edit the upstream copy, or pass your own with `--model-config FILE` (and `--env-config` \u002F `--model-def` for the other two). The wrapper only ever rewrites the fields below.\n\nEnvironment JSON (`environment_maisi_diff_model_rflow-mr-brain.json`) — fields the wrapper rewrites per run:\n\n| Field | Set from | Notes |\n|---|---|---|\n| `data_base_dir` | `--data-base-dir` | Root for relative `training[].image` paths. |\n| `json_data_list` | your datalist | Staged copy with per-entry `modality` filled in. |\n| `embedding_base_dir`, `model_dir`, `output_dir` | `--output-dir` | Latent embeddings, checkpoints, inference images. |\n| `modality_mapping_path` | upstream | Maps modality name → integer code. |\n| `model_filename` | `--model-filename` | Output checkpoint name (default `diff_unet_3d_rflow-mr-brain_v0.pt`). |\n| `existing_ckpt_filepath` | upstream weights \u002F `--existing-ckpt-filepath` | Starting checkpoint; cleared by `--train-from-scratch`. |\n| `trained_autoencoder_path` | upstream weights \u002F `--trained-autoencoder-path` | VAE used to encode\u002Fdecode latents. |\n\nModel config (`config_maisi_diff_model_rflow-mr-brain.json`) — the only fields the wrapper touches:\n\n| Field | Set from | Default | Notes |\n|---|---|---|---|\n| `diffusion_unet_train.n_epochs` | `--epochs` | `2` (upstream config ships `1000`) | Convenience override (cell 15 does the same); wrapper default is small for verification. |\n| `diffusion_unet_inference.modality` | `--modality` | from `modality_mapping.json` | Kept consistent with the training modality for optional `--run-inference`. |\n\nEverything else in that file (`lr`, `batch_size`, `cache_rate`, the rest of `diffusion_unet_inference`) is left exactly as written — edit the JSON to change it.\n\nRuntime flags (not config fields): `--num-gpus N` (`>1` launches `torch.distributed.run`), `--no-amp` (disable mixed precision, passed through to `diff_model_train`).\n\n`--modality` selects the integer code from `configs\u002Fmodality_mapping.json`. Supported brain values: `mri` (8), `mri_t1` (9, default), `mri_t2` (10), `mri_flair` (11), `mri_swi` (20), and their `*_skull_stripped` variants (29\u002F30\u002F31\u002F32). Per-case `training[].modality` overrides `--modality`. The modality also feeds the step-3 embedding sidecars.\n\nFor an end-to-end reference including example data download and checkpoint loading, see the upstream tutorial `train_diff_unet_tutorial.ipynb`.\n\n## 2. Usage (one-line training)\n\nPreflight only:\n\n```bash\nexport NV_GENERATE_ROOT=\"${NV_GENERATE_ROOT:-$HOME\u002F.cache\u002Fnvidia-skills\u002Fupstreams\u002FNV-Generate-CTMR-61c4ec7}\" && \\\npython skills\u002Fnv-generate-mr-brain-finetune\u002Fscripts\u002Frun_mr_brain_finetune.py \\\n  PATH_TO_DATALIST.json \\\n  --data-base-dir PATH_TO_DATA_ROOT \\\n  --output-dir runs\u002Fnv_generate_mr_brain_finetune_preflight \\\n  --preflight\n```\n\nPreflight bundle input:\n\n```bash\nexport NV_GENERATE_ROOT=\"${NV_GENERATE_ROOT:-$HOME\u002F.cache\u002Fnvidia-skills\u002Fupstreams\u002FNV-Generate-CTMR-61c4ec7}\" && \\\npython skills\u002Fnv-generate-mr-brain-finetune\u002Fscripts\u002Frun_mr_brain_finetune.py \\\n  PATH_TO_INPUT_BUNDLE\u002Fpreflight_datalist.json \\\n  --data-base-dir PATH_TO_INPUT_BUNDLE\u002Fpreflight_dataset \\\n  --output-dir runs\u002Fnv_generate_mr_brain_finetune_preflight \\\n  --preflight\n```\n\nGPU finetuning:\n\n```bash\nexport NV_GENERATE_ROOT=\"${NV_GENERATE_ROOT:-$HOME\u002F.cache\u002Fnvidia-skills\u002Fupstreams\u002FNV-Generate-CTMR-61c4ec7}\" && \\\npython -m pip install -r \"$NV_GENERATE_ROOT\u002Frequirements.txt\" && \\\npython skills\u002Fnv-generate-mr-brain-finetune\u002Fscripts\u002Frun_mr_brain_finetune.py \\\n  PATH_TO_DATALIST.json \\\n  --data-base-dir PATH_TO_DATA_ROOT \\\n  --output-dir runs\u002Fnv_generate_mr_brain_finetune \\\n  --epochs 2 \\\n  --modality mri_t1 \\\n  --run-inference\n```\n\nReplace `PATH_TO_DATALIST.json` and `PATH_TO_DATA_ROOT` with the user's actual paths. Do not use the fixture datalist for real training; it is a preflight-only placeholder.\n\n## 3. Monitor training (TensorBoard)\n\n`scripts.diff_model_train` writes TensorBoard event files under the staged `model_dir` (`OUT_DIR\u002Fartifacts\u002Fmodels`). Launch TensorBoard against the output directory and watch the loss curve:\n\n```bash\npython -m pip install tensorboard && \\\ntensorboard --logdir runs\u002Fnv_generate_mr_brain_finetune\u002Fartifacts\n```\n\nThe run summary is written to `OUT_DIR\u002Fartifacts\u002Fworkflow_summary.json` (checkpoint path, embedding sidecars, inference outputs); the JSON the wrapper prints to stdout mirrors the same paths plus `exit_code` and a `stderr_tail` for quick triage.\n\n## 4. Hyperparameter tuning and common pitfalls\n\n- **Loss not decreasing \u002F unstable** — lower `diffusion_unet_train.lr` (default `1e-5`) in the model-config JSON, or keep AMP on (default); `--no-amp` is slower but more numerically stable on older GPUs.\n- **Out-of-memory** — keep `diffusion_unet_train.batch_size` at `1` and `cache_rate` at `0` in the config JSON, and confirm the autoencoder\u002FUNet fit your GPU before scaling. Multi-GPU (`--num-gpus N`) shards the batch via `torch.distributed.run`.\n- **Few cases \u002F quick check** — keep `--epochs` small (the wrapper default `2` is for verification, not convergence; the upstream config ships `1000`).\n- **Wrong modality conditioning** — set `--modality` or per-case `training[].modality` to a value present in `configs\u002Fmodality_mapping.json`; a mismatch produces a clear error rather than silently mislabeling latents.\n- **Slow startup on first run** — `diff_model_create_training_data` precomputes latent embeddings once; reuse the same `--output-dir` to avoid recomputing them.\n\n## 5. Evaluate the finetuned model\n\nUse the staged checkpoint (`OUT_DIR\u002Fartifacts\u002Fmodels\u002F\u003Cmodel_filename>`) as the diffusion UNet for generation, then inspect the synthesized volumes:\n\n- Pass `--run-inference` here for a quick built-in sanity render, or\n- Point the [`nv-generate-mr-brain`](..\u002Fnv-generate-mr-brain\u002FSKILL.md) inference skill at the finetuned checkpoint to generate fresh brain MRI volumes for qualitative review.\n\nThis skill gates file accounting and command provenance only — anatomical realism and downstream utility must be judged by a domain expert on the generated images.\n\n## Limitations\n- Requires a current upstream `NV-Generate-CTMR` checkout with the existing diffusion training scripts. The skill itself stages the required config and datalist glue locally and does not depend on the notebook or PR #33.\n- Full training can be expensive and is not deterministic across hardware, CUDA, and package versions.\n- The wrapper gates file accounting and command provenance, not anatomical realism or downstream model utility.\n- Not for clinical deployment, clinical interpretation, autonomous diagnosis, regulatory submission, or production training-data approval.\n\n## Troubleshooting\n| Error | Cause | Fix |\n|---|---|---|\n| `diffusion training scripts were not found` | `NV_GENERATE_ROOT` does not point at a current NV-Generate-CTMR checkout. | Clone or update `https:\u002F\u002Fgithub.com\u002FNVIDIA-Medtech\u002FNV-Generate-CTMR` and set `NV_GENERATE_ROOT`. |\n| `missing datalist image` | `training[].image` paths are not relative to `--data-base-dir` or files are absent. | Fix the datalist or pass the correct data root. |\n| CUDA or MONAI import failure | Runtime environment lacks upstream dependencies. | Install `\"$NV_GENERATE_ROOT\u002Frequirements.txt\"` in the selected environment. |\n",{"data":35,"body":44},{"name":4,"description":6,"license":26,"allowed-tools":36,"metadata":37},"Bash",{"author":38,"tags":39},"NVIDIA MedTech Team",[40,41,42,43],"MedTech","MRI","brain","finetune",{"type":45,"children":46},"root",[47,55,62,181,187,286,292,313,520,534,540,603,609,762,767,1016,1022,1034,1142,1234,1247,1491,1503,1621,1653,1696,1775,1786,1792,1797,1949,1954,2105,2110,2347,2367,2373,2397,2454,2483,2489,2662,2668,2681,2713,2718,2724,2755,2761,2889],{"type":48,"tag":49,"props":50,"children":51},"element","h1",{"id":4},[52],{"type":53,"value":54},"text","NV-Generate-MR-Brain-Finetune",{"type":48,"tag":56,"props":57,"children":59},"h2",{"id":58},"purpose",[60],{"type":53,"value":61},"Purpose",{"type":48,"tag":63,"props":64,"children":65},"ul",{},[66,81,86,115,160],{"type":48,"tag":67,"props":68,"children":69},"li",{},[70,72,79],{"type":53,"value":71},"Used for finetuning the NV-Generate-CTMR ",{"type":48,"tag":73,"props":74,"children":76},"code",{"className":75},[],[77],{"type":53,"value":78},"rflow-mr-brain",{"type":53,"value":80}," diffusion UNet from user-supplied NIfTI training volumes.",{"type":48,"tag":67,"props":82,"children":83},{},[84],{"type":53,"value":85},"Not for clinical interpretation, regulatory use, or approving synthetic data for production training.",{"type":48,"tag":67,"props":87,"children":88},{},[89,91,97,99,105,107,113],{"type":53,"value":90},"The wrapper stages the config glue locally and delegates execution to existing upstream scripts: ",{"type":48,"tag":73,"props":92,"children":94},{"className":93},[],[95],{"type":53,"value":96},"scripts.diff_model_create_training_data",{"type":53,"value":98},", ",{"type":48,"tag":73,"props":100,"children":102},{"className":101},[],[103],{"type":53,"value":104},"scripts.diff_model_train",{"type":53,"value":106},", and optionally ",{"type":48,"tag":73,"props":108,"children":110},{"className":109},[],[111],{"type":53,"value":112},"scripts.diff_model_infer",{"type":53,"value":114},". It does not execute the notebook.",{"type":48,"tag":67,"props":116,"children":117},{},[118,120,126,128,134,136,142,144,150,152,158],{"type":53,"value":119},"Manifest I\u002FO: inputs are ",{"type":48,"tag":73,"props":121,"children":123},{"className":122},[],[124],{"type":53,"value":125},"datalist",{"type":53,"value":127}," and ",{"type":48,"tag":73,"props":129,"children":131},{"className":130},[],[132],{"type":53,"value":133},"data_base_dir",{"type":53,"value":135},"; outputs are ",{"type":48,"tag":73,"props":137,"children":139},{"className":138},[],[140],{"type":53,"value":141},"finetuned_checkpoint",{"type":53,"value":143},", optional ",{"type":48,"tag":73,"props":145,"children":147},{"className":146},[],[148],{"type":53,"value":149},"inference_outputs",{"type":53,"value":151},", and ",{"type":48,"tag":73,"props":153,"children":155},{"className":154},[],[156],{"type":53,"value":157},"result_json",{"type":53,"value":159},".",{"type":48,"tag":67,"props":161,"children":162},{},[163,165,171,173,179],{"type":53,"value":164},"The underlying training contract is the upstream config\u002Fenv JSON (the same one driven from cell ",{"type":48,"tag":73,"props":166,"children":168},{"className":167},[],[169],{"type":53,"value":170},"[10]",{"type":53,"value":172}," of ",{"type":48,"tag":73,"props":174,"children":176},{"className":175},[],[177],{"type":53,"value":178},"train_diff_unet_tutorial.ipynb",{"type":53,"value":180},"). The wrapper stages those JSON files for you and exposes the most-tuned fields as CLI flags; the sections below document the fields, their defaults, and how to monitor\u002Ftune a run.",{"type":48,"tag":56,"props":182,"children":184},{"id":183},"instructions",[185],{"type":53,"value":186},"Instructions",{"type":48,"tag":63,"props":188,"children":189},{},[190,203,216,237,257],{"type":48,"tag":67,"props":191,"children":192},{},[193,195,201],{"type":53,"value":194},"Read ",{"type":48,"tag":73,"props":196,"children":198},{"className":197},[],[199],{"type":53,"value":200},"skill_manifest.yaml",{"type":53,"value":202}," before changing arguments, side effects, or validation gates.",{"type":48,"tag":67,"props":204,"children":205},{},[206,208,214],{"type":53,"value":207},"Run ",{"type":48,"tag":73,"props":209,"children":211},{"className":210},[],[212],{"type":53,"value":213},"scripts\u002Frun_mr_brain_finetune.py",{"type":53,"value":215}," from the Medical AI Skills repo root.",{"type":48,"tag":67,"props":217,"children":218},{},[219,221,227,229,235],{"type":53,"value":220},"If a host agent exposes ",{"type":48,"tag":73,"props":222,"children":224},{"className":223},[],[225],{"type":53,"value":226},"run_script",{"type":53,"value":228},", use ",{"type":48,"tag":73,"props":230,"children":232},{"className":231},[],[233],{"type":53,"value":234},"run_script(\"scripts\u002Frun_mr_brain_finetune.py\", args=[...])",{"type":53,"value":236},"; otherwise run the Bash\u002FPython command below.",{"type":48,"tag":67,"props":238,"children":239},{},[240,242,248,250,255],{"type":53,"value":241},"Use ",{"type":48,"tag":73,"props":243,"children":245},{"className":244},[],[246],{"type":53,"value":247},"--preflight",{"type":53,"value":249}," first when checking a new datalist; remove ",{"type":48,"tag":73,"props":251,"children":253},{"className":252},[],[254],{"type":53,"value":247},{"type":53,"value":256}," only when the user explicitly wants to launch GPU finetuning.",{"type":48,"tag":67,"props":258,"children":259},{},[260,262,268,270,276,278,284],{"type":53,"value":261},"For a staged preflight input bundle directory, use ",{"type":48,"tag":73,"props":263,"children":265},{"className":264},[],[266],{"type":53,"value":267},"BUNDLE\u002Fpreflight_datalist.json",{"type":53,"value":269}," as the datalist and ",{"type":48,"tag":73,"props":271,"children":273},{"className":272},[],[274],{"type":53,"value":275},"BUNDLE\u002Fpreflight_dataset",{"type":53,"value":277}," as ",{"type":48,"tag":73,"props":279,"children":281},{"className":280},[],[282],{"type":53,"value":283},"--data-base-dir",{"type":53,"value":285}," when those files are present.",{"type":48,"tag":56,"props":287,"children":289},{"id":288},"examples",[290],{"type":53,"value":291},"Examples",{"type":48,"tag":293,"props":294,"children":295},"p",{},[296,298,304,305,311],{"type":53,"value":297},"Validate and stage a preflight finetune check from an input bundle (the recommended first step — no GPU, no training). This is the single canonical command; replace ",{"type":48,"tag":73,"props":299,"children":301},{"className":300},[],[302],{"type":53,"value":303},"INPUT_BUNDLE",{"type":53,"value":127},{"type":48,"tag":73,"props":306,"children":308},{"className":307},[],[309],{"type":53,"value":310},"OUT_DIR",{"type":53,"value":312}," with your paths:",{"type":48,"tag":314,"props":315,"children":320},"pre",{"className":316,"code":317,"language":318,"meta":319,"style":319},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export NV_GENERATE_ROOT=\"${NV_GENERATE_ROOT:-$HOME\u002F.cache\u002Fnvidia-skills\u002Fupstreams\u002FNV-Generate-CTMR-61c4ec7}\" && \\\npython skills\u002Fnv-generate-mr-brain-finetune\u002Fscripts\u002Frun_mr_brain_finetune.py \\\n  INPUT_BUNDLE\u002Fpreflight_datalist.json \\\n  --data-base-dir INPUT_BUNDLE\u002Fpreflight_dataset \\\n  --output-dir OUT_DIR \\\n  --modality mri_t1 \\\n  --preflight\n","bash","",[321],{"type":48,"tag":73,"props":322,"children":323},{"__ignoreMap":319},[324,425,444,457,475,493,511],{"type":48,"tag":325,"props":326,"children":329},"span",{"class":327,"line":328},"line",1,[330,336,342,348,353,358,363,368,373,378,383,387,392,396,401,405,410,415,420],{"type":48,"tag":325,"props":331,"children":333},{"style":332},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[334],{"type":53,"value":335},"export",{"type":48,"tag":325,"props":337,"children":339},{"style":338},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[340],{"type":53,"value":341}," NV_GENERATE_ROOT",{"type":48,"tag":325,"props":343,"children":345},{"style":344},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[346],{"type":53,"value":347},"=",{"type":48,"tag":325,"props":349,"children":350},{"style":344},[351],{"type":53,"value":352},"\"${",{"type":48,"tag":325,"props":354,"children":355},{"style":338},[356],{"type":53,"value":357},"NV_GENERATE_ROOT",{"type":48,"tag":325,"props":359,"children":360},{"style":344},[361],{"type":53,"value":362},":-",{"type":48,"tag":325,"props":364,"children":365},{"style":338},[366],{"type":53,"value":367},"$HOME",{"type":48,"tag":325,"props":369,"children":370},{"style":344},[371],{"type":53,"value":372},"\u002F",{"type":48,"tag":325,"props":374,"children":376},{"style":375},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[377],{"type":53,"value":159},{"type":48,"tag":325,"props":379,"children":380},{"style":338},[381],{"type":53,"value":382},"cache",{"type":48,"tag":325,"props":384,"children":385},{"style":344},[386],{"type":53,"value":372},{"type":48,"tag":325,"props":388,"children":389},{"style":338},[390],{"type":53,"value":391},"nvidia-skills",{"type":48,"tag":325,"props":393,"children":394},{"style":344},[395],{"type":53,"value":372},{"type":48,"tag":325,"props":397,"children":398},{"style":338},[399],{"type":53,"value":400},"upstreams",{"type":48,"tag":325,"props":402,"children":403},{"style":344},[404],{"type":53,"value":372},{"type":48,"tag":325,"props":406,"children":407},{"style":338},[408],{"type":53,"value":409},"NV-Generate-CTMR-61c4ec7",{"type":48,"tag":325,"props":411,"children":412},{"style":344},[413],{"type":53,"value":414},"}\"",{"type":48,"tag":325,"props":416,"children":417},{"style":344},[418],{"type":53,"value":419}," &&",{"type":48,"tag":325,"props":421,"children":422},{"style":338},[423],{"type":53,"value":424}," \\\n",{"type":48,"tag":325,"props":426,"children":428},{"class":327,"line":427},2,[429,435,440],{"type":48,"tag":325,"props":430,"children":432},{"style":431},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[433],{"type":53,"value":434},"python",{"type":48,"tag":325,"props":436,"children":437},{"style":375},[438],{"type":53,"value":439}," skills\u002Fnv-generate-mr-brain-finetune\u002Fscripts\u002Frun_mr_brain_finetune.py",{"type":48,"tag":325,"props":441,"children":442},{"style":338},[443],{"type":53,"value":424},{"type":48,"tag":325,"props":445,"children":447},{"class":327,"line":446},3,[448,453],{"type":48,"tag":325,"props":449,"children":450},{"style":375},[451],{"type":53,"value":452},"  INPUT_BUNDLE\u002Fpreflight_datalist.json",{"type":48,"tag":325,"props":454,"children":455},{"style":338},[456],{"type":53,"value":424},{"type":48,"tag":325,"props":458,"children":460},{"class":327,"line":459},4,[461,466,471],{"type":48,"tag":325,"props":462,"children":463},{"style":375},[464],{"type":53,"value":465},"  --data-base-dir",{"type":48,"tag":325,"props":467,"children":468},{"style":375},[469],{"type":53,"value":470}," INPUT_BUNDLE\u002Fpreflight_dataset",{"type":48,"tag":325,"props":472,"children":473},{"style":338},[474],{"type":53,"value":424},{"type":48,"tag":325,"props":476,"children":478},{"class":327,"line":477},5,[479,484,489],{"type":48,"tag":325,"props":480,"children":481},{"style":375},[482],{"type":53,"value":483},"  --output-dir",{"type":48,"tag":325,"props":485,"children":486},{"style":375},[487],{"type":53,"value":488}," OUT_DIR",{"type":48,"tag":325,"props":490,"children":491},{"style":338},[492],{"type":53,"value":424},{"type":48,"tag":325,"props":494,"children":496},{"class":327,"line":495},6,[497,502,507],{"type":48,"tag":325,"props":498,"children":499},{"style":375},[500],{"type":53,"value":501},"  --modality",{"type":48,"tag":325,"props":503,"children":504},{"style":375},[505],{"type":53,"value":506}," mri_t1",{"type":48,"tag":325,"props":508,"children":509},{"style":338},[510],{"type":53,"value":424},{"type":48,"tag":325,"props":512,"children":514},{"class":327,"line":513},7,[515],{"type":48,"tag":325,"props":516,"children":517},{"style":375},[518],{"type":53,"value":519},"  --preflight\n",{"type":48,"tag":293,"props":521,"children":522},{},[523,525,532],{"type":53,"value":524},"For real GPU finetuning and other variations, see ",{"type":48,"tag":526,"props":527,"children":529},"a",{"href":528},"#2-usage-one-line-training",[530],{"type":53,"value":531},"Usage",{"type":53,"value":533}," below.",{"type":48,"tag":56,"props":535,"children":537},{"id":536},"available-scripts",[538],{"type":53,"value":539},"Available Scripts",{"type":48,"tag":541,"props":542,"children":543},"table",{},[544,567],{"type":48,"tag":545,"props":546,"children":547},"thead",{},[548],{"type":48,"tag":549,"props":550,"children":551},"tr",{},[552,558,562],{"type":48,"tag":553,"props":554,"children":555},"th",{},[556],{"type":53,"value":557},"Script",{"type":48,"tag":553,"props":559,"children":560},{},[561],{"type":53,"value":61},{"type":48,"tag":553,"props":563,"children":564},{},[565],{"type":53,"value":566},"Arguments",{"type":48,"tag":568,"props":569,"children":570},"tbody",{},[571],{"type":48,"tag":549,"props":572,"children":573},{},[574,583,594],{"type":48,"tag":575,"props":576,"children":577},"td",{},[578],{"type":48,"tag":73,"props":579,"children":581},{"className":580},[],[582],{"type":53,"value":213},{"type":48,"tag":575,"props":584,"children":585},{},[586,588,593],{"type":53,"value":587},"Primary entrypoint declared by ",{"type":48,"tag":73,"props":589,"children":591},{"className":590},[],[592],{"type":53,"value":200},{"type":53,"value":159},{"type":48,"tag":575,"props":595,"children":596},{},[597],{"type":48,"tag":73,"props":598,"children":600},{"className":599},[],[601],{"type":53,"value":602},"DATALIST.json --data-base-dir DATA_DIR --output-dir OUT_DIR [--epochs N] [--modality mri_t1] [--num-gpus N] [--no-amp] [--model-config FILE] [--run-inference] [--preflight]",{"type":48,"tag":56,"props":604,"children":606},{"id":605},"prerequisites",[607],{"type":53,"value":608},"Prerequisites",{"type":48,"tag":63,"props":610,"children":611},{},[612,647,666,677,690,727],{"type":48,"tag":67,"props":613,"children":614},{},[615,617,622,624,630,632,638,639,645],{"type":53,"value":616},"An explicit ",{"type":48,"tag":73,"props":618,"children":620},{"className":619},[],[621],{"type":53,"value":357},{"type":53,"value":623}," may point to the caller's local checkout and\nmust contain ",{"type":48,"tag":73,"props":625,"children":627},{"className":626},[],[628],{"type":53,"value":629},"scripts\u002Fdiff_model_create_training_data.py",{"type":53,"value":631},",\n",{"type":48,"tag":73,"props":633,"children":635},{"className":634},[],[636],{"type":53,"value":637},"scripts\u002Fdiff_model_train.py",{"type":53,"value":151},{"type":48,"tag":73,"props":640,"children":642},{"className":641},[],[643],{"type":53,"value":644},"scripts\u002Fdiff_model_infer.py",{"type":53,"value":646},". The result\nrecords its current commit.",{"type":48,"tag":67,"props":648,"children":649},{},[650,652,657,659,665],{"type":53,"value":651},"If ",{"type":48,"tag":73,"props":653,"children":655},{"className":654},[],[656],{"type":53,"value":357},{"type":53,"value":658}," is unset, the wrapper searches ",{"type":48,"tag":73,"props":660,"children":662},{"className":661},[],[663],{"type":53,"value":664},".workbench_data\u002Fupstreams\u002FNV-Generate-CTMR",{"type":53,"value":159},{"type":48,"tag":67,"props":667,"children":668},{},[669,675],{"type":48,"tag":73,"props":670,"children":672},{"className":671},[],[673],{"type":53,"value":674},"CUDA_VISIBLE_DEVICES",{"type":53,"value":676}," is optional and can be used to select the GPU for real training.",{"type":48,"tag":67,"props":678,"children":679},{},[680,682,688],{"type":53,"value":681},"Runtime requirements: NVIDIA CUDA GPU for real training, Python packages from the upstream ",{"type":48,"tag":73,"props":683,"children":685},{"className":684},[],[686],{"type":53,"value":687},"requirements.txt",{"type":53,"value":689},", and downloaded MR-brain weights.",{"type":48,"tag":67,"props":691,"children":692},{},[693,695,701,703,709,711,717,719,725],{"type":53,"value":694},"Side effects: writes staged configs, embeddings, checkpoints, optional inference images, and logs under the caller-provided ",{"type":48,"tag":73,"props":696,"children":698},{"className":697},[],[699],{"type":53,"value":700},"--output-dir",{"type":53,"value":702},"; may write model caches under the upstream checkout and ",{"type":48,"tag":73,"props":704,"children":706},{"className":705},[],[707],{"type":53,"value":708},"~\u002F.cache\u002Fhuggingface\u002F",{"type":53,"value":710},"; may contact ",{"type":48,"tag":73,"props":712,"children":714},{"className":713},[],[715],{"type":53,"value":716},"https:\u002F\u002Fhuggingface.co",{"type":53,"value":718}," for model assets and ",{"type":48,"tag":73,"props":720,"children":722},{"className":721},[],[723],{"type":53,"value":724},"https:\u002F\u002Fgithub.com",{"type":53,"value":726}," for the upstream checkout.",{"type":48,"tag":67,"props":728,"children":729},{},[730,732,738,740,745,747,753,755,761],{"type":53,"value":731},"The datalist is a MONAI-style JSON object with ",{"type":48,"tag":73,"props":733,"children":735},{"className":734},[],[736],{"type":53,"value":737},"training[].image",{"type":53,"value":739}," paths relative to ",{"type":48,"tag":73,"props":741,"children":743},{"className":742},[],[744],{"type":53,"value":283},{"type":53,"value":746},". ",{"type":48,"tag":73,"props":748,"children":750},{"className":749},[],[751],{"type":53,"value":752},"training[].modality",{"type":53,"value":754}," is optional and defaults to ",{"type":48,"tag":73,"props":756,"children":758},{"className":757},[],[759],{"type":53,"value":760},"mri_t1",{"type":53,"value":159},{"type":48,"tag":293,"props":763,"children":764},{},[765],{"type":53,"value":766},"When no local checkout is supplied, create the recommended pinned default\ncheckout once:",{"type":48,"tag":314,"props":768,"children":770},{"className":316,"code":769,"language":318,"meta":319,"style":319},"if [ -z \"${NV_GENERATE_ROOT:-}\" ]; then\n  export NV_GENERATE_COMMIT=61c4ec709b84cad468852243c48e250bec732074\n  export NV_GENERATE_ROOT=\"$HOME\u002F.cache\u002Fnvidia-skills\u002Fupstreams\u002FNV-Generate-CTMR-61c4ec7\"\n  if [ ! -d \"$NV_GENERATE_ROOT\u002F.git\" ]; then\n    git clone https:\u002F\u002Fgithub.com\u002FNVIDIA-Medtech\u002FNV-Generate-CTMR.git \"$NV_GENERATE_ROOT\"\n    git -C \"$NV_GENERATE_ROOT\" checkout --detach \"$NV_GENERATE_COMMIT\"\n  fi\nfi\n",[771],{"type":48,"tag":73,"props":772,"children":773},{"__ignoreMap":319},[774,817,839,873,922,952,999,1007],{"type":48,"tag":325,"props":775,"children":776},{"class":327,"line":328},[777,783,788,793,798,802,807,812],{"type":48,"tag":325,"props":778,"children":780},{"style":779},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[781],{"type":53,"value":782},"if",{"type":48,"tag":325,"props":784,"children":785},{"style":344},[786],{"type":53,"value":787}," [",{"type":48,"tag":325,"props":789,"children":790},{"style":344},[791],{"type":53,"value":792}," -z",{"type":48,"tag":325,"props":794,"children":795},{"style":344},[796],{"type":53,"value":797}," \"${",{"type":48,"tag":325,"props":799,"children":800},{"style":338},[801],{"type":53,"value":357},{"type":48,"tag":325,"props":803,"children":804},{"style":344},[805],{"type":53,"value":806},":-}\"",{"type":48,"tag":325,"props":808,"children":809},{"style":344},[810],{"type":53,"value":811}," ];",{"type":48,"tag":325,"props":813,"children":814},{"style":779},[815],{"type":53,"value":816}," then\n",{"type":48,"tag":325,"props":818,"children":819},{"class":327,"line":427},[820,825,830,834],{"type":48,"tag":325,"props":821,"children":822},{"style":332},[823],{"type":53,"value":824},"  export",{"type":48,"tag":325,"props":826,"children":827},{"style":338},[828],{"type":53,"value":829}," NV_GENERATE_COMMIT",{"type":48,"tag":325,"props":831,"children":832},{"style":344},[833],{"type":53,"value":347},{"type":48,"tag":325,"props":835,"children":836},{"style":338},[837],{"type":53,"value":838},"61c4ec709b84cad468852243c48e250bec732074\n",{"type":48,"tag":325,"props":840,"children":841},{"class":327,"line":446},[842,846,850,854,859,863,868],{"type":48,"tag":325,"props":843,"children":844},{"style":332},[845],{"type":53,"value":824},{"type":48,"tag":325,"props":847,"children":848},{"style":338},[849],{"type":53,"value":341},{"type":48,"tag":325,"props":851,"children":852},{"style":344},[853],{"type":53,"value":347},{"type":48,"tag":325,"props":855,"children":856},{"style":344},[857],{"type":53,"value":858},"\"",{"type":48,"tag":325,"props":860,"children":861},{"style":338},[862],{"type":53,"value":367},{"type":48,"tag":325,"props":864,"children":865},{"style":375},[866],{"type":53,"value":867},"\u002F.cache\u002Fnvidia-skills\u002Fupstreams\u002FNV-Generate-CTMR-61c4ec7",{"type":48,"tag":325,"props":869,"children":870},{"style":344},[871],{"type":53,"value":872},"\"\n",{"type":48,"tag":325,"props":874,"children":875},{"class":327,"line":459},[876,881,885,890,895,900,905,910,914,918],{"type":48,"tag":325,"props":877,"children":878},{"style":779},[879],{"type":53,"value":880},"  if",{"type":48,"tag":325,"props":882,"children":883},{"style":344},[884],{"type":53,"value":787},{"type":48,"tag":325,"props":886,"children":887},{"style":344},[888],{"type":53,"value":889}," !",{"type":48,"tag":325,"props":891,"children":892},{"style":344},[893],{"type":53,"value":894}," -d",{"type":48,"tag":325,"props":896,"children":897},{"style":344},[898],{"type":53,"value":899}," \"",{"type":48,"tag":325,"props":901,"children":902},{"style":338},[903],{"type":53,"value":904},"$NV_GENERATE_ROOT",{"type":48,"tag":325,"props":906,"children":907},{"style":375},[908],{"type":53,"value":909},"\u002F.git",{"type":48,"tag":325,"props":911,"children":912},{"style":344},[913],{"type":53,"value":858},{"type":48,"tag":325,"props":915,"children":916},{"style":344},[917],{"type":53,"value":811},{"type":48,"tag":325,"props":919,"children":920},{"style":779},[921],{"type":53,"value":816},{"type":48,"tag":325,"props":923,"children":924},{"class":327,"line":477},[925,930,935,940,944,948],{"type":48,"tag":325,"props":926,"children":927},{"style":431},[928],{"type":53,"value":929},"    git",{"type":48,"tag":325,"props":931,"children":932},{"style":375},[933],{"type":53,"value":934}," clone",{"type":48,"tag":325,"props":936,"children":937},{"style":375},[938],{"type":53,"value":939}," https:\u002F\u002Fgithub.com\u002FNVIDIA-Medtech\u002FNV-Generate-CTMR.git",{"type":48,"tag":325,"props":941,"children":942},{"style":344},[943],{"type":53,"value":899},{"type":48,"tag":325,"props":945,"children":946},{"style":338},[947],{"type":53,"value":904},{"type":48,"tag":325,"props":949,"children":950},{"style":344},[951],{"type":53,"value":872},{"type":48,"tag":325,"props":953,"children":954},{"class":327,"line":495},[955,959,964,968,972,976,981,986,990,995],{"type":48,"tag":325,"props":956,"children":957},{"style":431},[958],{"type":53,"value":929},{"type":48,"tag":325,"props":960,"children":961},{"style":375},[962],{"type":53,"value":963}," -C",{"type":48,"tag":325,"props":965,"children":966},{"style":344},[967],{"type":53,"value":899},{"type":48,"tag":325,"props":969,"children":970},{"style":338},[971],{"type":53,"value":904},{"type":48,"tag":325,"props":973,"children":974},{"style":344},[975],{"type":53,"value":858},{"type":48,"tag":325,"props":977,"children":978},{"style":375},[979],{"type":53,"value":980}," checkout",{"type":48,"tag":325,"props":982,"children":983},{"style":375},[984],{"type":53,"value":985}," --detach",{"type":48,"tag":325,"props":987,"children":988},{"style":344},[989],{"type":53,"value":899},{"type":48,"tag":325,"props":991,"children":992},{"style":338},[993],{"type":53,"value":994},"$NV_GENERATE_COMMIT",{"type":48,"tag":325,"props":996,"children":997},{"style":344},[998],{"type":53,"value":872},{"type":48,"tag":325,"props":1000,"children":1001},{"class":327,"line":513},[1002],{"type":48,"tag":325,"props":1003,"children":1004},{"style":779},[1005],{"type":53,"value":1006},"  fi\n",{"type":48,"tag":325,"props":1008,"children":1010},{"class":327,"line":1009},8,[1011],{"type":48,"tag":325,"props":1012,"children":1013},{"style":779},[1014],{"type":53,"value":1015},"fi\n",{"type":48,"tag":56,"props":1017,"children":1019},{"id":1018},"_1-config-and-environment-json-adapt-to-your-data",[1020],{"type":53,"value":1021},"1. Config and environment JSON (adapt to your data)",{"type":48,"tag":293,"props":1023,"children":1024},{},[1025,1027,1032],{"type":53,"value":1026},"This is a thin wrapper around the upstream ",{"type":48,"tag":73,"props":1028,"children":1030},{"className":1029},[],[1031],{"type":53,"value":178},{"type":53,"value":1033}," flow. Each run performs four steps, delegating the heavy lifting to the model author's scripts:",{"type":48,"tag":1035,"props":1036,"children":1037},"ol",{},[1038,1057,1076,1124],{"type":48,"tag":67,"props":1039,"children":1040},{},[1041,1047,1049,1055],{"type":48,"tag":1042,"props":1043,"children":1044},"strong",{},[1045],{"type":53,"value":1046},"Stage configs",{"type":53,"value":1048}," — copy the three config JSONs and rewrite only the run-specific paths and ",{"type":48,"tag":73,"props":1050,"children":1052},{"className":1051},[],[1053],{"type":53,"value":1054},"n_epochs",{"type":53,"value":1056}," (notebook cell 15).",{"type":48,"tag":67,"props":1058,"children":1059},{},[1060,1066,1068,1074],{"type":48,"tag":73,"props":1061,"children":1063},{"className":1062},[],[1064],{"type":53,"value":1065},"python -m scripts.diff_model_create_training_data",{"type":53,"value":1067}," → latent ",{"type":48,"tag":73,"props":1069,"children":1071},{"className":1070},[],[1072],{"type":53,"value":1073},"*_emb.nii.gz",{"type":53,"value":1075}," embeddings (cell 17).",{"type":48,"tag":67,"props":1077,"children":1078},{},[1079,1084,1086,1092,1094,1100,1101,1107,1109,1115,1116,1122],{"type":48,"tag":1042,"props":1080,"children":1081},{},[1082],{"type":53,"value":1083},"Write embedding sidecars",{"type":53,"value":1085}," — a ",{"type":48,"tag":73,"props":1087,"children":1089},{"className":1088},[],[1090],{"type":53,"value":1091},"\u003Cemb>.nii.gz.json",{"type":53,"value":1093}," per embedding with ",{"type":48,"tag":73,"props":1095,"children":1097},{"className":1096},[],[1098],{"type":53,"value":1099},"spacing",{"type":53,"value":372},{"type":48,"tag":73,"props":1102,"children":1104},{"className":1103},[],[1105],{"type":53,"value":1106},"modality",{"type":53,"value":1108}," (and body-region indices when the model uses them). This is the one piece of glue that lives in the notebook (cell 19), not in upstream ",{"type":48,"tag":73,"props":1110,"children":1112},{"className":1111},[],[1113],{"type":53,"value":1114},"scripts\u002F",{"type":53,"value":151},{"type":48,"tag":73,"props":1117,"children":1119},{"className":1118},[],[1120],{"type":53,"value":1121},"diff_model_train",{"type":53,"value":1123}," requires it; the skill owns it.",{"type":48,"tag":67,"props":1125,"children":1126},{},[1127,1133,1135,1141],{"type":48,"tag":73,"props":1128,"children":1130},{"className":1129},[],[1131],{"type":53,"value":1132},"python -m scripts.diff_model_train",{"type":53,"value":1134}," (cell 21), optionally ",{"type":48,"tag":73,"props":1136,"children":1138},{"className":1137},[],[1139],{"type":53,"value":1140},"python -m scripts.diff_model_infer",{"type":53,"value":159},{"type":48,"tag":293,"props":1143,"children":1144},{},[1145,1150,1152,1158,1159,1165,1166,1172,1174,1180,1181,1186,1187,1193,1194,1200,1202,1208,1210,1216,1218,1224,1226,1232],{"type":48,"tag":1042,"props":1146,"children":1147},{},[1148],{"type":53,"value":1149},"Tune by editing the config JSON, not by adding flags.",{"type":53,"value":1151}," All training\u002Finference hyperparameters (",{"type":48,"tag":73,"props":1153,"children":1155},{"className":1154},[],[1156],{"type":53,"value":1157},"lr",{"type":53,"value":98},{"type":48,"tag":73,"props":1160,"children":1162},{"className":1161},[],[1163],{"type":53,"value":1164},"batch_size",{"type":53,"value":98},{"type":48,"tag":73,"props":1167,"children":1169},{"className":1168},[],[1170],{"type":53,"value":1171},"cache_rate",{"type":53,"value":1173},", inference ",{"type":48,"tag":73,"props":1175,"children":1177},{"className":1176},[],[1178],{"type":53,"value":1179},"dim",{"type":53,"value":372},{"type":48,"tag":73,"props":1182,"children":1184},{"className":1183},[],[1185],{"type":53,"value":1099},{"type":53,"value":372},{"type":48,"tag":73,"props":1188,"children":1190},{"className":1189},[],[1191],{"type":53,"value":1192},"num_inference_steps",{"type":53,"value":372},{"type":48,"tag":73,"props":1195,"children":1197},{"className":1196},[],[1198],{"type":53,"value":1199},"cfg_guidance_scale",{"type":53,"value":1201},", …) live in ",{"type":48,"tag":73,"props":1203,"children":1205},{"className":1204},[],[1206],{"type":53,"value":1207},"config_maisi_diff_model_rflow-mr-brain.json",{"type":53,"value":1209},". Edit the upstream copy, or pass your own with ",{"type":48,"tag":73,"props":1211,"children":1213},{"className":1212},[],[1214],{"type":53,"value":1215},"--model-config FILE",{"type":53,"value":1217}," (and ",{"type":48,"tag":73,"props":1219,"children":1221},{"className":1220},[],[1222],{"type":53,"value":1223},"--env-config",{"type":53,"value":1225}," \u002F ",{"type":48,"tag":73,"props":1227,"children":1229},{"className":1228},[],[1230],{"type":53,"value":1231},"--model-def",{"type":53,"value":1233}," for the other two). The wrapper only ever rewrites the fields below.",{"type":48,"tag":293,"props":1235,"children":1236},{},[1237,1239,1245],{"type":53,"value":1238},"Environment JSON (",{"type":48,"tag":73,"props":1240,"children":1242},{"className":1241},[],[1243],{"type":53,"value":1244},"environment_maisi_diff_model_rflow-mr-brain.json",{"type":53,"value":1246},") — fields the wrapper rewrites per run:",{"type":48,"tag":541,"props":1248,"children":1249},{},[1250,1271],{"type":48,"tag":545,"props":1251,"children":1252},{},[1253],{"type":48,"tag":549,"props":1254,"children":1255},{},[1256,1261,1266],{"type":48,"tag":553,"props":1257,"children":1258},{},[1259],{"type":53,"value":1260},"Field",{"type":48,"tag":553,"props":1262,"children":1263},{},[1264],{"type":53,"value":1265},"Set from",{"type":48,"tag":553,"props":1267,"children":1268},{},[1269],{"type":53,"value":1270},"Notes",{"type":48,"tag":568,"props":1272,"children":1273},{},[1274,1305,1334,1373,1395,1429,1464],{"type":48,"tag":549,"props":1275,"children":1276},{},[1277,1285,1293],{"type":48,"tag":575,"props":1278,"children":1279},{},[1280],{"type":48,"tag":73,"props":1281,"children":1283},{"className":1282},[],[1284],{"type":53,"value":133},{"type":48,"tag":575,"props":1286,"children":1287},{},[1288],{"type":48,"tag":73,"props":1289,"children":1291},{"className":1290},[],[1292],{"type":53,"value":283},{"type":48,"tag":575,"props":1294,"children":1295},{},[1296,1298,1303],{"type":53,"value":1297},"Root for relative ",{"type":48,"tag":73,"props":1299,"children":1301},{"className":1300},[],[1302],{"type":53,"value":737},{"type":53,"value":1304}," paths.",{"type":48,"tag":549,"props":1306,"children":1307},{},[1308,1317,1322],{"type":48,"tag":575,"props":1309,"children":1310},{},[1311],{"type":48,"tag":73,"props":1312,"children":1314},{"className":1313},[],[1315],{"type":53,"value":1316},"json_data_list",{"type":48,"tag":575,"props":1318,"children":1319},{},[1320],{"type":53,"value":1321},"your datalist",{"type":48,"tag":575,"props":1323,"children":1324},{},[1325,1327,1332],{"type":53,"value":1326},"Staged copy with per-entry ",{"type":48,"tag":73,"props":1328,"children":1330},{"className":1329},[],[1331],{"type":53,"value":1106},{"type":53,"value":1333}," filled in.",{"type":48,"tag":549,"props":1335,"children":1336},{},[1337,1360,1368],{"type":48,"tag":575,"props":1338,"children":1339},{},[1340,1346,1347,1353,1354],{"type":48,"tag":73,"props":1341,"children":1343},{"className":1342},[],[1344],{"type":53,"value":1345},"embedding_base_dir",{"type":53,"value":98},{"type":48,"tag":73,"props":1348,"children":1350},{"className":1349},[],[1351],{"type":53,"value":1352},"model_dir",{"type":53,"value":98},{"type":48,"tag":73,"props":1355,"children":1357},{"className":1356},[],[1358],{"type":53,"value":1359},"output_dir",{"type":48,"tag":575,"props":1361,"children":1362},{},[1363],{"type":48,"tag":73,"props":1364,"children":1366},{"className":1365},[],[1367],{"type":53,"value":700},{"type":48,"tag":575,"props":1369,"children":1370},{},[1371],{"type":53,"value":1372},"Latent embeddings, checkpoints, inference images.",{"type":48,"tag":549,"props":1374,"children":1375},{},[1376,1385,1390],{"type":48,"tag":575,"props":1377,"children":1378},{},[1379],{"type":48,"tag":73,"props":1380,"children":1382},{"className":1381},[],[1383],{"type":53,"value":1384},"modality_mapping_path",{"type":48,"tag":575,"props":1386,"children":1387},{},[1388],{"type":53,"value":1389},"upstream",{"type":48,"tag":575,"props":1391,"children":1392},{},[1393],{"type":53,"value":1394},"Maps modality name → integer code.",{"type":48,"tag":549,"props":1396,"children":1397},{},[1398,1407,1416],{"type":48,"tag":575,"props":1399,"children":1400},{},[1401],{"type":48,"tag":73,"props":1402,"children":1404},{"className":1403},[],[1405],{"type":53,"value":1406},"model_filename",{"type":48,"tag":575,"props":1408,"children":1409},{},[1410],{"type":48,"tag":73,"props":1411,"children":1413},{"className":1412},[],[1414],{"type":53,"value":1415},"--model-filename",{"type":48,"tag":575,"props":1417,"children":1418},{},[1419,1421,1427],{"type":53,"value":1420},"Output checkpoint name (default ",{"type":48,"tag":73,"props":1422,"children":1424},{"className":1423},[],[1425],{"type":53,"value":1426},"diff_unet_3d_rflow-mr-brain_v0.pt",{"type":53,"value":1428},").",{"type":48,"tag":549,"props":1430,"children":1431},{},[1432,1441,1452],{"type":48,"tag":575,"props":1433,"children":1434},{},[1435],{"type":48,"tag":73,"props":1436,"children":1438},{"className":1437},[],[1439],{"type":53,"value":1440},"existing_ckpt_filepath",{"type":48,"tag":575,"props":1442,"children":1443},{},[1444,1446],{"type":53,"value":1445},"upstream weights \u002F ",{"type":48,"tag":73,"props":1447,"children":1449},{"className":1448},[],[1450],{"type":53,"value":1451},"--existing-ckpt-filepath",{"type":48,"tag":575,"props":1453,"children":1454},{},[1455,1457,1463],{"type":53,"value":1456},"Starting checkpoint; cleared by ",{"type":48,"tag":73,"props":1458,"children":1460},{"className":1459},[],[1461],{"type":53,"value":1462},"--train-from-scratch",{"type":53,"value":159},{"type":48,"tag":549,"props":1465,"children":1466},{},[1467,1476,1486],{"type":48,"tag":575,"props":1468,"children":1469},{},[1470],{"type":48,"tag":73,"props":1471,"children":1473},{"className":1472},[],[1474],{"type":53,"value":1475},"trained_autoencoder_path",{"type":48,"tag":575,"props":1477,"children":1478},{},[1479,1480],{"type":53,"value":1445},{"type":48,"tag":73,"props":1481,"children":1483},{"className":1482},[],[1484],{"type":53,"value":1485},"--trained-autoencoder-path",{"type":48,"tag":575,"props":1487,"children":1488},{},[1489],{"type":53,"value":1490},"VAE used to encode\u002Fdecode latents.",{"type":48,"tag":293,"props":1492,"children":1493},{},[1494,1496,1501],{"type":53,"value":1495},"Model config (",{"type":48,"tag":73,"props":1497,"children":1499},{"className":1498},[],[1500],{"type":53,"value":1207},{"type":53,"value":1502},") — the only fields the wrapper touches:",{"type":48,"tag":541,"props":1504,"children":1505},{},[1506,1529],{"type":48,"tag":545,"props":1507,"children":1508},{},[1509],{"type":48,"tag":549,"props":1510,"children":1511},{},[1512,1516,1520,1525],{"type":48,"tag":553,"props":1513,"children":1514},{},[1515],{"type":53,"value":1260},{"type":48,"tag":553,"props":1517,"children":1518},{},[1519],{"type":53,"value":1265},{"type":48,"tag":553,"props":1521,"children":1522},{},[1523],{"type":53,"value":1524},"Default",{"type":48,"tag":553,"props":1526,"children":1527},{},[1528],{"type":53,"value":1270},{"type":48,"tag":568,"props":1530,"children":1531},{},[1532,1577],{"type":48,"tag":549,"props":1533,"children":1534},{},[1535,1544,1553,1572],{"type":48,"tag":575,"props":1536,"children":1537},{},[1538],{"type":48,"tag":73,"props":1539,"children":1541},{"className":1540},[],[1542],{"type":53,"value":1543},"diffusion_unet_train.n_epochs",{"type":48,"tag":575,"props":1545,"children":1546},{},[1547],{"type":48,"tag":73,"props":1548,"children":1550},{"className":1549},[],[1551],{"type":53,"value":1552},"--epochs",{"type":48,"tag":575,"props":1554,"children":1555},{},[1556,1562,1564,1570],{"type":48,"tag":73,"props":1557,"children":1559},{"className":1558},[],[1560],{"type":53,"value":1561},"2",{"type":53,"value":1563}," (upstream config ships ",{"type":48,"tag":73,"props":1565,"children":1567},{"className":1566},[],[1568],{"type":53,"value":1569},"1000",{"type":53,"value":1571},")",{"type":48,"tag":575,"props":1573,"children":1574},{},[1575],{"type":53,"value":1576},"Convenience override (cell 15 does the same); wrapper default is small for verification.",{"type":48,"tag":549,"props":1578,"children":1579},{},[1580,1589,1598,1609],{"type":48,"tag":575,"props":1581,"children":1582},{},[1583],{"type":48,"tag":73,"props":1584,"children":1586},{"className":1585},[],[1587],{"type":53,"value":1588},"diffusion_unet_inference.modality",{"type":48,"tag":575,"props":1590,"children":1591},{},[1592],{"type":48,"tag":73,"props":1593,"children":1595},{"className":1594},[],[1596],{"type":53,"value":1597},"--modality",{"type":48,"tag":575,"props":1599,"children":1600},{},[1601,1603],{"type":53,"value":1602},"from ",{"type":48,"tag":73,"props":1604,"children":1606},{"className":1605},[],[1607],{"type":53,"value":1608},"modality_mapping.json",{"type":48,"tag":575,"props":1610,"children":1611},{},[1612,1614,1620],{"type":53,"value":1613},"Kept consistent with the training modality for optional ",{"type":48,"tag":73,"props":1615,"children":1617},{"className":1616},[],[1618],{"type":53,"value":1619},"--run-inference",{"type":53,"value":159},{"type":48,"tag":293,"props":1622,"children":1623},{},[1624,1626,1631,1632,1637,1638,1643,1645,1651],{"type":53,"value":1625},"Everything else in that file (",{"type":48,"tag":73,"props":1627,"children":1629},{"className":1628},[],[1630],{"type":53,"value":1157},{"type":53,"value":98},{"type":48,"tag":73,"props":1633,"children":1635},{"className":1634},[],[1636],{"type":53,"value":1164},{"type":53,"value":98},{"type":48,"tag":73,"props":1639,"children":1641},{"className":1640},[],[1642],{"type":53,"value":1171},{"type":53,"value":1644},", the rest of ",{"type":48,"tag":73,"props":1646,"children":1648},{"className":1647},[],[1649],{"type":53,"value":1650},"diffusion_unet_inference",{"type":53,"value":1652},") is left exactly as written — edit the JSON to change it.",{"type":48,"tag":293,"props":1654,"children":1655},{},[1656,1658,1664,1666,1672,1674,1680,1682,1688,1690,1695],{"type":53,"value":1657},"Runtime flags (not config fields): ",{"type":48,"tag":73,"props":1659,"children":1661},{"className":1660},[],[1662],{"type":53,"value":1663},"--num-gpus N",{"type":53,"value":1665}," (",{"type":48,"tag":73,"props":1667,"children":1669},{"className":1668},[],[1670],{"type":53,"value":1671},">1",{"type":53,"value":1673}," launches ",{"type":48,"tag":73,"props":1675,"children":1677},{"className":1676},[],[1678],{"type":53,"value":1679},"torch.distributed.run",{"type":53,"value":1681},"), ",{"type":48,"tag":73,"props":1683,"children":1685},{"className":1684},[],[1686],{"type":53,"value":1687},"--no-amp",{"type":53,"value":1689}," (disable mixed precision, passed through to ",{"type":48,"tag":73,"props":1691,"children":1693},{"className":1692},[],[1694],{"type":53,"value":1121},{"type":53,"value":1428},{"type":48,"tag":293,"props":1697,"children":1698},{},[1699,1704,1706,1712,1714,1720,1722,1727,1729,1735,1737,1743,1745,1751,1753,1759,1761,1766,1768,1773],{"type":48,"tag":73,"props":1700,"children":1702},{"className":1701},[],[1703],{"type":53,"value":1597},{"type":53,"value":1705}," selects the integer code from ",{"type":48,"tag":73,"props":1707,"children":1709},{"className":1708},[],[1710],{"type":53,"value":1711},"configs\u002Fmodality_mapping.json",{"type":53,"value":1713},". Supported brain values: ",{"type":48,"tag":73,"props":1715,"children":1717},{"className":1716},[],[1718],{"type":53,"value":1719},"mri",{"type":53,"value":1721}," (8), ",{"type":48,"tag":73,"props":1723,"children":1725},{"className":1724},[],[1726],{"type":53,"value":760},{"type":53,"value":1728}," (9, default), ",{"type":48,"tag":73,"props":1730,"children":1732},{"className":1731},[],[1733],{"type":53,"value":1734},"mri_t2",{"type":53,"value":1736}," (10), ",{"type":48,"tag":73,"props":1738,"children":1740},{"className":1739},[],[1741],{"type":53,"value":1742},"mri_flair",{"type":53,"value":1744}," (11), ",{"type":48,"tag":73,"props":1746,"children":1748},{"className":1747},[],[1749],{"type":53,"value":1750},"mri_swi",{"type":53,"value":1752}," (20), and their ",{"type":48,"tag":73,"props":1754,"children":1756},{"className":1755},[],[1757],{"type":53,"value":1758},"*_skull_stripped",{"type":53,"value":1760}," variants (29\u002F30\u002F31\u002F32). Per-case ",{"type":48,"tag":73,"props":1762,"children":1764},{"className":1763},[],[1765],{"type":53,"value":752},{"type":53,"value":1767}," overrides ",{"type":48,"tag":73,"props":1769,"children":1771},{"className":1770},[],[1772],{"type":53,"value":1597},{"type":53,"value":1774},". The modality also feeds the step-3 embedding sidecars.",{"type":48,"tag":293,"props":1776,"children":1777},{},[1778,1780,1785],{"type":53,"value":1779},"For an end-to-end reference including example data download and checkpoint loading, see the upstream tutorial ",{"type":48,"tag":73,"props":1781,"children":1783},{"className":1782},[],[1784],{"type":53,"value":178},{"type":53,"value":159},{"type":48,"tag":56,"props":1787,"children":1789},{"id":1788},"_2-usage-one-line-training",[1790],{"type":53,"value":1791},"2. Usage (one-line training)",{"type":48,"tag":293,"props":1793,"children":1794},{},[1795],{"type":53,"value":1796},"Preflight only:",{"type":48,"tag":314,"props":1798,"children":1800},{"className":316,"code":1799,"language":318,"meta":319,"style":319},"export NV_GENERATE_ROOT=\"${NV_GENERATE_ROOT:-$HOME\u002F.cache\u002Fnvidia-skills\u002Fupstreams\u002FNV-Generate-CTMR-61c4ec7}\" && \\\npython skills\u002Fnv-generate-mr-brain-finetune\u002Fscripts\u002Frun_mr_brain_finetune.py \\\n  PATH_TO_DATALIST.json \\\n  --data-base-dir PATH_TO_DATA_ROOT \\\n  --output-dir runs\u002Fnv_generate_mr_brain_finetune_preflight \\\n  --preflight\n",[1801],{"type":48,"tag":73,"props":1802,"children":1803},{"__ignoreMap":319},[1804,1883,1898,1910,1926,1942],{"type":48,"tag":325,"props":1805,"children":1806},{"class":327,"line":328},[1807,1811,1815,1819,1823,1827,1831,1835,1839,1843,1847,1851,1855,1859,1863,1867,1871,1875,1879],{"type":48,"tag":325,"props":1808,"children":1809},{"style":332},[1810],{"type":53,"value":335},{"type":48,"tag":325,"props":1812,"children":1813},{"style":338},[1814],{"type":53,"value":341},{"type":48,"tag":325,"props":1816,"children":1817},{"style":344},[1818],{"type":53,"value":347},{"type":48,"tag":325,"props":1820,"children":1821},{"style":344},[1822],{"type":53,"value":352},{"type":48,"tag":325,"props":1824,"children":1825},{"style":338},[1826],{"type":53,"value":357},{"type":48,"tag":325,"props":1828,"children":1829},{"style":344},[1830],{"type":53,"value":362},{"type":48,"tag":325,"props":1832,"children":1833},{"style":338},[1834],{"type":53,"value":367},{"type":48,"tag":325,"props":1836,"children":1837},{"style":344},[1838],{"type":53,"value":372},{"type":48,"tag":325,"props":1840,"children":1841},{"style":375},[1842],{"type":53,"value":159},{"type":48,"tag":325,"props":1844,"children":1845},{"style":338},[1846],{"type":53,"value":382},{"type":48,"tag":325,"props":1848,"children":1849},{"style":344},[1850],{"type":53,"value":372},{"type":48,"tag":325,"props":1852,"children":1853},{"style":338},[1854],{"type":53,"value":391},{"type":48,"tag":325,"props":1856,"children":1857},{"style":344},[1858],{"type":53,"value":372},{"type":48,"tag":325,"props":1860,"children":1861},{"style":338},[1862],{"type":53,"value":400},{"type":48,"tag":325,"props":1864,"children":1865},{"style":344},[1866],{"type":53,"value":372},{"type":48,"tag":325,"props":1868,"children":1869},{"style":338},[1870],{"type":53,"value":409},{"type":48,"tag":325,"props":1872,"children":1873},{"style":344},[1874],{"type":53,"value":414},{"type":48,"tag":325,"props":1876,"children":1877},{"style":344},[1878],{"type":53,"value":419},{"type":48,"tag":325,"props":1880,"children":1881},{"style":338},[1882],{"type":53,"value":424},{"type":48,"tag":325,"props":1884,"children":1885},{"class":327,"line":427},[1886,1890,1894],{"type":48,"tag":325,"props":1887,"children":1888},{"style":431},[1889],{"type":53,"value":434},{"type":48,"tag":325,"props":1891,"children":1892},{"style":375},[1893],{"type":53,"value":439},{"type":48,"tag":325,"props":1895,"children":1896},{"style":338},[1897],{"type":53,"value":424},{"type":48,"tag":325,"props":1899,"children":1900},{"class":327,"line":446},[1901,1906],{"type":48,"tag":325,"props":1902,"children":1903},{"style":375},[1904],{"type":53,"value":1905},"  PATH_TO_DATALIST.json",{"type":48,"tag":325,"props":1907,"children":1908},{"style":338},[1909],{"type":53,"value":424},{"type":48,"tag":325,"props":1911,"children":1912},{"class":327,"line":459},[1913,1917,1922],{"type":48,"tag":325,"props":1914,"children":1915},{"style":375},[1916],{"type":53,"value":465},{"type":48,"tag":325,"props":1918,"children":1919},{"style":375},[1920],{"type":53,"value":1921}," PATH_TO_DATA_ROOT",{"type":48,"tag":325,"props":1923,"children":1924},{"style":338},[1925],{"type":53,"value":424},{"type":48,"tag":325,"props":1927,"children":1928},{"class":327,"line":477},[1929,1933,1938],{"type":48,"tag":325,"props":1930,"children":1931},{"style":375},[1932],{"type":53,"value":483},{"type":48,"tag":325,"props":1934,"children":1935},{"style":375},[1936],{"type":53,"value":1937}," runs\u002Fnv_generate_mr_brain_finetune_preflight",{"type":48,"tag":325,"props":1939,"children":1940},{"style":338},[1941],{"type":53,"value":424},{"type":48,"tag":325,"props":1943,"children":1944},{"class":327,"line":495},[1945],{"type":48,"tag":325,"props":1946,"children":1947},{"style":375},[1948],{"type":53,"value":519},{"type":48,"tag":293,"props":1950,"children":1951},{},[1952],{"type":53,"value":1953},"Preflight bundle input:",{"type":48,"tag":314,"props":1955,"children":1957},{"className":316,"code":1956,"language":318,"meta":319,"style":319},"export NV_GENERATE_ROOT=\"${NV_GENERATE_ROOT:-$HOME\u002F.cache\u002Fnvidia-skills\u002Fupstreams\u002FNV-Generate-CTMR-61c4ec7}\" && \\\npython skills\u002Fnv-generate-mr-brain-finetune\u002Fscripts\u002Frun_mr_brain_finetune.py \\\n  PATH_TO_INPUT_BUNDLE\u002Fpreflight_datalist.json \\\n  --data-base-dir PATH_TO_INPUT_BUNDLE\u002Fpreflight_dataset \\\n  --output-dir runs\u002Fnv_generate_mr_brain_finetune_preflight \\\n  --preflight\n",[1958],{"type":48,"tag":73,"props":1959,"children":1960},{"__ignoreMap":319},[1961,2040,2055,2067,2083,2098],{"type":48,"tag":325,"props":1962,"children":1963},{"class":327,"line":328},[1964,1968,1972,1976,1980,1984,1988,1992,1996,2000,2004,2008,2012,2016,2020,2024,2028,2032,2036],{"type":48,"tag":325,"props":1965,"children":1966},{"style":332},[1967],{"type":53,"value":335},{"type":48,"tag":325,"props":1969,"children":1970},{"style":338},[1971],{"type":53,"value":341},{"type":48,"tag":325,"props":1973,"children":1974},{"style":344},[1975],{"type":53,"value":347},{"type":48,"tag":325,"props":1977,"children":1978},{"style":344},[1979],{"type":53,"value":352},{"type":48,"tag":325,"props":1981,"children":1982},{"style":338},[1983],{"type":53,"value":357},{"type":48,"tag":325,"props":1985,"children":1986},{"style":344},[1987],{"type":53,"value":362},{"type":48,"tag":325,"props":1989,"children":1990},{"style":338},[1991],{"type":53,"value":367},{"type":48,"tag":325,"props":1993,"children":1994},{"style":344},[1995],{"type":53,"value":372},{"type":48,"tag":325,"props":1997,"children":1998},{"style":375},[1999],{"type":53,"value":159},{"type":48,"tag":325,"props":2001,"children":2002},{"style":338},[2003],{"type":53,"value":382},{"type":48,"tag":325,"props":2005,"children":2006},{"style":344},[2007],{"type":53,"value":372},{"type":48,"tag":325,"props":2009,"children":2010},{"style":338},[2011],{"type":53,"value":391},{"type":48,"tag":325,"props":2013,"children":2014},{"style":344},[2015],{"type":53,"value":372},{"type":48,"tag":325,"props":2017,"children":2018},{"style":338},[2019],{"type":53,"value":400},{"type":48,"tag":325,"props":2021,"children":2022},{"style":344},[2023],{"type":53,"value":372},{"type":48,"tag":325,"props":2025,"children":2026},{"style":338},[2027],{"type":53,"value":409},{"type":48,"tag":325,"props":2029,"children":2030},{"style":344},[2031],{"type":53,"value":414},{"type":48,"tag":325,"props":2033,"children":2034},{"style":344},[2035],{"type":53,"value":419},{"type":48,"tag":325,"props":2037,"children":2038},{"style":338},[2039],{"type":53,"value":424},{"type":48,"tag":325,"props":2041,"children":2042},{"class":327,"line":427},[2043,2047,2051],{"type":48,"tag":325,"props":2044,"children":2045},{"style":431},[2046],{"type":53,"value":434},{"type":48,"tag":325,"props":2048,"children":2049},{"style":375},[2050],{"type":53,"value":439},{"type":48,"tag":325,"props":2052,"children":2053},{"style":338},[2054],{"type":53,"value":424},{"type":48,"tag":325,"props":2056,"children":2057},{"class":327,"line":446},[2058,2063],{"type":48,"tag":325,"props":2059,"children":2060},{"style":375},[2061],{"type":53,"value":2062},"  PATH_TO_INPUT_BUNDLE\u002Fpreflight_datalist.json",{"type":48,"tag":325,"props":2064,"children":2065},{"style":338},[2066],{"type":53,"value":424},{"type":48,"tag":325,"props":2068,"children":2069},{"class":327,"line":459},[2070,2074,2079],{"type":48,"tag":325,"props":2071,"children":2072},{"style":375},[2073],{"type":53,"value":465},{"type":48,"tag":325,"props":2075,"children":2076},{"style":375},[2077],{"type":53,"value":2078}," PATH_TO_INPUT_BUNDLE\u002Fpreflight_dataset",{"type":48,"tag":325,"props":2080,"children":2081},{"style":338},[2082],{"type":53,"value":424},{"type":48,"tag":325,"props":2084,"children":2085},{"class":327,"line":477},[2086,2090,2094],{"type":48,"tag":325,"props":2087,"children":2088},{"style":375},[2089],{"type":53,"value":483},{"type":48,"tag":325,"props":2091,"children":2092},{"style":375},[2093],{"type":53,"value":1937},{"type":48,"tag":325,"props":2095,"children":2096},{"style":338},[2097],{"type":53,"value":424},{"type":48,"tag":325,"props":2099,"children":2100},{"class":327,"line":495},[2101],{"type":48,"tag":325,"props":2102,"children":2103},{"style":375},[2104],{"type":53,"value":519},{"type":48,"tag":293,"props":2106,"children":2107},{},[2108],{"type":53,"value":2109},"GPU finetuning:",{"type":48,"tag":314,"props":2111,"children":2113},{"className":316,"code":2112,"language":318,"meta":319,"style":319},"export NV_GENERATE_ROOT=\"${NV_GENERATE_ROOT:-$HOME\u002F.cache\u002Fnvidia-skills\u002Fupstreams\u002FNV-Generate-CTMR-61c4ec7}\" && \\\npython -m pip install -r \"$NV_GENERATE_ROOT\u002Frequirements.txt\" && \\\npython skills\u002Fnv-generate-mr-brain-finetune\u002Fscripts\u002Frun_mr_brain_finetune.py \\\n  PATH_TO_DATALIST.json \\\n  --data-base-dir PATH_TO_DATA_ROOT \\\n  --output-dir runs\u002Fnv_generate_mr_brain_finetune \\\n  --epochs 2 \\\n  --modality mri_t1 \\\n  --run-inference\n",[2114],{"type":48,"tag":73,"props":2115,"children":2116},{"__ignoreMap":319},[2117,2196,2248,2263,2274,2289,2305,2323,2338],{"type":48,"tag":325,"props":2118,"children":2119},{"class":327,"line":328},[2120,2124,2128,2132,2136,2140,2144,2148,2152,2156,2160,2164,2168,2172,2176,2180,2184,2188,2192],{"type":48,"tag":325,"props":2121,"children":2122},{"style":332},[2123],{"type":53,"value":335},{"type":48,"tag":325,"props":2125,"children":2126},{"style":338},[2127],{"type":53,"value":341},{"type":48,"tag":325,"props":2129,"children":2130},{"style":344},[2131],{"type":53,"value":347},{"type":48,"tag":325,"props":2133,"children":2134},{"style":344},[2135],{"type":53,"value":352},{"type":48,"tag":325,"props":2137,"children":2138},{"style":338},[2139],{"type":53,"value":357},{"type":48,"tag":325,"props":2141,"children":2142},{"style":344},[2143],{"type":53,"value":362},{"type":48,"tag":325,"props":2145,"children":2146},{"style":338},[2147],{"type":53,"value":367},{"type":48,"tag":325,"props":2149,"children":2150},{"style":344},[2151],{"type":53,"value":372},{"type":48,"tag":325,"props":2153,"children":2154},{"style":375},[2155],{"type":53,"value":159},{"type":48,"tag":325,"props":2157,"children":2158},{"style":338},[2159],{"type":53,"value":382},{"type":48,"tag":325,"props":2161,"children":2162},{"style":344},[2163],{"type":53,"value":372},{"type":48,"tag":325,"props":2165,"children":2166},{"style":338},[2167],{"type":53,"value":391},{"type":48,"tag":325,"props":2169,"children":2170},{"style":344},[2171],{"type":53,"value":372},{"type":48,"tag":325,"props":2173,"children":2174},{"style":338},[2175],{"type":53,"value":400},{"type":48,"tag":325,"props":2177,"children":2178},{"style":344},[2179],{"type":53,"value":372},{"type":48,"tag":325,"props":2181,"children":2182},{"style":338},[2183],{"type":53,"value":409},{"type":48,"tag":325,"props":2185,"children":2186},{"style":344},[2187],{"type":53,"value":414},{"type":48,"tag":325,"props":2189,"children":2190},{"style":344},[2191],{"type":53,"value":419},{"type":48,"tag":325,"props":2193,"children":2194},{"style":338},[2195],{"type":53,"value":424},{"type":48,"tag":325,"props":2197,"children":2198},{"class":327,"line":427},[2199,2203,2208,2213,2218,2223,2227,2231,2236,2240,2244],{"type":48,"tag":325,"props":2200,"children":2201},{"style":431},[2202],{"type":53,"value":434},{"type":48,"tag":325,"props":2204,"children":2205},{"style":375},[2206],{"type":53,"value":2207}," -m",{"type":48,"tag":325,"props":2209,"children":2210},{"style":375},[2211],{"type":53,"value":2212}," pip",{"type":48,"tag":325,"props":2214,"children":2215},{"style":375},[2216],{"type":53,"value":2217}," install",{"type":48,"tag":325,"props":2219,"children":2220},{"style":375},[2221],{"type":53,"value":2222}," -r",{"type":48,"tag":325,"props":2224,"children":2225},{"style":344},[2226],{"type":53,"value":899},{"type":48,"tag":325,"props":2228,"children":2229},{"style":338},[2230],{"type":53,"value":904},{"type":48,"tag":325,"props":2232,"children":2233},{"style":375},[2234],{"type":53,"value":2235},"\u002Frequirements.txt",{"type":48,"tag":325,"props":2237,"children":2238},{"style":344},[2239],{"type":53,"value":858},{"type":48,"tag":325,"props":2241,"children":2242},{"style":344},[2243],{"type":53,"value":419},{"type":48,"tag":325,"props":2245,"children":2246},{"style":338},[2247],{"type":53,"value":424},{"type":48,"tag":325,"props":2249,"children":2250},{"class":327,"line":446},[2251,2255,2259],{"type":48,"tag":325,"props":2252,"children":2253},{"style":431},[2254],{"type":53,"value":434},{"type":48,"tag":325,"props":2256,"children":2257},{"style":375},[2258],{"type":53,"value":439},{"type":48,"tag":325,"props":2260,"children":2261},{"style":338},[2262],{"type":53,"value":424},{"type":48,"tag":325,"props":2264,"children":2265},{"class":327,"line":459},[2266,2270],{"type":48,"tag":325,"props":2267,"children":2268},{"style":375},[2269],{"type":53,"value":1905},{"type":48,"tag":325,"props":2271,"children":2272},{"style":338},[2273],{"type":53,"value":424},{"type":48,"tag":325,"props":2275,"children":2276},{"class":327,"line":477},[2277,2281,2285],{"type":48,"tag":325,"props":2278,"children":2279},{"style":375},[2280],{"type":53,"value":465},{"type":48,"tag":325,"props":2282,"children":2283},{"style":375},[2284],{"type":53,"value":1921},{"type":48,"tag":325,"props":2286,"children":2287},{"style":338},[2288],{"type":53,"value":424},{"type":48,"tag":325,"props":2290,"children":2291},{"class":327,"line":495},[2292,2296,2301],{"type":48,"tag":325,"props":2293,"children":2294},{"style":375},[2295],{"type":53,"value":483},{"type":48,"tag":325,"props":2297,"children":2298},{"style":375},[2299],{"type":53,"value":2300}," runs\u002Fnv_generate_mr_brain_finetune",{"type":48,"tag":325,"props":2302,"children":2303},{"style":338},[2304],{"type":53,"value":424},{"type":48,"tag":325,"props":2306,"children":2307},{"class":327,"line":513},[2308,2313,2319],{"type":48,"tag":325,"props":2309,"children":2310},{"style":375},[2311],{"type":53,"value":2312},"  --epochs",{"type":48,"tag":325,"props":2314,"children":2316},{"style":2315},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2317],{"type":53,"value":2318}," 2",{"type":48,"tag":325,"props":2320,"children":2321},{"style":338},[2322],{"type":53,"value":424},{"type":48,"tag":325,"props":2324,"children":2325},{"class":327,"line":1009},[2326,2330,2334],{"type":48,"tag":325,"props":2327,"children":2328},{"style":375},[2329],{"type":53,"value":501},{"type":48,"tag":325,"props":2331,"children":2332},{"style":375},[2333],{"type":53,"value":506},{"type":48,"tag":325,"props":2335,"children":2336},{"style":338},[2337],{"type":53,"value":424},{"type":48,"tag":325,"props":2339,"children":2341},{"class":327,"line":2340},9,[2342],{"type":48,"tag":325,"props":2343,"children":2344},{"style":375},[2345],{"type":53,"value":2346},"  --run-inference\n",{"type":48,"tag":293,"props":2348,"children":2349},{},[2350,2352,2358,2359,2365],{"type":53,"value":2351},"Replace ",{"type":48,"tag":73,"props":2353,"children":2355},{"className":2354},[],[2356],{"type":53,"value":2357},"PATH_TO_DATALIST.json",{"type":53,"value":127},{"type":48,"tag":73,"props":2360,"children":2362},{"className":2361},[],[2363],{"type":53,"value":2364},"PATH_TO_DATA_ROOT",{"type":53,"value":2366}," with the user's actual paths. Do not use the fixture datalist for real training; it is a preflight-only placeholder.",{"type":48,"tag":56,"props":2368,"children":2370},{"id":2369},"_3-monitor-training-tensorboard",[2371],{"type":53,"value":2372},"3. Monitor training (TensorBoard)",{"type":48,"tag":293,"props":2374,"children":2375},{},[2376,2381,2383,2388,2389,2395],{"type":48,"tag":73,"props":2377,"children":2379},{"className":2378},[],[2380],{"type":53,"value":104},{"type":53,"value":2382}," writes TensorBoard event files under the staged ",{"type":48,"tag":73,"props":2384,"children":2386},{"className":2385},[],[2387],{"type":53,"value":1352},{"type":53,"value":1665},{"type":48,"tag":73,"props":2390,"children":2392},{"className":2391},[],[2393],{"type":53,"value":2394},"OUT_DIR\u002Fartifacts\u002Fmodels",{"type":53,"value":2396},"). Launch TensorBoard against the output directory and watch the loss curve:",{"type":48,"tag":314,"props":2398,"children":2400},{"className":316,"code":2399,"language":318,"meta":319,"style":319},"python -m pip install tensorboard && \\\ntensorboard --logdir runs\u002Fnv_generate_mr_brain_finetune\u002Fartifacts\n",[2401],{"type":48,"tag":73,"props":2402,"children":2403},{"__ignoreMap":319},[2404,2436],{"type":48,"tag":325,"props":2405,"children":2406},{"class":327,"line":328},[2407,2411,2415,2419,2423,2428,2432],{"type":48,"tag":325,"props":2408,"children":2409},{"style":431},[2410],{"type":53,"value":434},{"type":48,"tag":325,"props":2412,"children":2413},{"style":375},[2414],{"type":53,"value":2207},{"type":48,"tag":325,"props":2416,"children":2417},{"style":375},[2418],{"type":53,"value":2212},{"type":48,"tag":325,"props":2420,"children":2421},{"style":375},[2422],{"type":53,"value":2217},{"type":48,"tag":325,"props":2424,"children":2425},{"style":375},[2426],{"type":53,"value":2427}," tensorboard",{"type":48,"tag":325,"props":2429,"children":2430},{"style":344},[2431],{"type":53,"value":419},{"type":48,"tag":325,"props":2433,"children":2434},{"style":338},[2435],{"type":53,"value":424},{"type":48,"tag":325,"props":2437,"children":2438},{"class":327,"line":427},[2439,2444,2449],{"type":48,"tag":325,"props":2440,"children":2441},{"style":431},[2442],{"type":53,"value":2443},"tensorboard",{"type":48,"tag":325,"props":2445,"children":2446},{"style":375},[2447],{"type":53,"value":2448}," --logdir",{"type":48,"tag":325,"props":2450,"children":2451},{"style":375},[2452],{"type":53,"value":2453}," runs\u002Fnv_generate_mr_brain_finetune\u002Fartifacts\n",{"type":48,"tag":293,"props":2455,"children":2456},{},[2457,2459,2465,2467,2473,2475,2481],{"type":53,"value":2458},"The run summary is written to ",{"type":48,"tag":73,"props":2460,"children":2462},{"className":2461},[],[2463],{"type":53,"value":2464},"OUT_DIR\u002Fartifacts\u002Fworkflow_summary.json",{"type":53,"value":2466}," (checkpoint path, embedding sidecars, inference outputs); the JSON the wrapper prints to stdout mirrors the same paths plus ",{"type":48,"tag":73,"props":2468,"children":2470},{"className":2469},[],[2471],{"type":53,"value":2472},"exit_code",{"type":53,"value":2474}," and a ",{"type":48,"tag":73,"props":2476,"children":2478},{"className":2477},[],[2479],{"type":53,"value":2480},"stderr_tail",{"type":53,"value":2482}," for quick triage.",{"type":48,"tag":56,"props":2484,"children":2486},{"id":2485},"_4-hyperparameter-tuning-and-common-pitfalls",[2487],{"type":53,"value":2488},"4. Hyperparameter tuning and common pitfalls",{"type":48,"tag":63,"props":2490,"children":2491},{},[2492,2525,2577,2606,2637],{"type":48,"tag":67,"props":2493,"children":2494},{},[2495,2500,2502,2508,2510,2516,2518,2523],{"type":48,"tag":1042,"props":2496,"children":2497},{},[2498],{"type":53,"value":2499},"Loss not decreasing \u002F unstable",{"type":53,"value":2501}," — lower ",{"type":48,"tag":73,"props":2503,"children":2505},{"className":2504},[],[2506],{"type":53,"value":2507},"diffusion_unet_train.lr",{"type":53,"value":2509}," (default ",{"type":48,"tag":73,"props":2511,"children":2513},{"className":2512},[],[2514],{"type":53,"value":2515},"1e-5",{"type":53,"value":2517},") in the model-config JSON, or keep AMP on (default); ",{"type":48,"tag":73,"props":2519,"children":2521},{"className":2520},[],[2522],{"type":53,"value":1687},{"type":53,"value":2524}," is slower but more numerically stable on older GPUs.",{"type":48,"tag":67,"props":2526,"children":2527},{},[2528,2533,2535,2541,2543,2549,2550,2555,2556,2562,2564,2569,2571,2576],{"type":48,"tag":1042,"props":2529,"children":2530},{},[2531],{"type":53,"value":2532},"Out-of-memory",{"type":53,"value":2534}," — keep ",{"type":48,"tag":73,"props":2536,"children":2538},{"className":2537},[],[2539],{"type":53,"value":2540},"diffusion_unet_train.batch_size",{"type":53,"value":2542}," at ",{"type":48,"tag":73,"props":2544,"children":2546},{"className":2545},[],[2547],{"type":53,"value":2548},"1",{"type":53,"value":127},{"type":48,"tag":73,"props":2551,"children":2553},{"className":2552},[],[2554],{"type":53,"value":1171},{"type":53,"value":2542},{"type":48,"tag":73,"props":2557,"children":2559},{"className":2558},[],[2560],{"type":53,"value":2561},"0",{"type":53,"value":2563}," in the config JSON, and confirm the autoencoder\u002FUNet fit your GPU before scaling. Multi-GPU (",{"type":48,"tag":73,"props":2565,"children":2567},{"className":2566},[],[2568],{"type":53,"value":1663},{"type":53,"value":2570},") shards the batch via ",{"type":48,"tag":73,"props":2572,"children":2574},{"className":2573},[],[2575],{"type":53,"value":1679},{"type":53,"value":159},{"type":48,"tag":67,"props":2578,"children":2579},{},[2580,2585,2586,2591,2593,2598,2600,2605],{"type":48,"tag":1042,"props":2581,"children":2582},{},[2583],{"type":53,"value":2584},"Few cases \u002F quick check",{"type":53,"value":2534},{"type":48,"tag":73,"props":2587,"children":2589},{"className":2588},[],[2590],{"type":53,"value":1552},{"type":53,"value":2592}," small (the wrapper default ",{"type":48,"tag":73,"props":2594,"children":2596},{"className":2595},[],[2597],{"type":53,"value":1561},{"type":53,"value":2599}," is for verification, not convergence; the upstream config ships ",{"type":48,"tag":73,"props":2601,"children":2603},{"className":2602},[],[2604],{"type":53,"value":1569},{"type":53,"value":1428},{"type":48,"tag":67,"props":2607,"children":2608},{},[2609,2614,2616,2621,2623,2628,2630,2635],{"type":48,"tag":1042,"props":2610,"children":2611},{},[2612],{"type":53,"value":2613},"Wrong modality conditioning",{"type":53,"value":2615}," — set ",{"type":48,"tag":73,"props":2617,"children":2619},{"className":2618},[],[2620],{"type":53,"value":1597},{"type":53,"value":2622}," or per-case ",{"type":48,"tag":73,"props":2624,"children":2626},{"className":2625},[],[2627],{"type":53,"value":752},{"type":53,"value":2629}," to a value present in ",{"type":48,"tag":73,"props":2631,"children":2633},{"className":2632},[],[2634],{"type":53,"value":1711},{"type":53,"value":2636},"; a mismatch produces a clear error rather than silently mislabeling latents.",{"type":48,"tag":67,"props":2638,"children":2639},{},[2640,2645,2647,2653,2655,2660],{"type":48,"tag":1042,"props":2641,"children":2642},{},[2643],{"type":53,"value":2644},"Slow startup on first run",{"type":53,"value":2646}," — ",{"type":48,"tag":73,"props":2648,"children":2650},{"className":2649},[],[2651],{"type":53,"value":2652},"diff_model_create_training_data",{"type":53,"value":2654}," precomputes latent embeddings once; reuse the same ",{"type":48,"tag":73,"props":2656,"children":2658},{"className":2657},[],[2659],{"type":53,"value":700},{"type":53,"value":2661}," to avoid recomputing them.",{"type":48,"tag":56,"props":2663,"children":2665},{"id":2664},"_5-evaluate-the-finetuned-model",[2666],{"type":53,"value":2667},"5. Evaluate the finetuned model",{"type":48,"tag":293,"props":2669,"children":2670},{},[2671,2673,2679],{"type":53,"value":2672},"Use the staged checkpoint (",{"type":48,"tag":73,"props":2674,"children":2676},{"className":2675},[],[2677],{"type":53,"value":2678},"OUT_DIR\u002Fartifacts\u002Fmodels\u002F\u003Cmodel_filename>",{"type":53,"value":2680},") as the diffusion UNet for generation, then inspect the synthesized volumes:",{"type":48,"tag":63,"props":2682,"children":2683},{},[2684,2696],{"type":48,"tag":67,"props":2685,"children":2686},{},[2687,2689,2694],{"type":53,"value":2688},"Pass ",{"type":48,"tag":73,"props":2690,"children":2692},{"className":2691},[],[2693],{"type":53,"value":1619},{"type":53,"value":2695}," here for a quick built-in sanity render, or",{"type":48,"tag":67,"props":2697,"children":2698},{},[2699,2701,2711],{"type":53,"value":2700},"Point the ",{"type":48,"tag":526,"props":2702,"children":2704},{"href":2703},"..\u002Fnv-generate-mr-brain\u002FSKILL.md",[2705],{"type":48,"tag":73,"props":2706,"children":2708},{"className":2707},[],[2709],{"type":53,"value":2710},"nv-generate-mr-brain",{"type":53,"value":2712}," inference skill at the finetuned checkpoint to generate fresh brain MRI volumes for qualitative review.",{"type":48,"tag":293,"props":2714,"children":2715},{},[2716],{"type":53,"value":2717},"This skill gates file accounting and command provenance only — anatomical realism and downstream utility must be judged by a domain expert on the generated images.",{"type":48,"tag":56,"props":2719,"children":2721},{"id":2720},"limitations",[2722],{"type":53,"value":2723},"Limitations",{"type":48,"tag":63,"props":2725,"children":2726},{},[2727,2740,2745,2750],{"type":48,"tag":67,"props":2728,"children":2729},{},[2730,2732,2738],{"type":53,"value":2731},"Requires a current upstream ",{"type":48,"tag":73,"props":2733,"children":2735},{"className":2734},[],[2736],{"type":53,"value":2737},"NV-Generate-CTMR",{"type":53,"value":2739}," checkout with the existing diffusion training scripts. The skill itself stages the required config and datalist glue locally and does not depend on the notebook or PR #33.",{"type":48,"tag":67,"props":2741,"children":2742},{},[2743],{"type":53,"value":2744},"Full training can be expensive and is not deterministic across hardware, CUDA, and package versions.",{"type":48,"tag":67,"props":2746,"children":2747},{},[2748],{"type":53,"value":2749},"The wrapper gates file accounting and command provenance, not anatomical realism or downstream model utility.",{"type":48,"tag":67,"props":2751,"children":2752},{},[2753],{"type":53,"value":2754},"Not for clinical deployment, clinical interpretation, autonomous diagnosis, regulatory submission, or production training-data approval.",{"type":48,"tag":56,"props":2756,"children":2758},{"id":2757},"troubleshooting",[2759],{"type":53,"value":2760},"Troubleshooting",{"type":48,"tag":541,"props":2762,"children":2763},{},[2764,2785],{"type":48,"tag":545,"props":2765,"children":2766},{},[2767],{"type":48,"tag":549,"props":2768,"children":2769},{},[2770,2775,2780],{"type":48,"tag":553,"props":2771,"children":2772},{},[2773],{"type":53,"value":2774},"Error",{"type":48,"tag":553,"props":2776,"children":2777},{},[2778],{"type":53,"value":2779},"Cause",{"type":48,"tag":553,"props":2781,"children":2782},{},[2783],{"type":53,"value":2784},"Fix",{"type":48,"tag":568,"props":2786,"children":2787},{},[2788,2829,2863],{"type":48,"tag":549,"props":2789,"children":2790},{},[2791,2800,2810],{"type":48,"tag":575,"props":2792,"children":2793},{},[2794],{"type":48,"tag":73,"props":2795,"children":2797},{"className":2796},[],[2798],{"type":53,"value":2799},"diffusion training scripts were not found",{"type":48,"tag":575,"props":2801,"children":2802},{},[2803,2808],{"type":48,"tag":73,"props":2804,"children":2806},{"className":2805},[],[2807],{"type":53,"value":357},{"type":53,"value":2809}," does not point at a current NV-Generate-CTMR checkout.",{"type":48,"tag":575,"props":2811,"children":2812},{},[2813,2815,2821,2823,2828],{"type":53,"value":2814},"Clone or update ",{"type":48,"tag":73,"props":2816,"children":2818},{"className":2817},[],[2819],{"type":53,"value":2820},"https:\u002F\u002Fgithub.com\u002FNVIDIA-Medtech\u002FNV-Generate-CTMR",{"type":53,"value":2822}," and set ",{"type":48,"tag":73,"props":2824,"children":2826},{"className":2825},[],[2827],{"type":53,"value":357},{"type":53,"value":159},{"type":48,"tag":549,"props":2830,"children":2831},{},[2832,2841,2858],{"type":48,"tag":575,"props":2833,"children":2834},{},[2835],{"type":48,"tag":73,"props":2836,"children":2838},{"className":2837},[],[2839],{"type":53,"value":2840},"missing datalist image",{"type":48,"tag":575,"props":2842,"children":2843},{},[2844,2849,2851,2856],{"type":48,"tag":73,"props":2845,"children":2847},{"className":2846},[],[2848],{"type":53,"value":737},{"type":53,"value":2850}," paths are not relative to ",{"type":48,"tag":73,"props":2852,"children":2854},{"className":2853},[],[2855],{"type":53,"value":283},{"type":53,"value":2857}," or files are absent.",{"type":48,"tag":575,"props":2859,"children":2860},{},[2861],{"type":53,"value":2862},"Fix the datalist or pass the correct data root.",{"type":48,"tag":549,"props":2864,"children":2865},{},[2866,2871,2876],{"type":48,"tag":575,"props":2867,"children":2868},{},[2869],{"type":53,"value":2870},"CUDA or MONAI import failure",{"type":48,"tag":575,"props":2872,"children":2873},{},[2874],{"type":53,"value":2875},"Runtime environment lacks upstream dependencies.",{"type":48,"tag":575,"props":2877,"children":2878},{},[2879,2881,2887],{"type":53,"value":2880},"Install ",{"type":48,"tag":73,"props":2882,"children":2884},{"className":2883},[],[2885],{"type":53,"value":2886},"\"$NV_GENERATE_ROOT\u002Frequirements.txt\"",{"type":53,"value":2888}," in the selected environment.",{"type":48,"tag":2890,"props":2891,"children":2892},"style",{},[2893],{"type":53,"value":2894},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2896,"total":3052},[2897,2915,2932,2943,2955,2969,2982,2994,3007,3018,3032,3041],{"slug":2898,"name":2898,"fn":2899,"description":2900,"org":2901,"tags":2902,"stars":2912,"repoUrl":2913,"updatedAt":2914},"nemoclaw-user-guide","retrieve NemoClaw documentation and configuration","Guides human users' AI agents to the NemoClaw docs MCP server and canonical Fern documentation in Markdown form. Use when users ask how to install, configure, operate, troubleshoot, secure, or learn NemoClaw with an AI coding assistant. Trigger keywords - nemoclaw docs, use nemoclaw with ai agent, nemoclaw mcp docs, nemoclaw install help, nemoclaw quickstart, nemoclaw markdown docs, llms.txt, agent skills.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2903,2906,2909],{"name":2904,"slug":2905,"type":15},"Documentation","documentation",{"name":2907,"slug":2908,"type":15},"MCP","mcp",{"name":2910,"slug":2911,"type":15},"Search","search",21777,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FNemoClaw","2026-07-20T06:00:01.461044",{"slug":2916,"name":2916,"fn":2917,"description":2918,"org":2919,"tags":2920,"stars":2929,"repoUrl":2930,"updatedAt":2931},"mcore-build-and-dependency","manage Megatron-LM development environments","Container-based dev environment setup and dependency management for Megatron-LM. Covers acquiring and launching the CI container, uv package management, and updating uv.lock.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2921,2924,2927],{"name":2922,"slug":2923,"type":15},"Containers","containers",{"name":2925,"slug":2926,"type":15},"Deployment","deployment",{"name":2928,"slug":434,"type":15},"Python",17049,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FMegatron-LM","2026-07-27T06:06:11.249662",{"slug":2933,"name":2933,"fn":2934,"description":2935,"org":2936,"tags":2937,"stars":2929,"repoUrl":2930,"updatedAt":2942},"mcore-bump-base-image","update NVIDIA PyTorch base images","Bump the NVIDIA PyTorch base image (`nvcr.io\u002Fnvidia\u002Fpytorch:YY.MM-py3`) used by Megatron-LM CI. Covers the two pin sites (GitHub CI in `docker\u002F.ngc_version.dev` and GitLab CI in `.gitlab\u002Fstages\u002F01.build.yml`), the post-bump CI loop (re-run functional tests, refresh golden values, mark broken tests), and the gotchas that bit PRs",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2938,2941],{"name":2939,"slug":2940,"type":15},"CI\u002FCD","ci-cd",{"name":2925,"slug":2926,"type":15},"2026-07-14T05:25:59.97109",{"slug":2944,"name":2944,"fn":2945,"description":2946,"org":2947,"tags":2948,"stars":2929,"repoUrl":2930,"updatedAt":2954},"mcore-cicd","manage CI\u002FCD pipelines for Megatron-LM","CI\u002FCD reference for Megatron-LM. Covers CI pipeline structure, PR scope labels, triggering internal GitLab CI (which force-pushes the current branch to a pull-request\u002FBRANCH ref — always dry-run and verify the destination first; never run against shared or protected branches), and CI failure investigation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2949,2950,2951],{"name":2939,"slug":2940,"type":15},{"name":2925,"slug":2926,"type":15},{"name":2952,"slug":2953,"type":15},"GitHub","github","2026-07-27T06:06:12.278222",{"slug":2956,"name":2956,"fn":2957,"description":2958,"org":2959,"tags":2960,"stars":2929,"repoUrl":2930,"updatedAt":2968},"mcore-create-issue","investigate CI failures and create issues","Investigate a failing GitHub Actions run or job and create a GitHub issue for the failure.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2961,2964,2965],{"name":2962,"slug":2963,"type":15},"Debugging","debugging",{"name":2952,"slug":2953,"type":15},{"name":2966,"slug":2967,"type":15},"Triage","triage","2026-07-14T05:25:57.442089",{"slug":2970,"name":2970,"fn":2971,"description":2972,"org":2973,"tags":2974,"stars":2929,"repoUrl":2930,"updatedAt":2981},"mcore-linting-and-formatting","lint and format Megatron-LM code","Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2975,2978],{"name":2976,"slug":2977,"type":15},"Best Practices","best-practices",{"name":2979,"slug":2980,"type":15},"Code Analysis","code-analysis","2026-07-14T05:25:56.18433",{"slug":2983,"name":2983,"fn":2984,"description":2985,"org":2986,"tags":2987,"stars":2929,"repoUrl":2930,"updatedAt":2993},"mcore-migrate-gpt-to-hybrid","migrate Megatron-LM models to HybridModel","Migration guide for moving Megatron Core GPTModel checkpoints, model providers, training commands, and layer mappings to HybridModel.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2988,2989,2992],{"name":13,"slug":14,"type":15},{"name":2990,"slug":2991,"type":15},"Migration","migration",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:11.777011",{"slug":2995,"name":2995,"fn":2996,"description":2997,"org":2998,"tags":2999,"stars":2929,"repoUrl":2930,"updatedAt":3006},"mcore-onboard-gb200-1node-tests","onboard functional tests for GB200","Onboard 1-node GitHub MR functional tests for GB200 from existing mr-scoped 2-node tests.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3000,3003],{"name":3001,"slug":3002,"type":15},"QA","qa",{"name":3004,"slug":3005,"type":15},"Testing","testing","2026-07-14T05:25:53.673039",{"slug":3008,"name":3008,"fn":3009,"description":3010,"org":3011,"tags":3012,"stars":2929,"repoUrl":2930,"updatedAt":3017},"mcore-run-on-slurm","launch distributed training jobs on SLURM","How to launch distributed Megatron-LM training jobs on a SLURM cluster. Covers a minimal sbatch skeleton, environment-variable setup for torch.distributed.run, CUDA_DEVICE_MAX_CONNECTIONS rules across hardware and parallelism modes, container conventions, monitoring, and per-rank failure diagnosis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3013,3014],{"name":2925,"slug":2926,"type":15},{"name":3015,"slug":3016,"type":15},"Infrastructure","infrastructure","2026-07-14T05:25:49.362534",{"slug":3019,"name":3019,"fn":3020,"description":3021,"org":3022,"tags":3023,"stars":2929,"repoUrl":2930,"updatedAt":3031},"mcore-split-pr","split pull requests to reduce review load","Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3024,3027,3028],{"name":3025,"slug":3026,"type":15},"Code Review","code-review",{"name":2952,"slug":2953,"type":15},{"name":3029,"slug":3030,"type":15},"Pull Requests","pull-requests","2026-07-14T05:26:01.226578",{"slug":3033,"name":3033,"fn":3034,"description":3035,"org":3036,"tags":3037,"stars":2929,"repoUrl":2930,"updatedAt":3040},"mcore-testing","run and manage Megatron-LM tests","Test system for Megatron-LM. Covers test layout, recipe YAML structure, adding and running unit and functional tests, golden values, marker filters, and CI parity.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3038,3039],{"name":3001,"slug":3002,"type":15},{"name":3004,"slug":3005,"type":15},"2026-07-14T05:25:54.928983",{"slug":3042,"name":3042,"fn":3043,"description":3044,"org":3045,"tags":3046,"stars":2929,"repoUrl":2930,"updatedAt":3051},"nightly-sync","manage nightly main-to-dev sync workflows","Domain knowledge for the nightly main-to-dev sync workflow. Covers merge strategy, CI architecture, failure investigation, and known issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3047,3050],{"name":3048,"slug":3049,"type":15},"Automation","automation",{"name":2939,"slug":2940,"type":15},"2026-07-30T05:29:03.275638",496,{"items":3054,"total":3148},[3055,3072,3082,3096,3106,3119,3134],{"slug":3056,"name":3056,"fn":3057,"description":3058,"org":3059,"tags":3060,"stars":23,"repoUrl":24,"updatedAt":3071},"accelerated-computing-cudf","accelerate data processing with cuDF","Official NVIDIA-authored guidance for NVIDIA cuDF GPU DataFrames, pandas acceleration, dask-cuDF, ETL, joins, groupby, CSV\u002FParquet I\u002FO, nullable semantics, and multi-GPU DataFrame workloads.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3061,3064,3067,3068],{"name":3062,"slug":3063,"type":15},"Data Analysis","data-analysis",{"name":3065,"slug":3066,"type":15},"Data Engineering","data-engineering",{"name":9,"slug":8,"type":15},{"name":3069,"slug":3070,"type":15},"Performance","performance","2026-07-14T05:28:43.176466",{"slug":3073,"name":3073,"fn":3074,"description":3075,"org":3076,"tags":3077,"stars":23,"repoUrl":24,"updatedAt":3081},"aiq-deploy","deploy and manage NVIDIA AI-Q infrastructure","Use when asked to install, deploy, run, validate, troubleshoot, or stop NVIDIA AI-Q Blueprint infrastructure.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3078,3079,3080],{"name":2925,"slug":2926,"type":15},{"name":3015,"slug":3016,"type":15},{"name":9,"slug":8,"type":15},"2026-07-14T05:29:06.667109",{"slug":3083,"name":3083,"fn":3084,"description":3085,"org":3086,"tags":3087,"stars":23,"repoUrl":24,"updatedAt":3095},"aiq-research","conduct deep research with AI-Q","Use when asked to run deep research or AI-Q research through a reachable NVIDIA AI-Q Blueprint backend.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3088,3091,3092],{"name":3089,"slug":3090,"type":15},"Agents","agents",{"name":9,"slug":8,"type":15},{"name":3093,"slug":3094,"type":15},"Research","research","2026-07-14T05:28:06.816956",{"slug":3097,"name":3097,"fn":3098,"description":3099,"org":3100,"tags":3101,"stars":23,"repoUrl":24,"updatedAt":3105},"amc-run-sample-calibration","run AMC sample dataset calibration","Run end-to-end calibration on the shipped sample dataset (sdg_08_2_sample_data_010926.zip) against a running AMC microservice. Use when user says 'test sample dataset', 'run sample calibration', 'verify AMC install', or 'launch and test'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3102,3103,3104],{"name":3062,"slug":3063,"type":15},{"name":9,"slug":8,"type":15},{"name":3004,"slug":3005,"type":15},"2026-07-17T05:29:03.913266",{"slug":3107,"name":3107,"fn":3108,"description":3109,"org":3110,"tags":3111,"stars":23,"repoUrl":24,"updatedAt":3118},"amc-run-video-calibration","calibrate video datasets with AutoMagicCalib","Calibrate a new dataset from pre-recorded video files via the AutoMagicCalib REST API. Use when user has local MP4s and says 'calibrate my videos', 'run AMC on these videos', or similar. For RTSP\u002Flive streams, use amc-run-rtsp-calibration instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3112,3113,3114,3115],{"name":3048,"slug":3049,"type":15},{"name":21,"slug":22,"type":15},{"name":9,"slug":8,"type":15},{"name":3116,"slug":3117,"type":15},"Video","video","2026-07-17T05:28:53.905004",{"slug":3120,"name":3120,"fn":3121,"description":3122,"org":3123,"tags":3124,"stars":23,"repoUrl":24,"updatedAt":3133},"amc-setup-calibration-stack","deploy AutoMagicCalib microservice with Docker","Launch AutoMagicCalib microservice and web UI from NGC release images via Docker Compose. Use when user says 'deploy auto calibration', 'launch auto calibration', 'launch AMC', 'start MS+UI', or 'set up auto-magic-calib'. Requires NGC API key.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3125,3126,3129,3130],{"name":2925,"slug":2926,"type":15},{"name":3127,"slug":3128,"type":15},"Docker","docker",{"name":9,"slug":8,"type":15},{"name":3131,"slug":3132,"type":15},"Operations","operations","2026-07-17T05:28:56.913999",{"slug":3135,"name":3135,"fn":3136,"description":3137,"org":3138,"tags":3139,"stars":23,"repoUrl":24,"updatedAt":3147},"cudaq-guide","develop quantum applications with CUDA-Q","CUDA-Q onboarding guide for installation, test programs, GPU simulation, QPU hardware, and quantum applications.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[3140,3141,3144],{"name":9,"slug":8,"type":15},{"name":3142,"slug":3143,"type":15},"Quantum Computing","quantum-computing",{"name":3145,"slug":3146,"type":15},"Simulation","simulation","2026-07-14T05:26:58.898253",305]