diff --git a/BaiHu/Image/30/1.png b/BaiHu/Image/30/1.png new file mode 100644 index 00000000..c7260324 Binary files /dev/null and b/BaiHu/Image/30/1.png differ diff --git a/BaiHu/Image/30/2.png b/BaiHu/Image/30/2.png new file mode 100644 index 00000000..a76b50ae Binary files /dev/null and b/BaiHu/Image/30/2.png differ diff --git a/BaiHu/Image/30/3.png b/BaiHu/Image/30/3.png new file mode 100644 index 00000000..53f3cca9 Binary files /dev/null and b/BaiHu/Image/30/3.png differ diff --git a/BaiHu/Image/30/4.png b/BaiHu/Image/30/4.png new file mode 100644 index 00000000..614868de Binary files /dev/null and b/BaiHu/Image/30/4.png differ diff --git a/BaiHu/Image/30/5.png b/BaiHu/Image/30/5.png new file mode 100644 index 00000000..ed382f15 Binary files /dev/null and b/BaiHu/Image/30/5.png differ diff --git a/BaiHu/JSON/28_1.json b/BaiHu/JSON/28_1.json index 53e76ada..8b2011c9 100644 --- a/BaiHu/JSON/28_1.json +++ b/BaiHu/JSON/28_1.json @@ -36,20 +36,6 @@ "save_detected_map": true, "input_image": "string", "control_mode": "My prompt is more important" - }, - { - "enabled": true, - "model": "control_instant_id_sdxl [c5c25a50]", - "module": "instant_id_face_keypoints", - "weight": 1, - "resize_mode": "Crop and Resize", - "guidance_start": 0, - "guidance_end": 1, - "pixel_perfect": true, - "processor_res": 512, - "save_detected_map": true, - "input_image": "string", - "control_mode": "ControlNet is more important" } ] } diff --git a/BaiHu/JSON/30_1.json b/BaiHu/JSON/30_1.json new file mode 100644 index 00000000..ad4500cb --- /dev/null +++ b/BaiHu/JSON/30_1.json @@ -0,0 +1,42 @@ +{ + "override_settings": { + "sd_model_checkpoint": "金在在儿童摄影专用V4.safetensors [1bb8f3a74a]", + "sd_vae": "Automatic" + }, + "prompt": "AIX Kinghere fdgl,1girl,solo,flower,cloud,bow,brown hair,sky,realistic,hair bow,dress,jewelry,long hair,earrings,day,lips,pink bow,looking at viewer,blue sky,outdoors, cinematicstunning contrasts and shadow,introspection,8k,Photography,super detailed,hyper realistic,masterpiece,Depth of field,bright color,Super lightsensation,caustic,,,", + "negative_prompt": "NSFW,blurry,low quality,watermark,monochrome,badhandv4,easynegative,ng_deepnegative_v1_75t,bad proportions,mutated hands and fingers,poorly drawn face,extra limb,missing limb,malformed limbs,disconnected limbs,ugly,floating limbs,extra legs,mutation,bad body,long neck,cross-eyed,text,cleavage,", + "steps": 45, + "sampler_name": "DPM++ 2M Karras", + "width": 1024, + "height": 1536, + "batch_size": 1, + "n_iter": 1, + "seed": 1, + "cfg_scale": 7, + "CLIP_stop_at_last_layers": 2, + "init_images": [ + "string" + ], + "restore_faces": false, + "enable_hr": true, + "denoising_strength": 0.5, + "alwayson_scripts": { + "ControlNet": { + "args": [ + { + "enabled": true, + "model": "ip-adapter-faceid-plusv2_sd15 [6e14fc1a]", + "module": "ip-adapter_face_id_plus", + "weight": 1, + "resize_mode": "Crop and Resize", + "guidance_start": 0, + "guidance_end": 1, + "pixel_perfect": true, + "processor_res": 512, + "save_detected_map": true, + "input_image": "string" + } + ] + } + } +} \ No newline at end of file diff --git a/BaiHu/JSON/30_2.json b/BaiHu/JSON/30_2.json new file mode 100644 index 00000000..785f491a --- /dev/null +++ b/BaiHu/JSON/30_2.json @@ -0,0 +1,43 @@ +{ + "override_settings": { + "sd_model_checkpoint": "金在在儿童摄影专用V4.safetensors [1bb8f3a74a]", + "sd_vae": "Automatic" + }, + "prompt": "AIX Kinghere fdgl,1girl,cloud,flower,solo,bow,sky,brown hair,dress,hair bow,long hair,ring,day,blue sky,watch,jewelry,pink bow,looking at viewer,lips,brown eyes,outdoors,parted lips,cloudy sky,realistic,white bow,bracelet,wristwatch,pink dress,cinematicstunning contrasts and shadow,introspection,8k,Photography,super detailed,hyper realistic,masterpiece,Depth of field,bright color,Super lightsensation,caustic,,,", + "negative_prompt": "NSFW,blurry,low quality,watermark,monochrome,badhandv4,easynegative,ng_deepnegative_v1_75t,bad proportions,mutated hands and fingers,poorly drawn face,extra limb,missing limb,malformed limbs,disconnected limbs,ugly,floating limbs,extra legs,mutation,bad body,long neck,cross-eyed,text,cleavage,", + "steps": 45, + "sampler_name": "DPM++ 2M Karras", + "width": 1024, + "height": 1536, + "batch_size": 1, + "n_iter": 1, + "seed": 1, + "cfg_scale": 7, + "CLIP_stop_at_last_layers": 2, + "init_images": [ + "string" + ], + "restore_faces": false, + "enable_hr": true, + "denoising_strength": 0.5, + "alwayson_scripts": { + "ControlNet": { + "args": [ + { + "enabled": true, + "model": "ip-adapter-faceid-plusv2_sd15 [6e14fc1a]", + "module": "ip-adapter_face_id_plus", + "weight": 1, + "resize_mode": "Crop and Resize", + "guidance_start": 0, + "guidance_end": 1, + "pixel_perfect": true, + "processor_res": 512, + "save_detected_map": true, + "input_image": "string", + "control_mode": "My prompt is more important" + } + ] + } + } +} \ No newline at end of file diff --git a/BaiHu/JSON/30_3.json b/BaiHu/JSON/30_3.json new file mode 100644 index 00000000..dfaf837f --- /dev/null +++ b/BaiHu/JSON/30_3.json @@ -0,0 +1,43 @@ +{ + "override_settings": { + "sd_model_checkpoint": "金在在儿童摄影专用V4.safetensors [1bb8f3a74a]", + "sd_vae": "Automatic" + }, + "prompt": "AIX Kinghere fdgl, 1girl, solo, flower, brown hair, dress, long hair, cloud, jewelry, sky, bow, socks, sitting, hair bow, earrings, day, blue sky, realistic, lips, white socks, necklace, pink bow, pink dress, outdoors, blue eyes, white dress, white flower, looking at viewer, parted lips, cinematicstunning contrasts and shadow,introspection,8k,Photography,super detailed,hyper realistic,masterpiece,Depth of field,bright color,Super lightsensation,caustic,,,", + "negative_prompt": "NSFW,blurry,low quality,watermark,monochrome,badhandv4,easynegative,ng_deepnegative_v1_75t,bad proportions,mutated hands and fingers,poorly drawn face,extra limb,missing limb,malformed limbs,disconnected limbs,ugly,floating limbs,extra legs,mutation,bad body,long neck,cross-eyed,text,cleavage,", + "steps": 45, + "sampler_name": "DPM++ 2M Karras", + "width": 1024, + "height": 1536, + "batch_size": 1, + "n_iter": 1, + "seed": 1, + "cfg_scale": 7, + "CLIP_stop_at_last_layers": 2, + "init_images": [ + "string" + ], + "restore_faces": false, + "enable_hr": true, + "denoising_strength": 0.5, + "alwayson_scripts": { + "ControlNet": { + "args": [ + { + "enabled": true, + "model": "ip-adapter-faceid-plusv2_sd15 [6e14fc1a]", + "module": "ip-adapter_face_id_plus", + "weight": 1, + "resize_mode": "Crop and Resize", + "guidance_start": 0, + "guidance_end": 1, + "pixel_perfect": true, + "processor_res": 512, + "save_detected_map": true, + "input_image": "string", + "control_mode": "My prompt is more important" + } + ] + } + } +} \ No newline at end of file diff --git a/BaiHu/JSON/30_4.json b/BaiHu/JSON/30_4.json new file mode 100644 index 00000000..57a39ece --- /dev/null +++ b/BaiHu/JSON/30_4.json @@ -0,0 +1,43 @@ +{ + "override_settings": { + "sd_model_checkpoint": "金在在儿童摄影专用V4.safetensors [1bb8f3a74a]", + "sd_vae": "Automatic" + }, + "prompt": "AIX Kinghere fdgl, 1girl, solo, flower, cloud, dress, bow, sky, long hair, brown hair, see-through, hair bow, brown eyes, standing, shoes, day, full body, looking at viewer, blue sky, pink bow, lips, pink footwear, white dress, cinematicstunning contrasts and shadow,introspection,8k,Photography,super detailed,hyper realistic,masterpiece,Depth of field,bright color,Super lightsensation,caustic,,,", + "negative_prompt": "NSFW,blurry,low quality,watermark,monochrome,badhandv4,easynegative,ng_deepnegative_v1_75t,bad proportions,mutated hands and fingers,poorly drawn face,extra limb,missing limb,malformed limbs,disconnected limbs,ugly,floating limbs,extra legs,mutation,bad body,long neck,cross-eyed,text,cleavage,", + "steps": 45, + "sampler_name": "DPM++ 2M Karras", + "width": 1024, + "height": 1536, + "batch_size": 1, + "n_iter": 1, + "seed": 1, + "cfg_scale": 7, + "CLIP_stop_at_last_layers": 2, + "init_images": [ + "string" + ], + "restore_faces": false, + "enable_hr": true, + "denoising_strength": 0.5, + "alwayson_scripts": { + "ControlNet": { + "args": [ + { + "enabled": true, + "model": "ip-adapter-faceid-plusv2_sd15 [6e14fc1a]", + "module": "ip-adapter_face_id_plus", + "weight": 1, + "resize_mode": "Crop and Resize", + "guidance_start": 0, + "guidance_end": 1, + "pixel_perfect": true, + "processor_res": 512, + "save_detected_map": true, + "input_image": "string", + "control_mode": "My prompt is more important" + } + ] + } + } +} \ No newline at end of file diff --git a/BaiHu/JSON/30_5.json b/BaiHu/JSON/30_5.json new file mode 100644 index 00000000..67088d38 --- /dev/null +++ b/BaiHu/JSON/30_5.json @@ -0,0 +1,43 @@ +{ + "override_settings": { + "sd_model_checkpoint": "金在在儿童摄影专用V4.safetensors [1bb8f3a74a]", + "sd_vae": "Automatic" + }, + "prompt": "AIX Kinghere fdgl,1girl,solo,flower,cloud,brown hair,sky,bow,jewelry,hair bow,earrings,day,long hair,blue sky,lips,realistic,pink bow,looking at viewer,dress,frills,brown eyes,rose,cinematicstunning contrasts and shadow,introspection,8k,Photography,super detailed,hyper realistic,masterpiece,Depth of field,bright color,Super lightsensation,caustic,,,", + "negative_prompt": "NSFW,blurry,low quality,watermark,monochrome,badhandv4,easynegative,ng_deepnegative_v1_75t,bad proportions,mutated hands and fingers,poorly drawn face,extra limb,missing limb,malformed limbs,disconnected limbs,ugly,floating limbs,extra legs,mutation,bad body,long neck,cross-eyed,text,cleavage,", + "steps": 45, + "sampler_name": "DPM++ 2M Karras", + "width": 1024, + "height": 1536, + "batch_size": 1, + "n_iter": 1, + "seed": 1, + "cfg_scale": 7, + "CLIP_stop_at_last_layers": 2, + "init_images": [ + "string" + ], + "restore_faces": false, + "enable_hr": true, + "denoising_strength": 0.5, + "alwayson_scripts": { + "ControlNet": { + "args": [ + { + "enabled": true, + "model": "ip-adapter-faceid-plusv2_sd15 [6e14fc1a]", + "module": "ip-adapter_face_id_plus", + "weight": 1, + "resize_mode": "Crop and Resize", + "guidance_start": 0, + "guidance_end": 1, + "pixel_perfect": true, + "processor_res": 512, + "save_detected_map": true, + "input_image": "string", + "control_mode": "My prompt is more important" + } + ] + } + } +} \ No newline at end of file diff --git a/BaiHu/Tools/addModel.py b/BaiHu/Tools/addModel.py index 9c9c8b0c..7fcfdbe2 100644 --- a/BaiHu/Tools/addModel.py +++ b/BaiHu/Tools/addModel.py @@ -6,10 +6,10 @@ from Util.PgUtil import * sql = "INSERT INTO t_hy_model(model_id,model_name,memo,star,update_time,img_count,b_use,sort_id,model_type_id,style_id,is_cover) VALUES (%s,%s, %s,%s,now(),%s,1,1,%s,%s,1);" # 模型编号 -model_id = 29 +model_id = 30 # 模型名称 -model_name = '小小宇航员' +model_name = '祖国的花朵' # 提示信息 memo = '1、请上传正面半身照。; 2、确保脸部无遮挡;3、图片要求不小于1.5MB(正常手机拍照即可)' diff --git a/BaiHu/doTask.py b/BaiHu/doTask.py index 6228e0ec..0fde7bc7 100644 --- a/BaiHu/doTask.py +++ b/BaiHu/doTask.py @@ -75,11 +75,15 @@ def webui_img_2_img(model_id, prompt_id, json_data, input_image, target_folder): # 找到参考图 refer_img = encode_image(refer_source_img) + # 1.5与XL通用 # 在ControlNet的第一个图片中使用用户输入的图片,用此图片的人脸进行换脸操作 json_data["alwayson_scripts"]["ControlNet"]["args"][0]["input_image"] = source_img # 图生图,风格参考图是输入 json_data["init_images"] = [refer_img] - json_data["alwayson_scripts"]["ControlNet"]["args"][1]["input_image"] = refer_img + + # XL 专享 + if len(json_data["alwayson_scripts"]["ControlNet"]["args"]) == 2: + json_data["alwayson_scripts"]["ControlNet"]["args"][1]["input_image"] = refer_img # 宽度与高度 width = json_data['width'] @@ -290,7 +294,6 @@ def get_task(): runComfyUI(model_id=model_id, json_data=vjson_data, input_image=input_image, target_folder=output_path) - return task_id elif success == 0: printf("现在没有待处理的任务,休息3秒后再试...")