ototadana / sd-face-editor

Face Editor for Stable Diffusion
MIT License
1.02k stars 85 forks source link

"TypeError: 'NoneType' object is not subscriptable"Keep appearing #84

Closed magickblog closed 1 year ago

magickblog commented 1 year ago

To create a public link, set share=True in launch(). Create LRU cache (max_size=16) for preprocessor results. Startup time: 4.8s (list SD models: 0.3s, load scripts: 3.7s, create ui: 0.4s, gradio launch: 0.1s, scripts app_started_callback: 0.2s). number of faces: 1 prompt for the face: RAW photo,full-body portrait,a young male barbarian with short hair is wielding an axe,fiercely attacking a demon,pale skin,slim body,background is ancient city ruins,(high detailed skin:1.2),8k uhd,dslr,soft lighting,high quality,film grain,Fujifilm XT3, 100%|██████████████████████████████████████████████████████████████████████████████████| 11/11 [00:15<00:00, 1.38s/it] Error completing request██████████████████████████████ | 11/22 [00:12<00:13, 1.27s/it] Arguments: ('task(9iz26utx8d2hbcg)', 0, 'RAW photo,full-body portrait,a young male barbarian with short hair is wielding an axe,fiercely attacking a demon,pale skin,slim body,background is ancient city ruins,(high detailed skin:1.2),8k uhd,dslr,soft lighting,high quality,film grain,Fujifilm XT3,', 'lowres,bad anatomy,bad hands,missing fingers,extra digits,extra hands,extra feet,fewer digits,bad feet,cropped,worst quality,low quality,normal quality,jpeg artifacts,signature,watermark,username,blurry,1girl,3d rendering,((((big hands, un-detailed skin, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime)))),(((ugly mouth, ugly eyes, missing teeth, crooked teeth, close up, cropped, out of frame))),worst quality,low quality,jpeg artifacts,ugly,duplicate,morbid,mutilated,extra fingers,mutated hands,poorly drawn hands,poorly drawn face,mutation,deformed,blurry,dehydrated,bad anatomy,bad proportions,extra limbs,cloned face,disfigured,gross proportions,malformed limbs,missing arms,missing legs,extra arms,extra legs,fused fingers,too many fingers,long neck,easynegative,black and white style,missing head,missing hand,missing leg,', [], <PIL.Image.Image image mode=RGBA size=768x432 at 0x23CA1B52470>, None, None, None, None, None, None, 25, 16, 4, 0, 1, False, False, 1, 1, 7, 1.5, 0.75, 2790478946.0, -1.0, 0, 0, 0, False, 0, 432, 768, 1, 0, 0, 32, 0, '', '', '', [], 9, False, {'ad_model': 'face_yolov8n.pt', 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1}, {'ad_model': 'None', 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1}, False, 'MultiDiffusion', False, True, 1024, 1024, 96, 96, 48, 4, 'None', 2, False, 10, 1, 1, 64, False, False, False, False, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 0.4, 0.4, 0.2, 0.2, '', '', 'Background', 0.2, -1.0, False, 512, 64, True, True, True, False, False, 1.6, 0.97, 0.4, 0, 20, 0, 12, '', True, False, False, False, 512, False, True, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x0000023C9D59A530>, '

\n', True, True, '', '', True, 50, True, 1, 0, False, 4, 0.5, 'Linear', 'None', '

Recommended settings: Sampling Steps: 80-100, Sampler: Euler a, Denoising strength: 0.8

', 128, 8, ['left', 'right', 'up', 'down'], 1, 0.05, 128, 4, 0, ['left', 'right', 'up', 'down'], False, False, 'positive', 'comma', 0, False, False, '', '

Will upscale the image by the selected scale factor; use width and height sliders to set tile size

', 64, 0, 2, 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, 1.6, 0.97, 0.4, 0, 20, 1, 12, '', True, False, False, False, 512, False, True, None, None, False, 50) {} Traceback (most recent call last): File "D:\aidraw\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f res = list(func(*args, *kwargs)) File "D:\aidraw\stable-diffusion-webui-directml\modules\call_queue.py", line 37, in f res = func(args, *kwargs) File "D:\aidraw\stable-diffusion-webui-directml\modules\img2img.py", line 176, in img2img processed = modules.scripts.scripts_img2img.run(p, args) File "D:\aidraw\stable-diffusion-webui-directml\modules\scripts.py", line 441, in run processed = script.run(p, *script_args) File "D:\aidraw\stable-diffusion-webui-directml\extensions\sd-face-editor\scripts\face_editor.py", line 257, in run return self.proc_image(o, mask_model, detection_model, File "D:\aidraw\stable-diffusion-webui-directml\extensions\sd-face-editor\scripts\face_editor.py", line 520, in proc_image proc = self.save_images(p) File "D:\aidraw\stable-diffusion-webui-directml\extensions\sd-face-editor\scripts\face_editor.py", line 574, in save_images infotext = create_infotext(p, p.all_prompts, p.all_seeds, p.all_subseeds, {}, 0, 0) File "D:\aidraw\stable-diffusion-webui-directml\modules\processing.py", line 587, in create_infotext return f"{all_prompts[index]}{negative_prompt_text}\n{generation_params_text}".strip() TypeError: 'NoneType' object is not subscriptable

I'm not very familiar with the rules of this forum, so I'll just copy and paste the error message. The facial reconstruction starts for a few seconds and then this error keeps appearing. I have already uninstalled the face editor and reinstalled it several times.

ototadana commented 1 year ago

@magickblog Thanks for the error report.

Unfortunately, this error does not occur in my environment, but thanks to the information you pasted, I was able to add code to prevent the error.

Could you please try with the latest version?

magickblog commented 1 year ago

@magickblog Thanks for the error report.

Unfortunately, this error does not occur in my environment, but thanks to the information you pasted, I was able to add code to prevent the error.

Could you please try with the latest version?

I have updated and the face editor is back to working properly. Thank you for the quick fix.