Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Extension]: Control: ADetailer fails to run after adding additional ControlNet units #3090

Open
1 task done
lbeltrame opened this issue Apr 28, 2024 · 0 comments
Open
1 task done
Labels
extension Extension is not working correctly

Comments

@lbeltrame
Copy link

Issue Description

When adding a new ControlNet unit, after a successful run with ADetailer, subsequent runs will fail: my guess is that ADetailer gets confused, or Control sends incorrect information to ADetailer (somehow a list that should contain something does not).

16:41:30-641782 ERROR    Running script postprocess image:                      
                         extensions/adetailer/scripts/!adetailer.py: IndexError 
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /notebooks/automatic/modules/scripts.py:583 in postprocess_image             │
│                                                                              │
│   582 │   │   │   │   args = p.per_script_args.get(script.title(), p.script_ │
│ ❱ 583 │   │   │   │   script.postprocess_image(p, pp, *args)                 │
│   584 │   │   │   except Exception as e:                                     │
│                                                                              │
│ /notebooks/automatic/extensions/adetailer/adetailer/traceback.py:159 in wrap │
│                                                                              │
│   158 │   │   │   │   error = RuntimeError(output)                           │
│ ❱ 159 │   │   │   raise error from None                                      │
│   160                                                                        │
╰──────────────────────────────────────────────────────────────────────────────╯
IndexError: 
╭──────────────────────────────────────────────────────────────────────────╮
│                               System info                                │
│ ┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ │
│ ┃             ┃ Value                                                  ┃ │
│ ┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │
│ │    Platform │ Linux-5.19.0-45-generic-x86_64-with-glibc2.31          │ │
│ │      Python │ 3.10.10 (main, Feb  8 2023, 14:50:01) [GCC 9.4.0]      │ │
│ │     Version │ Unknown (too old or vladmandic)                        │ │
│ │      Commit │ Unknown                                                │ │
│ │ Commandline │ ['launch.py', '--disable-console-progressbars',        │ │
│ │             │ '--upgrade']                                           │ │
│ │   Libraries │ {'torch': '2.2.0+cu121', 'torchvision':                │ │
│ │             │ '0.17.0+cu121', 'ultralytics': '8.2.4', 'mediapipe':   │ │
│ │             │ '0.10.11'}                                             │ │
│ └─────────────┴────────────────────────────────────────────────────────┘ │
│                                  Inputs                                  │
│ ┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ │
│ ┃                 ┃ Value                                              ┃ │
│ ┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │
│ │          prompt │ 1man, original, (solo:1.1), standing, straight-on, │ │
│ │                 │ two-handed, full body, arm up, holding sword,      │ │
│ │                 │ (glowing sword), incoming attack, (electricity     │ │
│ │                 │ over sword), (toned male:0.8), male focus, mature  │ │
│ │                 │ male, dark brown hair, dark brown eyes, (very      │ │
│ │                 │ short hair:1.1), pixie cut,  (ahoge:0.9), hair     │ │
│ │                 │ between eyes, serious, determined, brave, poweful, │ │
│ │                 │ dominant, v-shaped eyebrows, (open mouth:1.2),     │ │
│ │                 │ shouting,  (blue:1.25),  cyberarmor, breastplate,  │ │
│ │                 │ vambraces, cuisses, gloves, detailed ultra         │ │
│ │                 │ photorealistic parking lot in a residential area   │ │
│ │                 │ of Tokyo, parking lot,  (night:1.2), (night sky),  │ │
│ │                 │ building, city lights, chiaroscuro, deserted, epic │ │
│ │                 │ composition, cinematic composition, outdoors,      │ │
│ │                 │ cinematic lighting, great lighting,  perfect       │ │
│ │                 │ hands, detailed shadows, detailed body,  anime     │ │
│ │                 │ artwork, anime style, key visual, vibrant, studio  │ │
│ │                 │ anime, highly detailed, newest, late, anime        │ │
│ │                 │ coloring, masterpiece, best quality, very          │ │
│ │                 │ aesthetic, absurdres <lora:Difference_AnimeFace:1> │ │
│ │                 │ <lora:style-enhancer-xl:0.6> <lora:Perfect Hands   │ │
│ │                 │ v2:1>  <lora:great_lighting:4>                     │ │
│ │                 │ <lora:xl_more_art-full_v1:0.8>                     │ │
│ │ negative_prompt │ FastNegative, lowres, (bad), text, logo, blurry,   │ │
│ │                 │ error, fewer digits, extra digit, missing fingers, │ │
│ │                 │ worst quality, jpeg artifacts, low quality,        │ │
│ │                 │ watermark, unfinished, displeasing, oldest, early, │ │
│ │                 │ chromatic aberration, signature, extra digits,     │ │
│ │                 │ artistic error, username, scan, ,  photo,          │ │
│ │                 │ deformed, black and white, realism, disfigured,    │ │
│ │                 │ low contrast, lipgloss, curly hair, parted bangs   │ │
│ │                 │ sketch,  (nose:0.95), colored inner hair,          │ │
│ │                 │ (key:1.2),  blush,  key necklace, forehead, 1girl, │ │
│ │                 │ female, (fantasy, knight:1.2), bare hands, crowd,  │ │
│ │                 │ crowded, (white cyberarmor), (from above:1.2),     │ │
│ │                 │ (wall), ruins, fire, violet cybearmor, sweat, bare │ │
│ │                 │ arms , shota, white cyberarmor                     │ │
│ │          n_iter │ 1                                                  │ │
│ │      batch_size │ 1                                                  │ │
│ │           width │ 832                                                │ │
│ │          height │ 1216                                               │ │
│ │    sampler_name │ DPM++ 2M                                           │ │
│ │       enable_hr │ True                                               │ │
│ │     hr_upscaler │ ESRGAN 4x Ultrasharp                               │ │
│ │      checkpoint │ 7th_anime_XL-A-fp16                                │ │
│ │             vae │ Automatic                                          │ │
│ │            unet │ None                                               │ │
│ └─────────────────┴────────────────────────────────────────────────────┘ │
│                 ADetailer                                                │
│ ┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓                                │
│ ┃                     ┃ Value           ┃                                │
│ ┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩                                │
│ │             version │ 24.4.2          │                                │
│ │            ad_model │ face_yolov8n.pt │                                │
│ │           ad_prompt │                 │                                │
│ │  ad_negative_prompt │                 │                                │
│ │ ad_controlnet_model │ None            │                                │
│ │              is_api │ True            │                                │
│ └─────────────────────┴─────────────────┘                                │
│ ╭───────────────── Traceback (most recent call last) ──────────────────╮ │
│ │ /notebooks/automatic/extensions/adetailer/adetailer/traceback.py:139 │ │
│ │ in wrapper                                                           │ │
│ │                                                                      │ │
│ │   138 │   │   try:                                                   │ │
│ │ ❱ 139 │   │   │   return func(*args, **kwargs)                       │ │
│ │   140 │   │   except Exception as e:                                 │ │
│ │                                                                      │ │
│ │ /notebooks/automatic/extensions/adetailer/scripts/!adetailer.py:805  │ │
│ │ in postprocess_image                                                 │ │
│ │                                                                      │ │
│ │    804 │   │   │   │   │   continue                                  │ │
│ │ ❱  805 │   │   │   │   is_processed |= self._postprocess_image_inner │ │
│ │    806                                                               │ │
│ │                                                                      │ │
│ │ /notebooks/automatic/extensions/adetailer/scripts/!adetailer.py:776  │ │
│ │ in _postprocess_image_inner                                          │ │
│ │                                                                      │ │
│ │    775 │   │   │   p2 = copy(i2i)                                    │ │
│ │ ❱  776 │   │   │   p2.init_images = [processed.images[0]]            │ │
│ │    777                                                               │ │
│ ╰──────────────────────────────────────────────────────────────────────╯ │
│ IndexError: list index out of range                                      │
╰──────────────────────────────────────────────────────────────────────────╯

Steps to reproduce

I haven't been able to reproduce it reliably, but what I found that mostly works is (using the same images as #3083):

  1. Add a new ControlNet unit, set it up
  2. Set ADetailer parameters
  3. Generate an image
  4. Add an additional CN unit, set it up
  5. Generate an image

Version Platform Description

16:19:29-099772 INFO Starting SD.Next
16:19:29-102881 INFO Logger: file="/notebooks/automatic/sdnext.log"
level=INFO size=10489169 mode=append
16:19:29-104182 INFO Python 3.10.10 on Linux
16:19:29-153707 INFO Version: app=sd.next updated=2024-04-28 hash=01e2ab05
branch=dev
url=https://github.com/vladmandic/automatic/tree/dev
16:19:29-400429 INFO Updating main repository
16:19:32-809095 INFO Upgraded to version: a26d222 Sun Apr 28 11:51:08 2024
-0400
16:19:32-815835 INFO Platform: arch=x86_64 cpu=x86_64 system=Linux
release=5.19.0-45-generic python=3.10.10

URL link of the extension

https://github.com/Bing-su/adetailer

URL link of the issue reported in the extension repository

No response

Acknowledgements

  • I have read the above and searched for existing issues
@lbeltrame lbeltrame added the extension Extension is not working correctly label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension Extension is not working correctly
Projects
None yet
Development

No branches or pull requests

1 participant