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

easy photo generate photo error,show error as below #426

Closed
fogyisland opened this issue May 7, 2024 · 5 comments
Closed

easy photo generate photo error,show error as below #426

fogyisland opened this issue May 7, 2024 · 5 comments

Comments

@fogyisland
Copy link

Diagnostics-1715085561.log
emplate 1 error: Error info is 1 validation error for ControlNetUnit
control_mode
value is not a valid enumeration member; permitted: 'Balanced', 'My prompt is more important', 'ControlNet is more important' (type=type_error.enum; enum_values=[<ControlMode.BALANCED: 'Balanced'>, <ControlMode.PROMPT: 'My prompt is more important'>, <ControlMode.CONTROL: 'ControlNet is more important'>]).

image

@Quakumei
Copy link

Quakumei commented May 9, 2024

I'm having the same issue. I wonder if it's somehow connected to recent updates in ControlNet, specifically, this part in their README.md

image

Log from container with traceback

supervisor-1  | 2024-05-09 11:27:45,942 - EasyPhoto - 
supervisor-1  |             Start Generate template                 : 1;
supervisor-1  |             user_ids                                : ('abc123', 'none', 'none', 'none', 'none');
supervisor-1  |             sd_model_checkpoint                     : Chilloutmix-Ni-pruned-fp16-fix.safetensors;
supervisor-1  |             input_prompts                           : ['easyphoto_face, easyphoto, 1person, <lora:abc123:0.9>, <lora:FilmVelvia3:0.65>, masterpiece, beauty', 'none', 'none', 'none', 'none'];
supervisor-1  |             before_face_fusion_ratio                : 0.6;
supervisor-1  |             after_face_fusion_ratio                 : 0.6;
supervisor-1  |             first_diffusion_steps                   : 50;
supervisor-1  |             first_denoising_strength                : 0.45;
supervisor-1  |             second_diffusion_steps                  : 20;
supervisor-1  |             second_denoising_strength               : 0.3;
supervisor-1  |             seed                                    : 41366
supervisor-1  |             crop_face_preprocess                    : True
supervisor-1  |             apply_face_fusion_before                : True
supervisor-1  |             apply_face_fusion_after                 : True
supervisor-1  |             color_shift_middle                      : True
supervisor-1  |             color_shift_last                        : True
supervisor-1  |             super_resolution                        : True
supervisor-1  |             super_resolution_method                 : gpen
supervisor-1  |             display_score                           : True
supervisor-1  |             background_restore                      : False
supervisor-1  |             background_restore_denoising_strength   : 0.35
supervisor-1  |             makeup_transfer                         : False
supervisor-1  |             makeup_transfer_ratio                   : 0.5
supervisor-1  |             skin_retouching_bool                    : False
supervisor-1  |             face_shape_match                        : False
supervisor-1  |             id_control                              : True
supervisor-1  |             id_control_method                       : IP-Adapter Face
supervisor-1  |             ipa_weight                              : 0.3
supervisor-1  |             instantid_id_weight                     : 0.5
supervisor-1  |             instantid_ipa_weight                    : 0.5
supervisor-1  |             instantid_image_path                    : None
supervisor-1  |             ipa_image_path                          : None
supervisor-1  |             ref_mode_choose                         : Infer with User Lora
supervisor-1  |             no_user_lora_mode                       : IP-Adapter Face
supervisor-1  |             ipa_only_weight                         : 0.6
supervisor-1  |             ipa_only_image_path                     : None
supervisor-1  |             instantid_only_id_weight                : 0.5
supervisor-1  |             instantid_only_ipa_weight               : 0.5
supervisor-1  |             instantid_only_image_path               : None
supervisor-1  |         
supervisor-1  | 2024-05-09 11:27:46,283 - EasyPhoto - Start Image resize to 512.0.
supervisor-1  | 2024-05-09 11:27:46,298 - EasyPhoto - Start face detect.
supervisor-1  | 2024-05-09 11:27:48,906 - EasyPhoto - Start First diffusion.
supervisor-1  | 2024-05-09 11:27:49,298 - ControlNet - WARNING - Deprecated alias 'input_image' detected. This field will be removed on 2024-06-01Please use 'image' instead.
supervisor-1  | Traceback (most recent call last):
supervisor-1  |   File "/workspace/stable-diffusion-webui/extensions/sd-webui-EasyPhoto/scripts/easyphoto_infer.py", line 1522, in easyphoto_infer_forward
supervisor-1  |     first_diffusion_output_image = inpaint(
supervisor-1  |   File "/workspace/stable-diffusion-webui/extensions/sd-webui-EasyPhoto/scripts/easyphoto_infer.py", line 388, in inpaint
supervisor-1  |     image = i2i_inpaint_call(
supervisor-1  |   File "/opt/micromamba/envs/webui/lib/python3.10/contextlib.py", line 79, in inner
supervisor-1  |     return func(*args, **kwds)
supervisor-1  |   File "/workspace/stable-diffusion-webui/extensions/sd-webui-EasyPhoto/scripts/sdwebui.py", line 721, in i2i_inpaint_call
supervisor-1  |     processed = processing.process_images(p_img2img)
supervisor-1  |   File "/workspace/stable-diffusion-webui/modules/processing.py", line 845, in process_images
supervisor-1  |     res = process_images_inner(p)
supervisor-1  |   File "/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/batch_hijack.py", line 56, in processing_process_images_hijack
supervisor-1  |     cn_is_batch, batches, output_dir, input_file_names = get_cn_batches(p)
supervisor-1  |   File "/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/batch_hijack.py", line 196, in get_cn_batches
supervisor-1  |     units = external_code.get_all_units_in_processing(p)
supervisor-1  |   File "/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/internal_controlnet/external_code.py", line 133, in get_all_units_in_processing
supervisor-1  |     return get_all_units(p.scripts, p.script_args)
supervisor-1  |   File "/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/internal_controlnet/external_code.py", line 146, in get_all_units
supervisor-1  |     return get_all_units_from(script_args[cn_script.args_from : cn_script.args_to])
supervisor-1  |   File "/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/internal_controlnet/external_code.py", line 174, in get_all_units_from
supervisor-1  |     all_units = [
supervisor-1  |   File "/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/internal_controlnet/external_code.py", line 175, in <listcomp>
supervisor-1  |     to_processing_unit(script_arg)
supervisor-1  |   File "/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/internal_controlnet/external_code.py", line 228, in to_processing_unit
supervisor-1  |     return ControlNetUnit.from_dict(unit)
supervisor-1  |   File "/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/internal_controlnet/args.py", line 409, in from_dict
supervisor-1  |     return ControlNetUnit(**values)
supervisor-1  |   File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
supervisor-1  | pydantic.error_wrappers.ValidationError: 1 validation error for ControlNetUnit
supervisor-1  | control_mode
supervisor-1  |   value is not a valid enumeration member; permitted: 'Balanced', 'My prompt is more important', 'ControlNet is more important' (type=type_error.enum; enum_values=[<ControlMode.BALANCED: 'Balanced'>, <ControlMode.PROMPT: 'My prompt is more important'>, <ControlMode.CONTROL: 'ControlNet is more important'>])
supervisor-1  | 2024-05-09 11:27:49,375 - EasyPhoto - Template 1 error: Error info is 1 validation error for ControlNetUnit
supervisor-1  | control_mode
supervisor-1  |   value is not a valid enumeration member; permitted: 'Balanced', 'My prompt is more important', 'ControlNet is more important' (type=type_error.enum; enum_values=[<ControlMode.BALANCED: 'Balanced'>, <ControlMode.PROMPT: 'My prompt is more important'>, <ControlMode.CONTROL: 'ControlNet is more important'>]), skip it.

I wonder if there is a way to install previous version of extension in A1111 to check my hypothesis which is that ControlNet had a breaking change. Can someone please tell how I can do that?

@Quakumei
Copy link

Quakumei commented May 9, 2024

I resolved the issue by downgrading ControlNet extension to commit 59d5998

This can be done by using following commands:

cd stable-diffusion-webui/extensions/sd-webui-controlnet
git checkout 59d5998

However, it messed my extensions tab a little

image

But it works

image

So downgrading works as a workaround, however it seems like either a bug was introduced in new version of ControlNet, or something is wrong with how it is being used by EasyPhoto after the update.

@fogyisland
Copy link
Author

YES, I downgrade from newest version and it works. so it may be compatibility problem.

@hlovingness
Copy link

Me too

@hkunzhe
Copy link
Collaborator

hkunzhe commented Jun 21, 2024

Closed via #424

@hkunzhe hkunzhe closed this as completed Jun 21, 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

4 participants