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

[Bug]: Image with two faces. Template 1 error: Error info is index 0 is out of bounds for axis 0 with size 0, skip it. #431

Open
2 tasks done
yankai-victor opened this issue Jul 5, 2024 · 0 comments

Comments

@yankai-victor
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

Is EasyPhoto the latest version?

  • I have updated EasyPhoto to the latest version and the bug still exists.

What happened?

u=1994847390,4108431023 fm=253 fmt=auto app=138 f=JPEG
I use this image to change face. If I set the Num of Faceid =1, it's fine. But if i set the Num of Faceid =2, there is always wrong.

Steps to reproduce the problem

  1. upload image
  2. set num of faceid, user_0 id and user_1 id
  3. Start Generation Single Image Upload

What should have happened?

The two number of face in the image will be changed

Commit where the problem happens

webui:
EastPhoto: Template 1 error: Error info is index 0 is out of bounds for axis 0 with size 0, skip it.

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

no

List of enabled extensions

扩展插件/Extension 网址/URL 分支/Branch 版本/Version 日期/Date 更新/Update
adetailer https://github.com/Bing-su/adetailer.git main a7d96113 2024-06-16 08:32:49 latest
sd-webui-EasyPhoto https://github.com/aigc-apps/sd-webui-EasyPhoto main c9a8c79 2024-06-06 09:15:18 latest
sd-webui-controlnet https://github.com/Mikubill/sd-webui-controlnet.git main ee96dc92 2024-07-04 01:31:50 latest
stable-diffusion-webui-chinese https://github.com/VinsonLaro/stable-diffusion-webui-chinese main e240eccb 2024-05-14 21:42:27 latest

Console logs

Loading weights [59ffe2243a] from D:\Project\SD1\models\Stable-diffusion\Chilloutmix-Ni-pruned-fp16-fix.safetensors
2024-07-05 19:08:21,272 - EasyPhoto - ControlNet unit number: 4
2024-07-05 19:08:21,272 - EasyPhoto - Found 2 user id(s), but only 0 image prompt(s) for IP-Adapter Control. Use the reference image corresponding to the user instead.
2024-07-05 19:08:21,272 - EasyPhoto - Display score is forced to be true when IP-Adapter Control is enabled.
2024-07-05 19:08:21,565 - EasyPhoto - Start templates and user_ids preprocess.
Reusing loaded model realisticVisionV51_v51VAE.safetensors [ef76aa2332] to load Chilloutmix-Ni-pruned-fp16-fix.safetensors [59ffe2243a]
Loading weights [59ffe2243a] from D:\Project\SD1\models\Stable-diffusion\Chilloutmix-Ni-pruned-fp16-fix.safetensors
Applying attention optimization: Doggettx... done.
Weights loaded in 1.4s (send model to cpu: 0.6s, apply weights to model: 0.3s, move model to device: 0.4s).
Loading VAE weights specified in settings: D:\Project\SD1\models\VAE\vae-ft-mse-840000-ema-pruned.ckpt
Applying attention optimization: Doggettx... done.
VAE weights loaded.
2024-07-05 19:08:24,531 - EasyPhoto -
            Start Generate template                 : 1;
            user_ids                                : ('jay', 'jay', 'none', 'none', 'none');
            sd_model_checkpoint                     : Chilloutmix-Ni-pruned-fp16-fix.safetensors;
            input_prompts                           : ['easyphoto_face, easyphoto, 1person, <lora:jay:0.9>, <lora:FilmVelvia3:0.65>, masterpiece, beauty', 'easyphoto_face, easyphoto, 1person, <lora:jay:0.9>, <lora:FilmVelvia3:0.65>, masterpiece, beauty', 'none', 'none', 'none'];
            before_face_fusion_ratio                : 0.6;
            after_face_fusion_ratio                 : 0.6;
            first_diffusion_steps                   : 50;
            first_denoising_strength                : 0.45;
            second_diffusion_steps                  : 20;
            second_denoising_strength               : 0.3;
            seed                                    : 30486
            crop_face_preprocess                    : True
            apply_face_fusion_before                : True
            apply_face_fusion_after                 : True
            color_shift_middle                      : True
            color_shift_last                        : True
            super_resolution                        : True
            super_resolution_method                 : gpen
            display_score                           : True
            background_restore                      : False
            background_restore_denoising_strength   : 0.35
            makeup_transfer                         : False
            makeup_transfer_ratio                   : 0.5
            skin_retouching_bool                    : False
            face_shape_match                        : False
            id_control                              : True
            id_control_method                       : IP-Adapter Face
            ipa_weight                              : 0.3
            instantid_id_weight                     : 0.5
            instantid_ipa_weight                    : 0.5
            instantid_image_path                    : None
            ipa_image_path                          : None
            ref_mode_choose                         : Infer with User Lora
            no_user_lora_mode                       : IP-Adapter Face
            ipa_only_weight                         : 0.6
            ipa_only_image_path                     : None
            instantid_only_id_weight                : 0.5
            instantid_only_ipa_weight               : 0.5
            instantid_only_image_path               : None

2024-07-05 19:08:24,839 - EasyPhoto - Start Image resize to 512.0.
2024-07-05 19:08:24,844 - EasyPhoto - Start face detect.
D:\Project\SD1\venv\lib\site-packages\modelscope\models\cv\image_face_fusion\facelib\matlab_cp2tform.py:81: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  r, _, _, _ = lstsq(X, U)
2024-07-05 19:08:27,005 - EasyPhoto - Start First diffusion.
100%|██████████████████████████████████████████████████████████████████████████████████| 10/10 [00:02<00:00,  3.97it/s]
2024-07-05 19:08:30,031 - EasyPhoto - Start color shift middle.
2024-07-05 19:08:30,236 - EasyPhoto - Start second face fusion.
2024-07-05 19:08:31,358 - EasyPhoto - Start mouth detect.
2024-07-05 19:08:31,502 - EasyPhoto - Start Second diffusion.
100%|████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:01<00:00,  6.28it/s]
2024-07-05 19:08:33,093 - EasyPhoto - Start color shift last.
2024-07-05 19:08:33,200 - EasyPhoto - Start paste crop image to origin template.
C:\Users\Cinta\.cache\modelscope\modelscope_modules\cv_retinafce_recognition\image_face_recognition\matlab_cp2tform.py:81: FutureWarning: `rcond` parameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass `rcond=None`, to keep using the old, explicitly pass `rcond=-1`.
  r, _, _, _ = lstsq(X, U)
2024-07-05 19:08:33,875 - EasyPhoto - Start paste crop image to origin template in multi people.
2024-07-05 19:08:33,975 - EasyPhoto - Start Image resize to 512.0.
2024-07-05 19:08:33,980 - EasyPhoto - Start face detect.
Traceback (most recent call last):
  File "D:\Project\SD1\extensions\sd-webui-EasyPhoto\scripts\easyphoto_infer.py", line 1338, in easyphoto_infer_forward
    input_image_retinaface_box = input_image_retinaface_boxes[0]
IndexError: index 0 is out of bounds for axis 0 with size 0
2024-07-05 19:08:34,149 - EasyPhoto - Template 1 error: Error info is index 0 is out of bounds for axis 0 with size 0, skip it.
Cleanup completed.
Reusing loaded model Chilloutmix-Ni-pruned-fp16-fix.safetensors [59ffe2243a] to load realisticVisionV51_v51VAE.safetensors [ef76aa2332]
Loading weights [ef76aa2332] from D:\Project\SD1\models\Stable-diffusion\realisticVisionV51_v51VAE.safetensors
Loading VAE weights specified in settings: D:\Project\SD1\models\VAE\vae-ft-mse-840000-ema-pruned.ckpt
Applying attention optimization: Doggettx... done.
Weights loaded in 1.7s (send model to cpu: 0.6s, apply weights to model: 0.5s, load VAE: 0.2s, move model to device: 0.5s).
Restoring base VAE
Applying attention optimization: Doggettx... done.
VAE weights loaded.

Additional information

No response

@yankai-victor yankai-victor changed the title [Bug]: Image with two face. Template 1 error: Error info is index 0 is out of bounds for axis 0 with size 0, skip it. [Bug]: Image with two faces. Template 1 error: Error info is index 0 is out of bounds for axis 0 with size 0, skip it. Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant