Skip to content

Commit 9be20ed

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 10e4bf7 commit 9be20ed

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

generation/maisi/maisi_diff_unet_training_tutorial.ipynb

+5-8
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
"metadata": {},
5252
"outputs": [],
5353
"source": [
54-
"maisi_version = 'maisi-ddpm'\n",
55-
"assert maisi_version in ['maisi-ddpm', 'maisi-rflow']"
54+
"maisi_version = \"maisi-ddpm\"\n",
55+
"assert maisi_version in [\"maisi-ddpm\", \"maisi-rflow\"]"
5656
]
5757
},
5858
{
@@ -243,10 +243,10 @@
243243
"source": [
244244
"env_config_path = \"./configs/environment_maisi_diff_model.json\"\n",
245245
"model_config_path = \"./configs/config_maisi_diff_model.json\"\n",
246-
"if maisi_version == 'maisi-ddpm':\n",
246+
"if maisi_version == \"maisi-ddpm\":\n",
247247
" model_def_path = \"./configs/config_maisi-ddpm.json\"\n",
248248
" include_body_region = True\n",
249-
"elif maisi_version == 'maisi-rflow':\n",
249+
"elif maisi_version == \"maisi-rflow\":\n",
250250
" model_def_path = \"./configs/config_maisi-rflow.json\"\n",
251251
" include_body_region = False\n",
252252
"else:\n",
@@ -466,10 +466,7 @@
466466
" spacing = [float(_item) for _item in spacing]\n",
467467
"\n",
468468
" # Create the dictionary with the specified keys and values\n",
469-
" data = {\n",
470-
" \"dim\": dimensions,\n",
471-
" \"spacing\": spacing\n",
472-
" }\n",
469+
" data = {\"dim\": dimensions, \"spacing\": spacing}\n",
473470
" if include_body_region:\n",
474471
" # The region can be selected from one of four regions from top to bottom.\n",
475472
" # [1,0,0,0] is the head and neck, [0,1,0,0] is the chest region, [0,0,1,0]\n",

generation/maisi/scripts/diff_model_infer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def run_inference(
179179
image, _ = noise_scheduler.step(model_output, t, image, next_t) # type: ignore
180180

181181
inferer = SlidingWindowInferer(
182-
roi_size=[80,80,80],
182+
roi_size=[80, 80, 80],
183183
sw_batch_size=1,
184184
progress=True,
185185
mode="gaussian",

0 commit comments

Comments
 (0)