|
from transformers import AutoProcessor |
|
from .modeling import LRMGenerator, LRMGeneratorConfig |
|
|
|
import logging |
|
|
|
|
|
logging.basicConfig(level=logging.INFO) |
|
logger = logging.getLogger(__name__) |
|
|
|
|
|
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.") |
|
|
|
|
|
required_packages = [ |
|
'imageio[ffmpeg]', 'PyMCubes', 'trimesh', 'rembg[gpu,cli]', 'kiui', 'torchvision', 'Pillow' |
|
] |
|
|
|
for package in required_packages: |
|
install_package(package) |
|
|
|
from .processor import LRMImageProcessor |
|
|