JiantaoLin commited on
Commit
83c7fe3
·
1 Parent(s): 788b78a
Files changed (1) hide show
  1. pipeline/kiss3d_wrapper.py +8 -7
pipeline/kiss3d_wrapper.py CHANGED
@@ -70,21 +70,22 @@ def init_wrapper_from_config(config_path):
70
  flux_lora_pth = hf_hub_download(repo_id="LTT/Kiss3DGen", filename="rgb_normal_large.safetensors", repo_type="model", token=access_token)
71
  flux_redux_pth = config_['flux'].get('redux', None)
72
 
73
- if flux_base_model_pth.endswith('safetensors'):
74
- flux_pipe = FluxImg2ImgPipeline.from_single_file(flux_base_model_pth, torch_dtype=dtype_[flux_dtype], token=access_token)
75
- else:
76
- flux_pipe = FluxImg2ImgPipeline.from_pretrained(flux_base_model_pth, torch_dtype=dtype_[flux_dtype], token=access_token)
77
 
78
  # load flux model and controlnet
79
  if flux_controlnet_pth is not None and False:
80
  flux_controlnet = FluxControlNetModel.from_pretrained(flux_controlnet_pth, torch_dtype=torch.bfloat16)
81
  flux_pipe = convert_flux_pipeline(flux_pipe, FluxControlNetImg2ImgPipeline, controlnet=[flux_controlnet])
82
 
83
- flux_pipe.scheduler = FlowMatchHeunDiscreteScheduler.from_config(flux_pipe.scheduler.config)
84
 
85
  # load lora weights
86
- flux_pipe.load_lora_weights(flux_lora_pth)
87
- flux_pipe.to(device=flux_device)
 
88
 
89
  # load redux model
90
  flux_redux_pipe = None
 
70
  flux_lora_pth = hf_hub_download(repo_id="LTT/Kiss3DGen", filename="rgb_normal_large.safetensors", repo_type="model", token=access_token)
71
  flux_redux_pth = config_['flux'].get('redux', None)
72
 
73
+ # if flux_base_model_pth.endswith('safetensors'):
74
+ # flux_pipe = FluxImg2ImgPipeline.from_single_file(flux_base_model_pth, torch_dtype=dtype_[flux_dtype], token=access_token)
75
+ # else:
76
+ # flux_pipe = FluxImg2ImgPipeline.from_pretrained(flux_base_model_pth, torch_dtype=dtype_[flux_dtype], token=access_token)
77
 
78
  # load flux model and controlnet
79
  if flux_controlnet_pth is not None and False:
80
  flux_controlnet = FluxControlNetModel.from_pretrained(flux_controlnet_pth, torch_dtype=torch.bfloat16)
81
  flux_pipe = convert_flux_pipeline(flux_pipe, FluxControlNetImg2ImgPipeline, controlnet=[flux_controlnet])
82
 
83
+ # flux_pipe.scheduler = FlowMatchHeunDiscreteScheduler.from_config(flux_pipe.scheduler.config)
84
 
85
  # load lora weights
86
+ # flux_pipe.load_lora_weights(flux_lora_pth)
87
+ # flux_pipe.to(device=flux_device)
88
+ flux_pipe = None
89
 
90
  # load redux model
91
  flux_redux_pipe = None