diff --git a/varitex/demo.py b/varitex/demo.py index 0b988f5..4a922d3 100644 --- a/varitex/demo.py +++ b/varitex/demo.py @@ -1,20 +1,20 @@ import imageio import torch -try: - from mutil.object_dict import ObjectDict - from varitex.data.keys_enum import DataItemKey as DIK - from varitex.data.uv_factory import BFMUVFactory - from varitex.modules.pipeline import PipelineModule - from varitex.visualization.batch import CompleteVisualizer - from varitex.options import varitex_default_options -except ModuleNotFoundError as e: - print(e) - print("Have you added VariTex to your pythonpath?") - print('To fix this error, go to the root path of the repository ".../VariTex/" \n ' - 'and run \n' - "export PYTHONPATH=$PYTHONPATH:$(pwd)") - exit() +# try: +from mutil.object_dict import ObjectDict +from varitex.data.keys_enum import DataItemKey as DIK +from varitex.data.uv_factory import BFMUVFactory +from varitex.modules.pipeline import PipelineModule +from varitex.visualization.batch import CompleteVisualizer +from varitex.options import varitex_default_options +# except ModuleNotFoundError as e: +# print(e) +# print("Have you added VariTex to your pythonpath?") +# print('To fix this error, go to the root path of the repository ".../VariTex/" \n ' +# 'and run \n' +# "export PYTHONPATH=$PYTHONPATH:$(pwd)") +# exit() class Demo: diff --git a/varitex/train.py b/varitex/train.py index 2d65b19..6b94d71 100644 --- a/varitex/train.py +++ b/varitex/train.py @@ -8,18 +8,11 @@ from pytorch_lightning.loggers import WandbLogger, TensorBoardLogger from torch.utils.data import DataLoader -try: - from varitex.custom_callbacks.callbacks import ImageLogCallback - from varitex.data.npy_dataset import NPYDataset - from varitex.modules.pipeline import PipelineModule - from varitex.options.train_options import TrainOptions - from mutil.files import copy_src, mkdir -except ModuleNotFoundError: - print("Have you added VariTex to your pythonpath?") - print('To fix this error, go to the root path of the repository ".../VariTex/" \n ' - 'and run \n' - "export PYTHONPATH=$PYTHONPATH:$(pwd)") - exit() +from varitex.custom_callbacks.callbacks import ImageLogCallback +from varitex.data.npy_dataset import NPYDataset +from varitex.modules.pipeline import PipelineModule +from varitex.options.train_options import TrainOptions +from mutil.files import copy_src, mkdir if __name__ == "__main__":