Skip to content

Commit 746e353

Browse files
author
Eric Cornwell
committed
Fixed index variable in container main.py
1 parent 7f36d55 commit 746e353

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

source/container/src/main.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,11 +1545,11 @@ def process_images(input_dir, output_dir=None):
15451545
num_images = len(os.listdir(image_path))
15461546
if num_images > GPU_MAX_IMAGES:
15471547
index = component.args.index("colmap")
1548-
if index != -1:
1549-
component.args.insert(index, "disk")
1550-
component.args.insert(index, "--pipeline.datamanager.cache-images")
1551-
component.args.insert(index, "1")
1552-
component.args.insert(index, "--pipeline.datamanager.max-thread-workers")
1548+
if index != -1:
1549+
component.args.insert(index, "disk")
1550+
component.args.insert(index, "--pipeline.datamanager.cache-images")
1551+
component.args.insert(index, "1")
1552+
component.args.insert(index, "--pipeline.datamanager.max-thread-workers")
15531553
else:
15541554
# Preprocess 3dgrut images if they have a mask
15551555
if str(config['MODEL']).lower() == "3dgut" or \
@@ -1564,26 +1564,17 @@ def process_images(input_dir, output_dir=None):
15641564
str(config['MODEL']).lower() == "splatfacto-big":
15651565
dest_dir = os.path.join(config['DATASET_PATH'], "nerfstudio_models")
15661566
os.makedirs(dest_dir, exist_ok=True)
1567-
# Config file
15681567
shutil.copy("outputs/unnamed/splatfacto/train-stage-1/config.yml", dest_dir)
1569-
# Checkpoint directory
1570-
#shutil.copytree("outputs/unnamed/splatfacto/train-stage-1/nerfstudio_models", config['DATASET_PATH']
15711568
shutil.copytree("outputs/unnamed/splatfacto/train-stage-1/nerfstudio_models", dest_dir, dirs_exist_ok=True)
15721569
elif str(config['MODEL']).lower() == "splatfacto-w-light":
15731570
dest_dir = os.path.join(config['DATASET_PATH'], "nerfstudio_models")
15741571
os.makedirs(dest_dir, exist_ok=True)
1575-
# Config file
15761572
shutil.copy("outputs/unnamed/splatfacto-w-light/train-stage-1/config.yml", dest_dir)
1577-
# Checkpoint directory
1578-
#shutil.copytree("outputs/unnamed/splatfacto-w-light/train-stage-1/nerfstudio_models", config['DATASET_PATH'])
15791573
shutil.copytree("outputs/unnamed/splatfacto-w-light/train-stage-1/nerfstudio_models", dest_dir, dirs_exist_ok=True)
15801574
elif str(config['MODEL']).lower() == "nerfacto":
15811575
dest_dir = os.path.join(config['DATASET_PATH'], "nerfstudio_models")
15821576
os.makedirs(dest_dir, exist_ok=True)
1583-
# Config file
15841577
shutil.copy("outputs/unnamed/nerfacto/train-stage-1/config.yml", dest_dir)
1585-
# Checkpoint directory
1586-
#shutil.copytree("outputs/unnamed/nerfacto/train-stage-1/nerfstudio_models", config['DATASET_PATH'])
15871578
shutil.copytree("outputs/unnamed/nerfacto/train-stage-1/nerfstudio_models", dest_dir, dirs_exist_ok=True)
15881579
elif str(config['MODEL']).lower() == "3dgut" or str(config['MODEL']).lower() == "3dgrt":
15891580
dest_dir = os.path.join(config['DATASET_PATH'], "3dgrut_models")

0 commit comments

Comments
 (0)