mirror of https://github.com/InstantID/InstantID
update
parent
b3204c7096
commit
9669752da9
|
|
@ -205,6 +205,7 @@ def main(pretrained_model_name_or_path="wangqixun/YamerMIX_v8", enable_lcm_arg=F
|
|||
42, # seed
|
||||
"EulerDiscreteScheduler", # scheduler
|
||||
False, # enable_LCM
|
||||
True, # enable_Face_Region
|
||||
)
|
||||
|
||||
def convert_from_cv2_to_image(img: np.ndarray) -> Image:
|
||||
|
|
|
|||
|
|
@ -98,7 +98,6 @@ if __name__ == "__main__":
|
|||
processed_image_midas = processed_image_midas.resize(pose_image.size)
|
||||
|
||||
# enhance face region
|
||||
width, height = face_kps.size
|
||||
control_mask = np.zeros([height, width, 3])
|
||||
x1, y1, x2, y2 = face_info["bbox"]
|
||||
x1, y1, x2, y2 = int(x1), int(y1), int(x2), int(y2)
|
||||
|
|
|
|||
|
|
@ -1098,7 +1098,7 @@ class StableDiffusionXLInstantIDPipeline(StableDiffusionXLControlNetPipeline):
|
|||
return_dict=False)
|
||||
|
||||
# controlnet mask
|
||||
if control_mask_wight_image_list is not None:
|
||||
if control_index == 0 and control_mask_wight_image_list is not None:
|
||||
down_block_res_samples = [
|
||||
down_block_res_sample * mask_weight
|
||||
for down_block_res_sample, mask_weight in zip(down_block_res_samples, control_mask_wight_image_list)
|
||||
|
|
|
|||
Loading…
Reference in New Issue