-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix zvar loss * add hifa options for dreamfusion and vsd * add hifa config Co-authored-by: JunzheJosephZhu <junzhe.joseph.zhu@gmail.com> Co-authored-by: Junzhe Zhu <josef@ampere1.stanford.edu>
- Loading branch information
1 parent
253a072
commit 7afa727
Showing
39 changed files
with
1,138 additions
and
54 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
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
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
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 |
---|---|---|
|
@@ -103,6 +103,7 @@ system: | |
lambda_sparsity: 0.0 | ||
lambda_opaque: 0.0 | ||
|
||
|
||
optimizer: | ||
name: Adan | ||
args: | ||
|
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 |
---|---|---|
|
@@ -144,6 +144,7 @@ system: | |
lambda_sparsity: 0.1 | ||
lambda_opaque: 0.1 | ||
|
||
|
||
optimizer: | ||
name: Adam | ||
args: | ||
|
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 |
---|---|---|
|
@@ -138,6 +138,7 @@ system: | |
lambda_sparsity: 0. | ||
lambda_opaque: 0. | ||
|
||
|
||
optimizer: | ||
name: Adam | ||
args: | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
name: "hifa-unified" | ||
tag: "${rmspace:${system.prompt_processor.prompt},_}" | ||
exp_root_dir: "outputs" | ||
seed: 0 | ||
|
||
data_type: "random-camera-datamodule" | ||
data: | ||
batch_size: 1 | ||
width: 512 | ||
height: 512 | ||
camera_distance_range: [1.0, 1.5] | ||
fovy_range: [40, 70] | ||
elevation_range: [-10, 45] | ||
camera_perturb: 0. | ||
center_perturb: 0. | ||
up_perturb: 0. | ||
eval_camera_distance: 1.5 | ||
eval_fovy_deg: 70. | ||
|
||
system_type: "dreamfusion-system" | ||
system: | ||
geometry_type: "implicit-volume" | ||
geometry: | ||
radius: 1.0 | ||
normal_type: null | ||
|
||
density_bias: "blob_magic3d" | ||
density_activation: softplus | ||
density_blob_scale: 10. | ||
density_blob_std: 0.5 | ||
|
||
pos_encoding_config: | ||
otype: HashGrid | ||
n_levels: 16 | ||
n_features_per_level: 2 | ||
log2_hashmap_size: 19 | ||
base_resolution: 16 | ||
per_level_scale: 1.447269237440378 # max resolution 4096 | ||
|
||
material_type: "no-material" | ||
material: | ||
n_output_dims: 3 | ||
color_activation: sigmoid | ||
|
||
background_type: "neural-environment-map-background" | ||
background: | ||
color_activation: sigmoid | ||
random_aug: true | ||
|
||
|
||
renderer_type: "nerf-volume-renderer" | ||
renderer: | ||
radius: ${system.geometry.radius} | ||
num_samples_per_ray: 512 | ||
|
||
prompt_processor_type: "stable-diffusion-prompt-processor" | ||
prompt_processor: | ||
pretrained_model_name_or_path: "stabilityai/stable-diffusion-2-1-base" | ||
prompt: ??? | ||
|
||
guidance_type: "stable-diffusion-unified-guidance" | ||
guidance: | ||
guidance_type: "sds" | ||
pretrained_model_name_or_path: "stabilityai/stable-diffusion-2-1-base" | ||
guidance_scale: 100. | ||
weighting_strategy: dreamfusion | ||
min_step_percent: 0.3 | ||
max_step_percent: 0.98 | ||
use_img_loss: true | ||
sqrt_anneal: true | ||
|
||
loggers: | ||
wandb: | ||
enable: false | ||
project: "threestudio" | ||
name: None | ||
|
||
loss: | ||
lambda_sd: 1. | ||
lambda_sd_img: 0.01 | ||
lambda_orient: 0. | ||
lambda_sparsity: 1. | ||
lambda_opaque: 0. | ||
lambda_z_variance: 100. | ||
|
||
optimizer: | ||
name: Adam | ||
args: | ||
lr: 0.01 | ||
betas: [0.9, 0.99] | ||
eps: 1.e-15 | ||
params: | ||
geometry.encoding: | ||
lr: 0.01 | ||
geometry.density_network: | ||
lr: 0.001 | ||
geometry.feature_network: | ||
lr: 0.001 | ||
background: | ||
lr: 0.001 | ||
trainer: | ||
max_steps: 25000 | ||
log_every_n_steps: 1 | ||
num_sanity_val_steps: 0 | ||
val_check_interval: 200 | ||
enable_progress_bar: true | ||
precision: 32 | ||
|
||
checkpoint: | ||
save_last: true # save at each validation time | ||
save_top_k: -1 | ||
every_n_train_steps: ${trainer.max_steps} |
120 changes: 120 additions & 0 deletions
120
configs/experimental/unified-guidance/prolificdreamer-hifa.yaml
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 |
---|---|---|
@@ -0,0 +1,120 @@ | ||
name: "prolificdreamer-hifa-unified" | ||
tag: "${rmspace:${system.prompt_processor.prompt},_}" | ||
exp_root_dir: "outputs" | ||
seed: 0 | ||
|
||
data_type: "random-camera-datamodule" | ||
data: | ||
batch_size: [1, 1] | ||
# 0-4999: 64x64, >=5000: 512x512 | ||
# this drastically reduces VRAM usage as empty space is pruned in early training | ||
width: [64, 512] | ||
height: [64, 512] | ||
resolution_milestones: [5000] | ||
camera_distance_range: [1.0, 1.5] | ||
fovy_range: [40, 70] | ||
elevation_range: [-10, 45] | ||
camera_perturb: 0. | ||
center_perturb: 0. | ||
up_perturb: 0. | ||
eval_camera_distance: 1.5 | ||
eval_fovy_deg: 70. | ||
|
||
system_type: "prolificdreamer-system" | ||
system: | ||
stage: coarse | ||
geometry_type: "implicit-volume" | ||
geometry: | ||
radius: 1.0 | ||
normal_type: null | ||
|
||
density_bias: "blob_magic3d" | ||
density_activation: softplus | ||
density_blob_scale: 10. | ||
density_blob_std: 0.5 | ||
|
||
pos_encoding_config: | ||
otype: HashGrid | ||
n_levels: 16 | ||
n_features_per_level: 2 | ||
log2_hashmap_size: 19 | ||
base_resolution: 16 | ||
per_level_scale: 1.447269237440378 # max resolution 4096 | ||
|
||
material_type: "no-material" | ||
material: | ||
n_output_dims: 3 | ||
color_activation: sigmoid | ||
|
||
background_type: "neural-environment-map-background" | ||
background: | ||
color_activation: sigmoid | ||
random_aug: true | ||
|
||
renderer_type: "nerf-volume-renderer" | ||
renderer: | ||
radius: ${system.geometry.radius} | ||
num_samples_per_ray: 512 | ||
|
||
prompt_processor_type: "stable-diffusion-prompt-processor" | ||
prompt_processor: | ||
pretrained_model_name_or_path: "stabilityai/stable-diffusion-2-1-base" | ||
prompt: ??? | ||
front_threshold: 30. | ||
back_threshold: 30. | ||
|
||
guidance_type: "stable-diffusion-unified-guidance" | ||
guidance: | ||
guidance_type: "vsd" | ||
pretrained_model_name_or_path: "stabilityai/stable-diffusion-2-1-base" | ||
guidance_scale: 7.5 | ||
weighting_strategy: dreamfusion | ||
min_step_percent: 0.3 | ||
max_step_percent: 0.98 | ||
vsd_phi_model_name_or_path: "stabilityai/stable-diffusion-2-1" | ||
sqrt_anneal: true | ||
use_img_loss: true | ||
|
||
loggers: | ||
wandb: | ||
enable: false | ||
project: "threestudio" | ||
name: None | ||
|
||
loss: | ||
lambda_sd: 1. | ||
lambda_sd_img: 0.01 | ||
lambda_train_phi: 1. | ||
lambda_orient: 0. | ||
lambda_sparsity: 10. | ||
lambda_opaque: [10000, 0.0, 1000.0, 10001] | ||
lambda_z_variance: 300. | ||
optimizer: | ||
name: AdamW | ||
args: | ||
betas: [0.9, 0.99] | ||
eps: 1.e-15 | ||
params: | ||
geometry.encoding: | ||
lr: 0.01 | ||
geometry.density_network: | ||
lr: 0.001 | ||
geometry.feature_network: | ||
lr: 0.001 | ||
background: | ||
lr: 0.001 | ||
guidance: | ||
lr: 0.0001 | ||
|
||
trainer: | ||
max_steps: 25000 | ||
log_every_n_steps: 1 | ||
num_sanity_val_steps: 0 | ||
val_check_interval: 200 | ||
enable_progress_bar: true | ||
precision: 32 | ||
|
||
checkpoint: | ||
save_last: true | ||
save_top_k: -1 | ||
every_n_train_steps: ${trainer.max_steps} |
Oops, something went wrong.