-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modification of metadata to remove generative package requirement, no…
… longer necessary. On inference, modification of the entry point from save_jpg to run to allow for run to be called alone, and truncation of loading statements which are too long. Modification of the README to include command example changes.
- Loading branch information
Virginia
committed
Dec 12, 2024
1 parent
fe87cb4
commit 315276b
Showing
3 changed files
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,8 @@ | |
"with_decoder_nonlocal_attn": false | ||
}, | ||
"load_autoencoder_path": "$@model_dir + '/autoencoder.pth'", | ||
"load_autoencoder": "$@autoencoder_def.load_old_state_dict(torch.load(@load_autoencoder_path)) if bool(@load_old) else @autoencoder_def.load_state_dict(torch.load(@load_autoencoder_path))", | ||
"load_autoencoder_func": "$@autoencoder_def.load_old_state_dict if bool(@load_old) else @autoencoder_def.load_state_dict", | ||
"load_autoencoder": "$@load_autoencoder_func(torch.load(@load_autoencoder_path))", | ||
"autoencoder": "$@autoencoder_def.to(@device)", | ||
"diffusion_def": { | ||
"_target_": "monai.networks.nets.DiffusionModelUNet", | ||
|
@@ -76,7 +77,8 @@ | |
"cross_attention_dim": 1024 | ||
}, | ||
"load_diffusion_path": "$@model_dir + '/diffusion_model.pth'", | ||
"load_diffusion": "$@diffusion_def.load_old_state_dict(torch.load(@load_diffusion_path)) if bool(@load_old) else @diffusion_def.load_state_dict(torch.load(@load_diffusion_path))", | ||
"load_diffusion_func": "$@diffusion_def.load_old_state_dict if bool(@load_old) else @diffusion_def.load_state_dict", | ||
"load_diffusion": "$@load_diffusion_func(torch.load(@load_diffusion_path))", | ||
"diffusion": "$@diffusion_def.to(@device)", | ||
"scheduler": { | ||
"_target_": "monai.networks.schedulers.DDIMScheduler", | ||
|
@@ -103,6 +105,6 @@ | |
"_requires_": "@create_output_dir", | ||
"output_dir": "@output_dir" | ||
}, | ||
"save_jpg": "[email protected](@sample, @out_file)", | ||
"run": "[email protected](@sample, @out_file)", | ||
"save": "$torch.save(@sample, @output_dir + '/' + @out_file + '.pt')" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters