diff --git a/BaiHu/JSON/28_2.json b/BaiHu/JSON/28_2.json index 9e29b93a..bbebadf5 100644 --- a/BaiHu/JSON/28_2.json +++ b/BaiHu/JSON/28_2.json @@ -1,62 +1,57 @@ { - "prompt": "(8k, RAW photo, highest quality),hyperrealistic abstract style portrait of an otherworldly being with metallic skin,glowing orbs for eyes,and intricate fractal patterns emanating from their face,non-representational,colors and shapes,expression of feelings,imaginative,highly detailed,(pink Fluorescent eyeshadow:1.2),eyeliner,makeup,lipstick,watery eyes,(Mole under eye:1.2),(seductive_smile:1.2),XURE Dunhuang Flying XL,1girl,,", - "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,", - "styles": [ - "string" - ], - "seed": -1, - "subseed": -1, - "subseed_strength": 0, - "seed_resize_from_h": -1, - "seed_resize_from_w": -1, - "sampler_name": "DPM++ 2M Karras", - "batch_size": 1, - "n_iter": 1, - "steps": 20, - "cfg_scale": 3, - "width": 1024, - "height": 1472, - "restore_faces": true, - "tiling": true, - "do_not_save_samples": false, - "do_not_save_grid": false, - "eta": 0, - "denoising_strength": 0.5, - "s_min_uncond": 0, - "s_churn": 0, - "s_tmax": 0, - "s_tmin": 0, - "s_noise": 0, - "override_settings": {}, - "override_settings_restore_afterwards": true, - "refiner_checkpoint": "string", - "refiner_switch_at": 0, - "disable_extra_networks": false, - "firstpass_image": "string", - "comments": {}, - "init_images": [ - "string" - ], - "resize_mode": 0, - "image_cfg_scale": 0, - "mask": "string", - "mask_blur_x": 4, - "mask_blur_y": 4, - "mask_blur": 0, - "mask_round": true, - "inpainting_fill": 0, - "inpaint_full_res": true, - "inpaint_full_res_padding": 0, - "inpainting_mask_invert": 0, - "initial_noise_multiplier": 0, - "latent_mask": "string", - "force_task_id": "string", - "sampler_index": "Euler", - "include_init_images": false, - "script_name": "string", - "script_args": [], - "send_images": true, - "save_images": false, - "alwayson_scripts": {}, - "infotext": "string" + "override_settings": { + "sd_model_checkpoint": "绪儿-一青十色XL_V2 VAE.safetensors [9f9290ac66]", + "sd_vae": "Automatic" + }, + "prompt": "(8k, RAW photo, highest quality),hyperrealistic abstract style portrait of an otherworldly being with metallic skin,glowing orbs for eyes,and intricate fractal patterns emanating from their face,non-representational,colors and shapes,expression of feelings,imaginative,highly detailed,(pink Fluorescent eyeshadow:1.2),eyeliner,makeup,lipstick,watery eyes,(Mole under eye:1.2),(seductive_smile:1.2),XURE Dunhuang Flying XL,1girl,,", + "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": 20, + "sampler_name": "DPM++ 2M Karras", + "width": 1024, + "height": 1472, + "batch_size": 1, + "n_iter": 1, + "seed": 1, + "cfg_scale": 3, + "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_instant_id_sdxl [eb2d3ec0]", + "module": "instant_id_face_embedding", + "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" + }, + { + "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" + } + ] + } + } } \ No newline at end of file diff --git a/BaiHu/Test/TestImg2Img.py b/BaiHu/Test/TestImg2Img.py index 2860c16d..4886ffa8 100644 --- a/BaiHu/Test/TestImg2Img.py +++ b/BaiHu/Test/TestImg2Img.py @@ -17,8 +17,8 @@ with open(json_file, 'r', encoding='utf-8') as file: refer_img = encode_image('../Image/28/1.jpg') source_img = encode_image('../Image/1ae93e2587822c291362abf9504cb49ec.jpeg') -payload["alwayson_scripts"]["ControlNet"]["args"][0]["input_image"] = source_img -payload["init_images"] = [refer_img] +payload["alwayson_scripts"]["ControlNet"]["args"][0]["input_image"] = source_img # 按用户输入的图片进行面部参考 +payload["init_images"] = [refer_img] # 图生图,风格参考图是输入 payload["alwayson_scripts"]["ControlNet"]["args"][1]["input_image"] = refer_img print(json.dumps(payload, sort_keys=False, ensure_ascii=False, indent=4)) # 生成可以正确显示中文的json格式输出