diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..6f31c1dc --- /dev/null +++ b/setup.py @@ -0,0 +1,21 @@ +from setuptools import find_packages, setup + +setup( + name="threestudio", + version='"0.2.3"', # the current version of your package + packages=find_packages(), # automatically discover all packages and subpackages + url="https://github.com/threestudio-project/threestudio", # replace with the URL of your project + author="Yuan-Chen Guo and Ruizhi Shao and Ying-Tian Liu and Christian Laforte and Vikram Voleti and Guan Luo and Chia-Hao Chen and Zi-Xin Zou and Chen Wang and Yan-Pei Cao and Song-Hai Zhang", # replace with your name + author_email="shaorz20@mails.tsinghua.edu.cn", # replace with your email + description="threestudio is a unified framework for 3D content creation from text prompts, single images, and few-shot images, by lifting 2D text-to-image generation models.", # replace with a brief description of your project + install_requires=[ + # list of packages your project depends on + # you can specify versions as well, e.g. 'numpy>=1.15.1' + ], + classifiers=[ + # classifiers help users find your project by categorizing it + # for a list of valid classifiers, see https://pypi.org/classifiers/ + "License :: Apache-2.0", + "Programming Language :: Python :: 3", + ], +) diff --git a/threestudio/__init__.py b/threestudio/__init__.py index 3740dbe7..9b7b83be 100644 --- a/threestudio/__init__.py +++ b/threestudio/__init__.py @@ -1,5 +1,5 @@ __modules__ = {} -__version__ = "0.2.2" +__version__ = "0.2.3" def register(name): diff --git a/threestudio/models/prompt_processors/base.py b/threestudio/models/prompt_processors/base.py index 9a1ccf76..9a402daf 100644 --- a/threestudio/models/prompt_processors/base.py +++ b/threestudio/models/prompt_processors/base.py @@ -295,8 +295,11 @@ def configure(self) -> None: self.direction2idx = {d.name: i for i, d in enumerate(self.directions)} - with open(os.path.join("load/prompt_library.json"), "r") as f: - self.prompt_library = json.load(f) + if os.path.exists("load/prompt_library.json"): + with open(os.path.join("load/prompt_library.json"), "r") as f: + self.prompt_library = json.load(f) + else: + self.prompt_library = {} # use provided prompt or find prompt in library self.prompt = self.preprocess_prompt(self.cfg.prompt) # use provided negative prompt diff --git a/threestudio/utils/GAN/__init__.py b/threestudio/utils/GAN/__init__.py new file mode 100644 index 00000000..e69de29b