@@ -20,7 +20,7 @@ class Hunyuan3DImageTo3D:
2020 def INPUT_TYPES (s ):
2121 models = [
2222 'tencent/Hunyuan3D-2/hunyuan3d-dit-v2-0' ,
23- 'tencent/Hunyuan3D-2/hunyuan3d-dit-v2-0-fast' ,
23+ 'tencent/Hunyuan3D-2/hunyuan3d-dit-v2-0-fast[variant=fp16] ' ,
2424 ]
2525 return {
2626 "required" : {
@@ -37,7 +37,7 @@ def INPUT_TYPES(s):
3737 "tooltip" : "Paint needs a lot more VRAM" ,
3838 }),
3939 "model" : (models , {
40- "tooltip" : "huggingface id of model. ie. author/name/subfolder" ,
40+ "tooltip" : "huggingface id of model( author/name/subfolder)" , # noqa: E501
4141 }),
4242 }
4343 }
@@ -140,6 +140,12 @@ def process(
140140# if 'HY3DGEN_MODELS' not in os.environ:
141141# os.environ['HY3DGEN_MODELS'] = checkpoint_dir
142142
143+ variant = None
144+ variant_m = re .match (r"^(.*)\[variant=([^\]]+)\]$" , model )
145+ if variant_m is not None :
146+ model = variant_m .group (1 )
147+ variant = variant_m .group (2 )
148+
143149 subfolder = None
144150 subfolder_m = re .match (r"^([^/]+/[^/]+)/(.+)$" , model )
145151 if subfolder_m is not None :
@@ -167,6 +173,7 @@ def process(
167173 pipeline = Hunyuan3DDiTFlowMatchingPipeline .from_pretrained (
168174 model ,
169175 subfolder = subfolder ,
176+ variant = variant
170177 )
171178
172179 output_3d_file = Hunyuan3DImageTo3D .get_spare_filename (
@@ -186,7 +193,6 @@ def process(
186193 from hy3dgen .texgen import Hunyuan3DPaintPipeline
187194 pipeline = Hunyuan3DPaintPipeline .from_pretrained (
188195 model ,
189- subfolder = subfolder ,
190196 )
191197 mesh = pipeline (mesh , image = input_image_file )
192198
0 commit comments