cubiq / ComfyUI_InstantID

Apache License 2.0
944 stars 50 forks source link

image blur #143

Closed linksluckytime closed 2 months ago

linksluckytime commented 2 months ago

After adding controlnet, the final face will be blurredAfter adding controlnet, the final face will be blurred

17132597391286

workflow:

{ "4": { "inputs": { "ckpt_name": "dreamshaperXL_v21TurboDPMSDE.safetensors" }, "class_type": "CheckpointLoaderSimple", "_meta": { "title": "Load Checkpoint" } }, "5": { "inputs": { "width": 768, "height": 1024, "batch_size": 1 }, "class_type": "EmptyLatentImage", "_meta": { "title": "Empty Latent Image" } }, "6": { "inputs": { "text": "a handsome middle-aged man, wearing a black suit and dark gray shirt, sitting on a wooden stool smiling at the camera against a grey background. The photography has a professional, soft studio lighting style with high resolution. The photo was taken with a Hasselblad X2D camera using a portrait lens at an f/4 aperture, utilizing natural light,\nFilm Stock Footage", "clip": [ "10", 1 ] }, "class_type": "CLIPTextEncode", "_meta": { "title": "CLIP Text Encode (Prompt)" } }, "7": { "inputs": { "text": "nsfw, nude, ugly, old, watermark, text, logo, \ndisfigured, low quality, bad anatomy, (bad face),bay eyes, bad hands, deformed, extra fingers, monochrome\n", "clip": [ "10", 1 ] }, "class_type": "CLIPTextEncode", "_meta": { "title": "CLIP Text Encode (Prompt)" } }, "10": { "inputs": { "lora_name": "Film_Stock_Footage_Style.safetensors", "strength_model": 1, "strength_clip": 1, "model": [ "4", 0 ], "clip": [ "4", 1 ] }, "class_type": "LoraLoader", "_meta": { "title": "Load LoRA" } }, "25": { "inputs": { "seed": 612252834782103, "steps": 6, "cfg": 2, "sampler_name": "dpmpp_sde_gpu", "scheduler": "karras", "denoise": 1, "model": [ "45", 0 ], "positive": [ "30", 1 ], "negative": [ "30", 2 ], "latent_image": [ "5", 0 ] }, "class_type": "KSampler", "_meta": { "title": "KSampler" } }, "28": { "inputs": { "images": [ "59", 0 ] }, "class_type": "PreviewImage", "_meta": { "title": "Preview Image" } }, "29": { "inputs": { "images": [ "60", 0 ] }, "class_type": "PreviewImage", "_meta": { "title": "Preview Image" } }, "30": { "inputs": { "ip_weight": 0.8, "cn_strength": 0.1, "start_at": 0, "end_at": 1, "noise": 0, "combine_embeds": "norm average", "instantid": [ "31", 0 ], "insightface": [ "32", 0 ], "control_net": [ "33", 0 ], "image": [ "39", 0 ], "model": [ "10", 0 ], "positive": [ "34", 0 ], "negative": [ "34", 1 ], "image_kps": [ "43", 0 ] }, "class_type": "ApplyInstantIDAdvanced", "_meta": { "title": "Apply InstantID Advanced" } }, "31": { "inputs": { "instantid_file": "ip-adapter.bin" }, "class_type": "InstantIDModelLoader", "_meta": { "title": "Load InstantID Model" } }, "32": { "inputs": { "provider": "CPU" }, "class_type": "InstantIDFaceAnalysis", "_meta": { "title": "InstantID Face Analysis" } }, "33": { "inputs": { "control_net_name": "control_instant_id_sdxl.safetensors" }, "class_type": "ControlNetLoader", "_meta": { "title": "Load ControlNet Model" } }, "34": { "inputs": { "strength": 0.3, "start_percent": 0, "end_percent": 0.7000000000000001, "positive": [ "50", 0 ], "negative": [ "50", 1 ], "control_net": [ "35", 0 ], "image": [ "41", 0 ] }, "class_type": "ControlNetApplyAdvanced", "_meta": { "title": "Apply ControlNet (Advanced)" } }, "35": { "inputs": { "control_net_name": "diffusers_xl_depth_full.safetensors" }, "class_type": "ControlNetLoader", "_meta": { "title": "Load ControlNet Model" } }, "39": { "inputs": { "image": "134af666-adf7-48f8-85cf-e49eda13c1b5.webp", "upload": "image" }, "class_type": "LoadImage", "_meta": { "title": "face" } }, "41": { "inputs": { "environment": "indoor", "resolution": 1024, "image": [ "43", 0 ] }, "class_type": "Zoe_DepthAnythingPreprocessor", "_meta": { "title": "Zoe Depth Anything" } }, "43": { "inputs": { "image": "4163.jpg", "upload": "image" }, "class_type": "LoadImage", "_meta": { "title": "cn" } }, "45": { "inputs": { "weight": 0.2, "weight_faceidv2": 0.2, "weight_type": "linear", "combine_embeds": "concat", "start_at": 0, "end_at": 1, "embeds_scaling": "V only", "model": [ "46", 0 ], "ipadapter": [ "46", 1 ], "image": [ "39", 0 ], "clip_vision": [ "47", 0 ] }, "class_type": "IPAdapterFaceID", "_meta": { "title": "IPAdapter FaceID" } }, "46": { "inputs": { "preset": "FACEID PLUS V2", "lora_strength": 0.2, "provider": "CPU", "model": [ "30", 0 ] }, "class_type": "IPAdapterUnifiedLoaderFaceID", "_meta": { "title": "IPAdapter Unified Loader FaceID" } }, "47": { "inputs": { "clip_name": "CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors" }, "class_type": "CLIPVisionLoader", "_meta": { "title": "Load CLIP Vision" } }, "50": { "inputs": { "strength": 1, "start_percent": 0, "end_percent": 1, "positive": [ "6", 0 ], "negative": [ "7", 0 ], "control_net": [ "51", 0 ], "image": [ "53", 0 ] }, "class_type": "ControlNetApplyAdvanced", "_meta": { "title": "Apply ControlNet (Advanced)" } }, "51": { "inputs": { "control_net_name": "t2i-adapter_xl_openpose.safetensors" }, "class_type": "ControlNetLoader", "_meta": { "title": "Load ControlNet Model" } }, "53": { "inputs": { "detect_hand": "enable", "detect_body": "enable", "detect_face": "enable", "resolution": 1024, "bbox_detector": "yolox_l.onnx", "pose_estimator": "dw-ll_ucoco_384_bs5.torchscript.pt", "image": [ "43", 0 ] }, "class_type": "DWPreprocessor", "_meta": { "title": "DWPose Estimator" } }, "59": { "inputs": { "samples": [ "25", 0 ], "vae": [ "4", 2 ] }, "class_type": "VAEDecode", "_meta": { "title": "VAE Decode" } }, "60": { "inputs": { "upscale_by": 2, "seed": 659845360853697, "steps": 3, "cfg": 2, "sampler_name": "dpmpp_sde_gpu", "scheduler": "karras", "denoise": 0.2, "mode_type": "Chess", "tile_width": 512, "tile_height": 512, "mask_blur": 8, "tile_padding": 32, "seam_fix_mode": "None", "seam_fix_denoise": 1, "seam_fix_width": 64, "seam_fix_mask_blur": 8, "seam_fix_padding": 16, "force_uniform_tiles": true, "tiled_decode": false, "image": [ "59", 0 ], "model": [ "45", 0 ], "positive": [ "30", 1 ], "negative": [ "30", 2 ], "vae": [ "4", 2 ], "upscale_model": [ "61", 0 ] }, "class_type": "UltimateSDUpscale", "_meta": { "title": "Ultimate SD Upscale" } }, "61": { "inputs": { "model_name": "4x-UltraSharp.pth" }, "class_type": "UpscaleModelLoader", "_meta": { "title": "Load Upscale Model" } } }

cubiq commented 2 months ago

if the face is too small the model is not able to catch the details. you need to upscale and apply a second pass to the face.