Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions generation/maisi/scripts/diff_model_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,13 +480,13 @@ def diff_model_train(
parser.add_argument(
"--env_config",
type=str,
default="./configs/environment_maisi_diff_model_train.json",
default="./configs/environment_maisi_diff_model.json",
help="Path to environment configuration file",
)
parser.add_argument(
"--model_config",
type=str,
default="./configs/config_maisi_diff_model_train.json",
default="./configs/config_maisi_diff_model.json",
help="Path to model training/inference configuration",
)
parser.add_argument(
Expand Down
4 changes: 2 additions & 2 deletions generation/maisi/scripts/train_controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def main():
parser.add_argument(
"-c",
"--config-file",
default="./configs/config_maisi.json",
default="./configs/config_maisi-ddpm.json",
help="config json file that stores network hyper-parameters",
)
parser.add_argument(
Expand Down Expand Up @@ -269,7 +269,7 @@ def main():
for label in weighted_loss_label:
roi[interpolate_label == label] = 1
weights[roi.repeat(1, images.shape[1], 1, 1, 1) == 1] = weighted_loss
loss = (F.l1_loss(noise_pred.float(), model_gt.float(), reduction="none") * weights).mean()
loss = (F.l1_loss(model_output.float(), model_gt.float(), reduction="none") * weights).mean()
else:
loss = F.l1_loss(model_output.float(), model_gt.float())

Expand Down
Loading