fix some
This commit is contained in:
@@ -38,8 +38,8 @@ class Hunyuan3DPaintConfig:
|
||||
def __init__(self, max_num_view, resolution):
|
||||
self.device = "cuda"
|
||||
|
||||
self.multiview_cfg_path = "hy3dpaint/cfgs/hunyuan-paint-pbr.yaml"
|
||||
|
||||
self.multiview_cfg_path = "cfgs/hunyuan-paint-pbr.yaml"
|
||||
self.custom_pipeline = "hunyuanpaintpbr"
|
||||
self.multiview_pretrained_path = "tencent/Hunyuan3D-2.1"
|
||||
self.dino_ckpt_path = "facebook/dinov2-giant"
|
||||
self.realesrgan_ckpt_path = "ckpt/RealESRGAN_x4plus.pth"
|
||||
|
||||
@@ -29,6 +29,7 @@ class multiviewDiffusionNet:
|
||||
self.device = config.device
|
||||
|
||||
cfg_path = config.multiview_cfg_path
|
||||
custom_pipeline = config.custom_pipeline
|
||||
cfg = OmegaConf.load(cfg_path)
|
||||
self.cfg = cfg
|
||||
self.mode = self.cfg.model.params.stable_diffusion_config.custom_pipeline[2:]
|
||||
@@ -41,7 +42,7 @@ class multiviewDiffusionNet:
|
||||
model_path = os.path.join(model_path, "hunyuan3d-paintpbr-v2-1")
|
||||
pipeline = DiffusionPipeline.from_pretrained(
|
||||
model_path,
|
||||
custom_pipeline="hunyuanpaintpbr",
|
||||
custom_pipeline=custom_pipeline,
|
||||
torch_dtype=torch.float16
|
||||
)
|
||||
|
||||
@@ -52,7 +53,7 @@ class multiviewDiffusionNet:
|
||||
self.pipeline = pipeline.to(self.device)
|
||||
|
||||
if hasattr(self.pipeline.unet, "use_dino") and self.pipeline.unet.use_dino:
|
||||
from hunyuanpaintpbr.modules import Dino_v2
|
||||
from hunyuanpaintpbr.unet.modules import Dino_v2
|
||||
self.dino_v2 = Dino_v2(config.dino_ckpt_path).to(torch.float16)
|
||||
self.dino_v2 = self.dino_v2.to(self.device)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user