-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #508 from ottogin/threestudio-integration
Implementation of Score Distillation via Inversion
- Loading branch information
Showing
10 changed files
with
1,670 additions
and
7 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,120 @@ | ||
name: "score-distillation-via-inversion" # https://arxiv.org/abs/2405.15891 | ||
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.5, 2.0] | ||
fovy_range: [40, 70] | ||
elevation_range: [-10, 45] | ||
light_sample_strategy: "dreamfusion" | ||
eval_camera_distance: 2.0 | ||
eval_fovy_deg: 70. | ||
|
||
system_type: "sdi-system" | ||
system: | ||
geometry_type: "implicit-volume" | ||
geometry: | ||
radius: 2.0 | ||
normal_type: "analytic" | ||
|
||
# use Magic3D density initialization | ||
density_bias: "blob_magic3d" | ||
density_activation: softplus | ||
density_blob_scale: 10. | ||
density_blob_std: 0.5 | ||
|
||
# coarse to fine hash grid encoding | ||
# to ensure smooth analytic normals | ||
pos_encoding_config: | ||
otype: ProgressiveBandHashGrid | ||
n_levels: 16 | ||
n_features_per_level: 2 | ||
log2_hashmap_size: 19 | ||
base_resolution: 16 | ||
per_level_scale: 1.447269237440378 # max resolution 4096 | ||
start_level: 8 # resolution ~200 | ||
start_step: 2000 | ||
update_steps: 500 | ||
|
||
material_type: "diffuse-with-point-light-material" | ||
material: | ||
ambient_only_steps: 1000 | ||
albedo_activation: sigmoid | ||
diffuse_prob: 0.3 | ||
textureless_prob: 0.75 | ||
ambient_only_on_test: true | ||
|
||
background_type: "neural-environment-map-background" | ||
background: | ||
color_activation: sigmoid | ||
|
||
renderer_type: "nerf-volume-renderer" | ||
renderer: | ||
radius: ${system.geometry.radius} | ||
num_samples_per_ray: 512 | ||
return_comp_normal: true | ||
|
||
prompt_processor_type: "stable-diffusion-prompt-processor" | ||
prompt_processor: | ||
pretrained_model_name_or_path: "stabilityai/stable-diffusion-2-1-base" | ||
prompt: ??? | ||
use_perp_neg: true | ||
|
||
guidance_type: "stable-diffusion-sdi-guidance" | ||
guidance: | ||
pretrained_model_name_or_path: "stabilityai/stable-diffusion-2-1-base" | ||
guidance_scale: 7.5 | ||
weighting_strategy: sds | ||
min_step_percent: 0.25 | ||
max_step_percent: 0.98 | ||
|
||
# SDI parameters | ||
enable_sdi: true | ||
inversion_guidance_scale: -7.5 | ||
inversion_n_steps: 10 | ||
inversion_eta: 0.3 | ||
t_anneal: true | ||
|
||
loggers: | ||
wandb: | ||
enable: false | ||
project: "threestudio" | ||
name: None | ||
|
||
loss: | ||
lambda_sdi: 1. | ||
lambda_orient: 0.1 | ||
lambda_sparsity: [0,0.15,0.,3000] | ||
lambda_opaque: 0.1 | ||
lambda_convex: [0,1.,0.1,4000] | ||
lambda_z_variance: 1. | ||
|
||
optimizer: | ||
name: Adam | ||
args: | ||
lr: 0.01 | ||
betas: [0.9, 0.99] | ||
eps: 1.e-15 | ||
params: | ||
geometry: | ||
lr: 0.01 | ||
background: | ||
lr: 0.001 | ||
|
||
trainer: | ||
max_steps: 10000 | ||
log_every_n_steps: 1 | ||
num_sanity_val_steps: 0 | ||
val_check_interval: 50 | ||
enable_progress_bar: true | ||
precision: 16-mixed | ||
|
||
checkpoint: | ||
save_last: true # save at each validation time | ||
save_top_k: -1 | ||
every_n_train_steps: ${trainer.max_steps} |
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
Oops, something went wrong.