vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.64k stars 414 forks source link

[Issue]: Sending image to different tab causes lag and sends entire metadata #2993

Closed MysticDaedra closed 7 months ago

MysticDaedra commented 7 months ago

Issue Description

This is very similar to the issue I had before, https://github.com/vladmandic/automatic/issues/2974.

Basically, it's sending the entire metadata for the image into the positive prompt, instead of just the positive prompt. I'm not sure why it is hanging/freezing during this process, except that maybe it's trying to send the image itself in text form to the positive prompt. Not sure.

Version Platform Description

22:41:25-287023 INFO Starting SD.Next 22:41:25-290023 INFO Logger: file="D:\automatic\sdnext.log" level=DEBUG size=65 mode=create 22:41:25-291023 INFO Python 3.10.6 on Windows 22:41:25-991140 INFO Version: app=sd.next updated=2024-03-21 hash=3994761b branch=dev url=https://github.com/vladmandic/automatic/tree/dev 22:41:26-540009 INFO Updating main repository 22:41:29-684900 INFO Upgraded to version: 3994761b Thu Mar 21 16:21:58 2024 -0400 22:41:29-691935 INFO Platform: arch=AMD64 cpu=AMD64 Family 25 Model 33 Stepping 2, AuthenticAMD system=Windows release=Windows-10-10.0.22631-SP0 python=3.10.6 22:41:29-700374 INFO nVidia CUDA toolkit detected: nvidia-smi present 22:41:29-833576 INFO Startup: standard 22:41:29-835078 INFO Verifying requirements 22:41:29-842597 INFO Verifying packages 22:41:29-843598 INFO Verifying submodules 22:41:37-941512 DEBUG Installed packages: 322 22:41:37-942525 DEBUG Extensions all: ['Lora', 'sd-extension-chainner', 'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg'] 22:42:17-559013 INFO Extensions enabled: ['Lora', 'sd-extension-chainner', 'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet', 'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'adetailer', 'canvas-zoom', 'sd-webui-infinite-image-browsing', 'sd-webui-memory-release', 'sd_civitai_extension', 'ultimate-upscale-for-automatic1111']

Relevant log output

23:48:55-132653 DEBUG    Paste prompt: type="current" prompt="{"prompt": "photorealistic, (highly detailed textures:1.4), highly detailed film photograph of cla1re wearing a sweetegl lolita dress, girlish,
                         girly, candid photography, meadow, flowers, sunlight, dramatic lighting,  <lora:cla1re3 (20):1.2> <lora:SweetLolitaXLv4.23:1.2> SkinHairDetail-SDXL", "all_prompts": ["photorealistic,
                         (highly detailed textures:1.4), highly detailed film photograph of cla1re wearing a sweetegl lolita dress, girlish, girly, candid photography, meadow, flowers, sunlight, dramatic
                         lighting,  <lora:cla1re3 (20):1.2> <lora:SweetLolitaXLv4.23:1.2> SkinHairDetail-SDXL"], "negative_prompt": "(FastNegativeV2-SDXL:0.5)", "all_negative_prompts":
                         ["(FastNegativeV2-SDXL:0.5)"], "seed": 2321651447, "all_seeds": [2321651447], "subseed": -1, "all_subseeds": [2588821777], "subseed_strength": 0, "width": 2688, "height": 3456,
                         "sampler_name": "DPM SDE", "cfg_scale": 1.5, "steps": 8, "batch_size": 1, "restore_faces": true, "face_restoration_model": "Face HiRes", "sd_model_hash": "4089addd5a",
                         "seed_resize_from_w": 0, "seed_resize_from_h": 0, "denoising_strength": 0.45, "extra_generation_params": {"Ultimate SD upscale upscaler": "chaiNNer 4xLexicaDAT2_otf", "Ultimate SD
                         upscale tile_width": 896, "Ultimate SD upscale tile_height": 896, "Ultimate SD upscale mask_blur": 8, "Ultimate SD upscale padding": 64, "Hypertile UNet": 448, "ADetailer model":
                         "face_yolov8m.pt", "ADetailer prompt": "young cla1re, fFaceDetail-SDXL EyeDetail-SDXL <lora:cla1re3 (20):1.0>", "ADetailer confidence": 0.7, "ADetailer mask only top k largest": 1,
                         "ADetailer dilate erode": 4, "ADetailer mask blur": 4, "ADetailer denoising strength": 0.5, "ADetailer inpaint only masked": true, "ADetailer inpaint padding": 128, "ADetailer model
                         2nd": "mediapipe_face_mesh_eyes_only", "ADetailer prompt 2nd": "purple nebula eyes, genetically enhanced, EyeDetail-SDXL, <lora:Stunning_eyes_2:1.0>", "ADetailer negative prompt 2nd":
                         "                                                                               ", "ADetailer confidence 2nd": 0.6, "ADetailer mask only top k largest 2nd": 1, "ADetailer dilate erode
                         2nd": 4, "ADetailer mask blur 2nd": 4, "ADetailer denoising strength 2nd": 0.4, "ADetailer inpaint only masked 2nd": true, "ADetailer inpaint padding 2nd": 32, "ADetailer model 3rd":
                         "person_yolov8m-seg.pt", "ADetailer prompt 3rd": "young cla1re, sweetegl dress, lolita,                                                      ", "ADetailer negative prompt 3rd": "
                         ", "ADetailer confidence 3rd": 0.5, "ADetailer dilate erode 3rd": 4, "ADetailer mask blur 3rd": 4, "ADetailer denoising strength 3rd": 0.35, "ADetailer inpaint only masked 3rd": true,
                         "ADetailer inpaint padding 3rd": 32, "ADetailer model 4th": "hand_yolov8n.pt", "ADetailer prompt 4th": "young girl hand", "ADetailer negative prompt 4th": "bad-hands-5-SDXL",
                         "ADetailer confidence 4th": 0.5, "ADetailer dilate erode 4th": 4, "ADetailer mask blur 4th": 4, "ADetailer denoising strength 4th": 0.3, "ADetailer inpaint only masked 4th": true,
                         "ADetailer inpaint padding 4th": 32, "ADetailer version": "24.3.2", "Lora hashes": "cla1re3 (20): be178959, SweetLolitaXLv4.23: efbdc376", "Sampler options": "karras", "Pipeline":
                         "StableDiffusionXLInpaintPipeline", "Embeddings": "FastNegativeV2-SDXL"}, "index_of_first_image": 0, "infotexts": ["photorealistic, (highly detailed textures:1.4), highly detailed film
                         photograph of cla1re wearing a sweetegl lolita dress, girlish, girly, candid photography, meadow, flowers, sunlight, dramatic lighting,  <lora:cla1re3 (20):1.2>
                         <lora:SweetLolitaXLv4.23:1.2> SkinHairDetail-SDXL\nNegative prompt: (FastNegativeV2-SDXL:0.5)\nSteps: 8, Seed: 2321651447, Sampler: DPM SDE, CFG scale: 1.5, Size: 2688x3456, Parser:
                         Full parser, Model: lightningFusionXL_v141, Model hash: 4089addd5a, VAE: fixed_fp16_VAE_SDXL, Clip skip: 2, Backend: Diffusers, App: SD.Next, Version: 3994761, Comment: , Operations:
                         face; color; inpaint, Init image size: 2688x3456, Init image hash: 7923c87f, Resize scale: 1, Denoising strength: 0.45, Resize mode: Fixed, Face restoration: Face HiRes, Color
                         correction: True, Ultimate SD upscale upscaler: chaiNNer 4xLexicaDAT2_otf, Ultimate SD upscale tile_width: 896, Ultimate SD upscale tile_height: 896, Ultimate SD upscale mask_blur: 8,
                         Ultimate SD upscale padding: 64, Hypertile UNet: 448, ADetailer model: face_yolov8m.pt, ADetailer prompt: \"young cla1re, fFaceDetail-SDXL EyeDetail-SDXL <lora:cla1re3 (20):1.0>\",
                         ADetailer confidence: 0.7, ADetailer mask only top k largest: 1, ADetailer dilate erode: 4, ADetailer mask blur: 4, ADetailer denoising strength: 0.5, ADetailer inpaint only masked:
                         True, ADetailer inpaint padding: 128, ADetailer model 2nd: mediapipe_face_mesh_eyes_only, ADetailer prompt 2nd: \"purple nebula eyes, genetically enhanced, EyeDetail-SDXL,
                         <lora:Stunning_eyes_2:1.0>\", ADetailer negative prompt 2nd:                                                                                , ADetailer confidence 2nd: 0.6, ADetailer
                         mask only top k largest 2nd: 1, ADetailer dilate erode 2nd: 4, ADetailer mask blur 2nd: 4, ADetailer denoising strength 2nd: 0.4, ADetailer inpaint only masked 2nd: True, ADetailer
                         inpaint padding 2nd: 32, ADetailer model 3rd: person_yolov8m-seg.pt, ADetailer prompt 3rd: \"young cla1re, sweetegl dress, lolita,
                         \", ADetailer negative prompt 3rd:                                                                                , ADetailer confidence 3rd: 0.5, ADetailer dilate erode 3rd: 4,
                         ADetailer mask blur 3rd: 4, ADetailer denoising strength 3rd: 0.35, ADetailer inpaint only masked 3rd: True, ADetailer inpaint padding 3rd: 32, ADetailer model 4th: hand_yolov8n.pt,
                         ADetailer prompt 4th: young girl hand, ADetailer negative prompt 4th: bad-hands-5-SDXL, ADetailer confidence 4th: 0.5, ADetailer dilate erode 4th: 4, ADetailer mask blur 4th: 4,
                         ADetailer denoising strength 4th: 0.3, ADetailer inpaint only masked 4th: True, ADetailer inpaint padding 4th: 32, ADetailer version: 24.3.2, Lora hashes: \"cla1re3 (20): be178959,
                         SweetLolitaXLv4.23: efbdc376\", Sampler options: karras, Pipeline: StableDiffusionXLInpaintPipeline, Embeddings: FastNegativeV2-SDXL"], "styles": [], "job_timestamp": "20240321231755",
                         "clip_skip": 2}"
23:50:24-237772 DEBUG    Settings overrides: []

Backend

Diffusers

Branch

Dev

Model

SD-XL

Acknowledgements

MysticDaedra commented 7 months ago

And here's the full log file, too big to put in the initial post: sdnext.log

Silanda commented 7 months ago

Though I can't rule out something else changing on my end, I think I've been seeing something related since last night. At least, trying to send images from txt2img to img2img is causing a massive CPU spike followed by SD.Next becoming unresponsive.

FWIW, I do initial txt2img batches of 60 images, if that makes any difference.

vladmandic commented 7 months ago

i've fixed original issue reported here. regarding massive spike, its overall send-to design that is anything but sane (comes from orginal a1111), but i cant reimplement it from scratch right now. basically, it will trigger update of every single gradio component in the target tab, for example send-to-image triggers 150+ ui updates.