add ablation study cfgs

This commit is contained in:
Guocheng Qian
2023-08-10 15:30:39 +00:00
parent c949fdc35c
commit 6bfbbbf6a2
16 changed files with 536 additions and 41 deletions

3
.gitignore vendored
View File

@@ -8,7 +8,8 @@ shap_e_model_cache/*
slurm_logs/
debug/
notinclude/
scripts/snap/yamls
scripts/snap
scripts/paper
# */validataion
*csv

View File

@@ -26,7 +26,7 @@ dearpygui
# for stable-diffusion
huggingface_hub
diffusers >= 0.9.0
accelerate # required by textural inversion
accelerate # required by textual inversion
transformers
# for dmtet

View File

@@ -28,9 +28,9 @@ echo "number of gpus:" $NUM_GPU_AVAILABLE
RUN_ID=$2
RUN_ID2=$3
DATA_DIR=$4
IMAGE_NAME=$5
step1=$6
step2=$7
IMAGE_NAME=rgba.png
step1=$5
step2=$6
FILENAME=$(basename $DATA_DIR)
dataset=$(basename $(dirname $DATA_DIR))
echo reconstruct $FILENAME under dataset $dataset from folder $DATA_DIR ...
@@ -52,7 +52,7 @@ if (( ${step1} )); then
--t_range 0.2 0.6 \
--bg_radius -1 \
--save_mesh \
${@:8}
${@:7}
fi
if (( ${step2} )); then

View File

@@ -28,9 +28,9 @@ echo "number of gpus:" $NUM_GPU_AVAILABLE
RUN_ID=$2
RUN_ID2=$3
DATA_DIR=$4
IMAGE_NAME=$5
step1=$6
step2=$7
IMAGE_NAME=rgba.png
step1=$5
step2=$6
FILENAME=$(basename $DATA_DIR)
dataset=$(basename $(dirname $DATA_DIR))
echo reconstruct $FILENAME under dataset $dataset from folder $DATA_DIR ...
@@ -51,7 +51,7 @@ if (( ${step1} )); then
--t_range 0.2 0.6 \
--bg_radius -1 \
--save_mesh \
${@:8}
${@:7}
fi
if (( ${step2} )); then

View File

@@ -28,9 +28,9 @@ echo "number of gpus:" $NUM_GPU_AVAILABLE
RUN_ID=$2 # jobname for the first stage
RUN_ID2=$3 # jobname for the second stage
DATA_DIR=$4 # path to the directory containing the images, e.g. data/nerf4/chair
IMAGE_NAME=$5 # name of the image file, e.g. rgba.png
step1=$6 # whether to use the first stage
step2=$7 # whether to use the second stage
IMAGE_NAME=rgba.png # name of the image file, e.g. rgba.png
step1=$5 # whether to use the first stage
step2=$6 # whether to use the second stage
FILENAME=$(basename $DATA_DIR)
dataset=$(basename $(dirname $DATA_DIR))
@@ -53,7 +53,7 @@ if (( ${step1} )); then
--t_range 0.2 0.6 \
--bg_radius -1 \
--save_mesh \
${@:8}
${@:7}
fi
if (( ${step2} )); then

View File

@@ -0,0 +1,82 @@
#! /bin/bash
#SBATCH -N 1
#SBATCH --array=0
#SBATCH -J magic123
#SBATCH -o slurm_logs/%x.%3a.%A.out
#SBATCH -e slurm_logs/%x.%3a.%A.err
#SBATCH --time=3:00:00
#SBATCH --gres=gpu:v100:1
#SBATCH --cpus-per-gpu=6
#SBATCH --mem=30G
##SBATCH --gpus=1
module load gcc/7.5.0
#source ~/.bashrc
#source activate magic123
source venv_magic123/bin/activate
which python
nvidia-smi
nvcc --version
hostname
NUM_GPU_AVAILABLE=`nvidia-smi --query-gpu=name --format=csv,noheader | wc -l`
echo "number of gpus:" $NUM_GPU_AVAILABLE
RUN_ID=$2-p60 # jobname for the first stage
RUN_ID2=$3-p60 # jobname for the second stage
DATA_DIR=$4 # path to the directory containing the images, e.g. data/nerf4/chair
IMAGE_NAME=rgba.png # name of the image file, e.g. rgba.png
step1=$5 # whether to use the first stage
step2=$6 # whether to use the second stage
FILENAME=$(basename $DATA_DIR)
dataset=$(basename $(dirname $DATA_DIR))
echo reconstruct $FILENAME under dataset $dataset from folder $DATA_DIR ...
if (( ${step1} )); then
CUDA_VISIBLE_DEVICES=$1 python main.py -O \
--text "A high-resolution DSLR image of <token>" \
--sd_version 1.5 \
--image ${DATA_DIR}/${IMAGE_NAME} \
--learned_embeds_path ${DATA_DIR}/learned_embeds.bin \
--workspace out/magic123-${RUN_ID}-coarse/$dataset/magic123_${FILENAME}_${RUN_ID}_coarse \
--optim adam \
--iters 5000 \
--guidance SD zero123 \
--lambda_guidance 1.0 40 \
--guidance_scale 100 5 \
--latent_iter_ratio 0 \
--normal_iter_ratio 0.2 \
--t_range 0.2 0.6 \
--bg_radius -1 \
--radius_range 1.0 1.5 \
--fovy_range 40 70 \
--default_polar 60 \
--save_mesh \
${@:7}
fi
if (( ${step2} )); then
CUDA_VISIBLE_DEVICES=$1 python main.py -O \
--text "A high-resolution DSLR image of <token>" \
--sd_version 1.5 \
--image ${DATA_DIR}/${IMAGE_NAME} \
--learned_embeds_path ${DATA_DIR}/learned_embeds.bin \
--workspace out/magic123-${RUN_ID}-${RUN_ID2}/$dataset/magic123_${FILENAME}_${RUN_ID}_${RUN_ID2} \
--dmtet --init_ckpt out/magic123-${RUN_ID}-coarse/$dataset/magic123_${FILENAME}_${RUN_ID}_coarse/checkpoints/magic123_${FILENAME}_${RUN_ID}_coarse.pth \
--iters 5000 \
--optim adam \
--latent_iter_ratio 0 \
--guidance SD zero123 \
--lambda_guidance 1e-3 0.01 \
--guidance_scale 100 5 \
--rm_edge \
--bg_radius -1 \
--radius_range 1.0 1.5 \
--fovy_range 40 70 \
--default_polar 60 \
--save_mesh
fi

View File

@@ -0,0 +1,80 @@
#! /bin/bash
#SBATCH -N 1
#SBATCH --array=0
#SBATCH -J magic123
#SBATCH -o slurm_logs/%x.%3a.%A.out
#SBATCH -e slurm_logs/%x.%3a.%A.err
#SBATCH --time=3:00:00
#SBATCH --gres=gpu:v100:1
#SBATCH --cpus-per-gpu=6
#SBATCH --mem=30G
##SBATCH --gpus=1
module load gcc/7.5.0
#source ~/.bashrc
#source activate magic123
source venv_magic123/bin/activate
which python
nvidia-smi
nvcc --version
hostname
NUM_GPU_AVAILABLE=`nvidia-smi --query-gpu=name --format=csv,noheader | wc -l`
echo "number of gpus:" $NUM_GPU_AVAILABLE
RUN_ID=$2-camera # jobname for the first stage
RUN_ID2=$3-camera # jobname for the second stage
DATA_DIR=$4 # path to the directory containing the images, e.g. data/nerf4/chair
IMAGE_NAME=rgba.png # name of the image file, e.g. rgba.png
step1=$5 # whether to use the first stage
step2=$6 # whether to use the second stage
FILENAME=$(basename $DATA_DIR)
dataset=$(basename $(dirname $DATA_DIR))
echo reconstruct $FILENAME under dataset $dataset from folder $DATA_DIR ...
if (( ${step1} )); then
CUDA_VISIBLE_DEVICES=$1 python main.py -O \
--text "A high-resolution DSLR image of <token>" \
--sd_version 1.5 \
--image ${DATA_DIR}/${IMAGE_NAME} \
--learned_embeds_path ${DATA_DIR}/learned_embeds.bin \
--workspace out/magic123-${RUN_ID}-coarse/$dataset/magic123_${FILENAME}_${RUN_ID}_coarse \
--optim adam \
--iters 5000 \
--guidance SD zero123 \
--lambda_guidance 1.0 40 \
--guidance_scale 100 5 \
--latent_iter_ratio 0 \
--normal_iter_ratio 0.2 \
--t_range 0.2 0.6 \
--bg_radius -1 \
--radius_range 1.0 1.5 \
--fovy_range 40 70 \
--save_mesh \
${@:7}
fi
if (( ${step2} )); then
CUDA_VISIBLE_DEVICES=$1 python main.py -O \
--text "A high-resolution DSLR image of <token>" \
--sd_version 1.5 \
--image ${DATA_DIR}/${IMAGE_NAME} \
--learned_embeds_path ${DATA_DIR}/learned_embeds.bin \
--workspace out/magic123-${RUN_ID}-${RUN_ID2}/$dataset/magic123_${FILENAME}_${RUN_ID}_${RUN_ID2} \
--dmtet --init_ckpt out/magic123-${RUN_ID}-coarse/$dataset/magic123_${FILENAME}_${RUN_ID}_coarse/checkpoints/magic123_${FILENAME}_${RUN_ID}_coarse.pth \
--iters 5000 \
--optim adam \
--latent_iter_ratio 0 \
--guidance SD zero123 \
--lambda_guidance 1e-3 0.01 \
--guidance_scale 100 5 \
--rm_edge \
--bg_radius -1 \
--radius_range 1.0 1.5 \
--fovy_range 40 70 \
--save_mesh
fi

View File

@@ -0,0 +1,87 @@
#! /bin/bash
#SBATCH -N 1
#SBATCH --array=0
#SBATCH -J magic123
#SBATCH -o slurm_logs/%x.%3a.%A.out
#SBATCH -e slurm_logs/%x.%3a.%A.err
#SBATCH --time=3:00:00
#SBATCH --gres=gpu:v100:1
#SBATCH --cpus-per-gpu=6
#SBATCH --mem=30G
##SBATCH --gpus=1
module load gcc/7.5.0
#source ~/.bashrc
#source activate magic123
source venv_magic123/bin/activate
which python
nvidia-smi
nvcc --version
hostname
NUM_GPU_AVAILABLE=`nvidia-smi --query-gpu=name --format=csv,noheader | wc -l`
echo "number of gpus:" $NUM_GPU_AVAILABLE
RUN_ID=$2-nodepth # jobname for the first stage
RUN_ID2=$3-nodepth # jobname for the second stage
DATA_DIR=$4 # path to the directory containing the images, e.g. data/nerf4/chair
IMAGE_NAME=rgba.png # name of the image file, e.g. rgba.png
step1=$5 # whether to use the first stage
step2=$6 # whether to use the second stage
FILENAME=$(basename $DATA_DIR)
dataset=$(basename $(dirname $DATA_DIR))
echo reconstruct $FILENAME under dataset $dataset from folder $DATA_DIR ...
if (( ${step1} )); then
CUDA_VISIBLE_DEVICES=$1 python main.py -O \
--text "A high-resolution DSLR image of <token>" \
--sd_version 1.5 \
--image ${DATA_DIR}/${IMAGE_NAME} \
--learned_embeds_path ${DATA_DIR}/learned_embeds.bin \
--workspace out/magic123-${RUN_ID}-coarse/$dataset/magic123_${FILENAME}_${RUN_ID}_coarse \
--optim adam \
--iters 5000 \
--guidance SD zero123 \
--lambda_guidance 1.0 40 \
--guidance_scale 100 5 \
--latent_iter_ratio 0 \
--normal_iter_ratio 0.2 \
--t_range 0.2 0.6 \
--bg_radius -1 \
--save_mesh \
--lambda_entropy 1.0e-3 \
--lambda_orient 1.0e-2 \
--lambda_normal_smooth 0.5 \
--lambda_normal_smooth2d 0.5 \
--lambda_depth 0 \
${@:7}
fi
if (( ${step2} )); then
CUDA_VISIBLE_DEVICES=$1 python main.py -O \
--text "A high-resolution DSLR image of <token>" \
--sd_version 1.5 \
--image ${DATA_DIR}/${IMAGE_NAME} \
--learned_embeds_path ${DATA_DIR}/learned_embeds.bin \
--workspace out/magic123-${RUN_ID}-${RUN_ID2}/$dataset/magic123_${FILENAME}_${RUN_ID}_${RUN_ID2} \
--dmtet --init_ckpt out/magic123-${RUN_ID}-coarse/$dataset/magic123_${FILENAME}_${RUN_ID}_coarse/checkpoints/magic123_${FILENAME}_${RUN_ID}_coarse.pth \
--iters 5000 \
--optim adam \
--latent_iter_ratio 0 \
--guidance SD zero123 \
--lambda_guidance 1e-3 0.01 \
--guidance_scale 100 5 \
--rm_edge \
--bg_radius -1 \
--save_mesh \
--lambda_entropy 1.0e-3 \
--lambda_orient 1.0e-2 \
--lambda_normal_smooth 0.5 \
--lambda_normal_smooth2d 0.5 \
--dataset_size_test 8 \
--lambda_depth 0
fi

View File

@@ -0,0 +1,74 @@
#! /bin/bash
#SBATCH -N 1
#SBATCH --array=0
#SBATCH -J magic123
#SBATCH -o slurm_logs/%x.%3a.%A.out
#SBATCH -e slurm_logs/%x.%3a.%A.err
#SBATCH --time=3:00:00
#SBATCH --gres=gpu:v100:1
#SBATCH --cpus-per-gpu=6
#SBATCH --mem=30G
##SBATCH --gpus=1
module load gcc/7.5.0
#source ~/.bashrc
#source activate magic123
source venv_magic123/bin/activate
which python
nvidia-smi
nvcc --version
hostname
NUM_GPU_AVAILABLE=`nvidia-smi --query-gpu=name --format=csv,noheader | wc -l`
echo "number of gpus:" $NUM_GPU_AVAILABLE
RUN_ID=$2-noinv # jobname for the first stage
RUN_ID2=$3-noinv # jobname for the second stage
DATA_DIR=$4 # path to the directory containing the images, e.g. data/nerf4/chair
IMAGE_NAME=rgba.png # name of the image file, e.g. rgba.png
step1=$5 # whether to use the first stage
step2=$6 # whether to use the second stage
FILENAME=$(basename $DATA_DIR)
dataset=$(basename $(dirname $DATA_DIR))
echo reconstruct $FILENAME under dataset $dataset from folder $DATA_DIR ...
if (( ${step1} )); then
CUDA_VISIBLE_DEVICES=$1 python main.py -O \
--text "A high-resolution DSLR image of <token>" \
--sd_version 1.5 \
--image ${DATA_DIR}/${IMAGE_NAME} \
--workspace out/magic123-${RUN_ID}-coarse/$dataset/magic123_${FILENAME}_${RUN_ID}_coarse \
--optim adam \
--iters 5000 \
--guidance SD zero123 \
--lambda_guidance 1.0 40 \
--guidance_scale 100 5 \
--latent_iter_ratio 0 \
--normal_iter_ratio 0.2 \
--t_range 0.2 0.6 \
--bg_radius -1 \
--save_mesh \
${@:7}
fi
if (( ${step2} )); then
CUDA_VISIBLE_DEVICES=$1 python main.py -O \
--text "A high-resolution DSLR image of <token>" \
--sd_version 1.5 \
--image ${DATA_DIR}/${IMAGE_NAME} \
--workspace out/magic123-${RUN_ID}-${RUN_ID2}/$dataset/magic123_${FILENAME}_${RUN_ID}_${RUN_ID2} \
--dmtet --init_ckpt out/magic123-${RUN_ID}-coarse/$dataset/magic123_${FILENAME}_${RUN_ID}_coarse/checkpoints/magic123_${FILENAME}_${RUN_ID}_coarse.pth \
--iters 5000 \
--optim adam \
--latent_iter_ratio 0 \
--guidance SD zero123 \
--lambda_guidance 1e-3 0.01 \
--guidance_scale 100 5 \
--rm_edge \
--bg_radius -1 \
--save_mesh
fi

View File

@@ -0,0 +1,87 @@
#! /bin/bash
#SBATCH -N 1
#SBATCH --array=0
#SBATCH -J magic123
#SBATCH -o slurm_logs/%x.%3a.%A.out
#SBATCH -e slurm_logs/%x.%3a.%A.err
#SBATCH --time=3:00:00
#SBATCH --gres=gpu:v100:1
#SBATCH --cpus-per-gpu=6
#SBATCH --mem=30G
##SBATCH --gpus=1
module load gcc/7.5.0
#source ~/.bashrc
#source activate magic123
source venv_magic123/bin/activate
which python
nvidia-smi
nvcc --version
hostname
NUM_GPU_AVAILABLE=`nvidia-smi --query-gpu=name --format=csv,noheader | wc -l`
echo "number of gpus:" $NUM_GPU_AVAILABLE
RUN_ID=$2-nonorm # jobname for the first stage
RUN_ID2=$3-nonorm # jobname for the second stage
DATA_DIR=$4 # path to the directory containing the images, e.g. data/nerf4/chair
IMAGE_NAME=rgba.png # name of the image file, e.g. rgba.png
step1=$5 # whether to use the first stage
step2=$6 # whether to use the second stage
FILENAME=$(basename $DATA_DIR)
dataset=$(basename $(dirname $DATA_DIR))
echo reconstruct $FILENAME under dataset $dataset from folder $DATA_DIR ...
if (( ${step1} )); then
CUDA_VISIBLE_DEVICES=$1 python main.py -O \
--text "A high-resolution DSLR image of <token>" \
--sd_version 1.5 \
--image ${DATA_DIR}/${IMAGE_NAME} \
--learned_embeds_path ${DATA_DIR}/learned_embeds.bin \
--workspace out/magic123-${RUN_ID}-coarse/$dataset/magic123_${FILENAME}_${RUN_ID}_coarse \
--optim adam \
--iters 5000 \
--guidance SD zero123 \
--lambda_guidance 1.0 40 \
--guidance_scale 100 5 \
--latent_iter_ratio 0 \
--normal_iter_ratio 0.2 \
--t_range 0.2 0.6 \
--bg_radius -1 \
--save_mesh \
--lambda_entropy 1.0e-3 \
--lambda_orient 1.0e-2 \
--lambda_normal_smooth 0 \
--lambda_normal_smooth2d 0 \
${@:7}
fi
if (( ${step2} )); then
CUDA_VISIBLE_DEVICES=$1 python main.py -O \
--text "A high-resolution DSLR image of <token>" \
--sd_version 1.5 \
--image ${DATA_DIR}/${IMAGE_NAME} \
--learned_embeds_path ${DATA_DIR}/learned_embeds.bin \
--workspace out/magic123-${RUN_ID}-${RUN_ID2}/$dataset/magic123_${FILENAME}_${RUN_ID}_${RUN_ID2} \
--dmtet --init_ckpt out/magic123-${RUN_ID}-coarse/$dataset/magic123_${FILENAME}_${RUN_ID}_coarse/checkpoints/magic123_${FILENAME}_${RUN_ID}_coarse.pth \
--iters 5000 \
--optim adam \
--latent_iter_ratio 0 \
--guidance SD zero123 \
--lambda_guidance 1e-3 0.01 \
--guidance_scale 100 5 \
--rm_edge \
--bg_radius -1 \
--save_mesh \
--lambda_entropy 1.0e-3 \
--lambda_orient 1.0e-2 \
--lambda_normal_smooth 0 \
--lambda_normal_smooth2d 0 \
--lambda_mesh_normal 1.0e-10 \
--dataset_size_test 8 \
--lambda_mesh_lap 0
fi

View File

@@ -0,0 +1,82 @@
#! /bin/bash
#SBATCH -N 1
#SBATCH --array=0
#SBATCH -J magic123
#SBATCH -o slurm_logs/%x.%3a.%A.out
#SBATCH -e slurm_logs/%x.%3a.%A.err
#SBATCH --time=3:00:00
#SBATCH --gres=gpu:v100:1
#SBATCH --cpus-per-gpu=6
#SBATCH --mem=30G
##SBATCH --gpus=1
module load gcc/7.5.0
#source ~/.bashrc
#source activate magic123
source venv_magic123/bin/activate
which python
nvidia-smi
nvcc --version
hostname
NUM_GPU_AVAILABLE=`nvidia-smi --query-gpu=name --format=csv,noheader | wc -l`
echo "number of gpus:" $NUM_GPU_AVAILABLE
RUN_ID=$2-noreg # jobname for the first stage
RUN_ID2=$3-noreg # jobname for the second stage
DATA_DIR=$4 # path to the directory containing the images, e.g. data/nerf4/chair
IMAGE_NAME=rgba.png # name of the image file, e.g. rgba.png
step1=$5 # whether to use the first stage
step2=$6 # whether to use the second stage
FILENAME=$(basename $DATA_DIR)
dataset=$(basename $(dirname $DATA_DIR))
echo reconstruct $FILENAME under dataset $dataset from folder $DATA_DIR ...
if (( ${step1} )); then
CUDA_VISIBLE_DEVICES=$1 python main.py -O \
--text "A high-resolution DSLR image of <token>" \
--sd_version 1.5 \
--image ${DATA_DIR}/${IMAGE_NAME} \
--learned_embeds_path ${DATA_DIR}/learned_embeds.bin \
--workspace out/magic123-${RUN_ID}-coarse/$dataset/magic123_${FILENAME}_${RUN_ID}_coarse \
--optim adam \
--iters 5000 \
--guidance SD zero123 \
--lambda_guidance 1.0 40 \
--guidance_scale 100 5 \
--latent_iter_ratio 0 \
--normal_iter_ratio 0.2 \
--t_range 0.2 0.6 \
--bg_radius -1 \
--save_mesh \
--lambda_entropy 0 \
--lambda_orient 1.0e-10 \
${@:7}
fi
if (( ${step2} )); then
CUDA_VISIBLE_DEVICES=$1 python main.py -O \
--text "A high-resolution DSLR image of <token>" \
--sd_version 1.5 \
--image ${DATA_DIR}/${IMAGE_NAME} \
--learned_embeds_path ${DATA_DIR}/learned_embeds.bin \
--workspace out/magic123-${RUN_ID}-${RUN_ID2}/$dataset/magic123_${FILENAME}_${RUN_ID}_${RUN_ID2} \
--dmtet --init_ckpt out/magic123-${RUN_ID}-coarse/$dataset/magic123_${FILENAME}_${RUN_ID}_coarse/checkpoints/magic123_${FILENAME}_${RUN_ID}_coarse.pth \
--iters 5000 \
--optim adam \
--latent_iter_ratio 0 \
--guidance SD zero123 \
--lambda_guidance 1e-3 0.01 \
--guidance_scale 100 5 \
--rm_edge \
--bg_radius -1 \
--save_mesh \
--lambda_entropy 0 \
--lambda_orient 1.0e-10 \
--lambda_normal_smooth 0 \
--lambda_normal_smooth2d 0
fi

View File

@@ -1,13 +1,13 @@
device=$1
runid=$2 # jobname for the first stage
runid2=$3 # jobname for the second stage
topdir=$4 # path to the directory containing the images, e.g. data/nerf4
imagename=$5
script_name=$1
device=$2
runid=$3 # jobname for the first stage
runid2=$4 # jobname for the second stage
topdir=$5 # path to the directory containing the images, e.g. data/nerf4
step1=$6
step2=$7
for i in $topdir/*; do
echo "$i"
[ -d "$i" ] && echo "$i exists."
bash scripts/magic123/run_both_priors.sh $device $runid "$i" $imagename $step1 $step2 ${@:8}
bash ${script_name} $device $runid "$i" $step1 $step2 ${@:8}
done

View File

@@ -1,18 +1,18 @@
device=$1
runid=$2 # jobname for the first stage
runid2=$3 # jobname for the second stage
imagename=$4
script_name=$1
device=$2
runid=$3 # jobname for the first stage
runid2=$4 # jobname for the second stage
step1=$5
step2=$6
examples=(
'data/nerf4/chair'
'data/realfusion15/colorful_teapot/'
'data/realfusion15/teddy_bear/'
'data/realfusion15/mental_dragon_statue/'
'data/realfusion15/colorful_teapot/'
'data/realfusion15/fish_real_nemo/'
'data/realfusion15/two_cherries'
'data/realfusion15/watercolor_horse/'
'data/nerf4/chair'
'data/nerf4/drums'
'data/nerf4/ficus'
'data/nerf4/mic'
@@ -21,5 +21,7 @@ examples=(
for i in "${examples[@]}"; do
echo "$i"
[ -d "$i" ] && echo "$i exists."
bash scripts/magic123/run_both_priors.sh $device $runid "$i" $imagename $step1 $step2 ${@:7}
bash ${script_name} $device $runid $runid2 "$i" $step1 $step2 ${@:7}
done
# usage: bash scripts/magic123/run_list_both_priors.sh scripts/magic123/run_both_priors.sh 0 coarse fine 1 1

View File

@@ -48,5 +48,5 @@ CUDA_VISIBLE_DEVICES=$1 python textual-inversion/textual_inversion.py \
--use_augmentations \
${@:7}
# test textural inversion
# test textual inversion
CUDA_VISIBLE_DEVICES=$1 python guidance/sd_utils.py --text "A high-resolution DSLR image of <token>" --learned_embeds_path $OUTPUT_DIR --workspace $OUTPUT_DIR

View File

@@ -0,0 +1,13 @@
examples=(
'data/nerf4/chair'
'data/nerf4/drums'
'data/nerf4/ficus'
'data/nerf4/mic'
)
for i in "${examples[@]}"; do
filename=$(basename "$i")
bash scripts/texural_inversion/textual_inversion.sh 0 runwayml/stable-diffusion-v1-5 "$i"/rgba.png out/texural_inversion/${filename} _nerf_${filename}_ ${filename} --max_train_steps 3000
done

View File

@@ -1,13 +0,0 @@
examples=(
'data/nerf4/chair'
'data/nerf4/drums'
'data/nerf4/ficus'
'data/nerf4/mic'
)
for i in "${examples[@]}"; do
filename=$(basename "$i")
bash scripts/texural_inversion/textural_inversion.sh 0 runwayml/stable-diffusion-v1-5 "$i"/rgba.png out/texural_inversion/${filename} _nerf_${filename}_ ${filename} --max_train_steps 3000
done