vfusion3d / __init__.py
JunlinHan's picture
Upload 61 files
b579854 verified
raw
history blame
916 Bytes
from transformers import AutoProcessor
from .modeling import LRMGenerator, LRMGeneratorConfig
import logging
# we set up logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
# helper function to install packages
def install_package(package_name):
if importlib.util.find_spec(package_name) is None:
logger.info(f"Package '{package_name}' not found. Installing...")
print(f"Package '{package_name}' not found. Installing...")
subprocess.check_call([sys.executable, "-m", "pip", "install", package_name])
else:
logger.info(f"Package '{package_name}' is already installed.")
# list of packages to ensure are installed
required_packages = [
'imageio[ffmpeg]', 'PyMCubes', 'trimesh', 'rembg[gpu,cli]', 'kiui', 'torchvision', 'Pillow'
]
for package in required_packages:
install_package(package)
from .processor import LRMImageProcessor