Skip to content

Commit

Permalink
test22_use_Vikram_anya3_finally_correct_image
Browse files Browse the repository at this point in the history
- also fix max_items_eval
  • Loading branch information
claforte committed Jul 7, 2023
1 parent f95c771 commit 8097f02
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configs/experimental/imagecondition_zero123nerf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ system:
min_step_percent: [0, 0.03, 0.02, 2000] # (start_iter, start_val, end_val, end_iter)
#max_step_percent: 0.6
max_step_percent: [0, 0.3, 0.3, 2000]
max_items_to_save: 1
max_items_eval: 1

# Vikram changes:
# guidance_scale: 100
Expand Down
2 changes: 1 addition & 1 deletion configs/zero123.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ system:
cond_azimuth_deg: ${data.default_azimuth_deg}
cond_camera_distance: ${data.default_camera_distance}
guidance_scale: 3.0
max_items_to_save: 4
max_items_eval: 4

min_step_percent: [0, 0.4, 0.2, 200] # (start_iter, start_val, end_val, end_iter)
max_step_percent: [0, 0.85, 0.5, 200]
Expand Down
2 changes: 1 addition & 1 deletion threestudio/models/guidance/stable_diffusion_guidance.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ def guidance_eval(
imgs_1orig = self.decode_latents(pred_1orig).permute(0, 2, 3, 1)

latents_final = []
for b, i in enumerate(idxs[:max_items]):
for b, i in enumerate(idxs[:bs]):
latents = latents_1step[b : b + 1]
text_emb = (
text_embeddings[
Expand Down
16 changes: 16 additions & 0 deletions threestudio/scripts/run_zero123_phase2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,19 @@ python launch.py --config configs/experimental/imagecondition_zero123nerf.yaml -
system.weights="outputs/anya_front/Phase1/ckpts/last.ckpt" system.freq.guidance_eval=13 \
system.loggers.wandb.enable=true system.loggers.wandb.project="claforte-anya-new-ph2" \
data.image_path=./load/images/anya_front_rgba.png system.loggers.wandb.name="test20_use_Vikram_anya"

# test21_use_Vikram_anya2_correct_image
srun --account mod3d --partition=g40 --gpus=1 --job-name=3s_anya \
python launch.py --config configs/experimental/imagecondition_zero123nerf.yaml --train \
system.prompt_processor.prompt="A DSLR 3D photo of a cute anime schoolgirl stands proudly with her arms in the air, pink hair ( unreal engine 5 trending on Artstation Ghibli 4k )" \
system.weights="outputs/anya_front/Phase1/ckpts/last.ckpt" system.freq.guidance_eval=13 \
system.loggers.wandb.enable=true system.loggers.wandb.project="claforte-anya-new-ph2" \
data.image_path=./load/images/anya_front_rgba.png system.loggers.wandb.name="test21_use_Vikram_anya2_correct_image"

# test22_use_Vikram_anya3_finally_correct_image
srun --account mod3d --partition=g40 --gpus=1 --job-name=3s_anya \
python launch.py --config configs/experimental/imagecondition_zero123nerf.yaml --train \
system.prompt_processor.prompt="A DSLR 3D photo of a cute anime schoolgirl stands proudly with her arms in the air, pink hair ( unreal engine 5 trending on Artstation Ghibli 4k )" \
system.weights="outputs/anya_front/Phase1/ckpts/last.ckpt" system.freq.guidance_eval=13 \
system.loggers.wandb.enable=true system.loggers.wandb.project="claforte-anya-new-ph2" \
data.image_path=./load/images/anya_front_rgba.png system.loggers.wandb.name="test22_use_Vikram_anya3_finally_correct_image"
2 changes: 1 addition & 1 deletion threestudio/systems/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def on_predict_end(self) -> None:

def guidance_evaluation_save(self, comp_rgb, guidance_eval_out):
B, size = comp_rgb.shape[:2]
max_items = self.cfg.guidance.max_items_to_save
max_items = self.cfg.guidance.max_items_eval
if max_items == -1:
max_items = B

Expand Down

0 comments on commit 8097f02

Please sign in to comment.