TypeError: must be real number, not NoneType (original) (raw)

Is there an existing issue for this?

What happened?

failed while genrating image with sdxl in new automatic111 1.5(1.5and2,1models works fine)

*** Error completing request
*** Arguments: ('task(mgt08oxwjebw2st)', '1girl', '', [], 20, 0, False, False, 1, 1, 7, 2868123816.0, -1.0, 0, 0, 0, False, 1024, 1024, False, 0.7, 2, 'Latent', 0, 0, 0, 0, '', '', [], <gradio.routes.Request object at 0x0000016C7096AB60>, 0, 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_use_sampler': False, 'ad_sampler': 'Euler a', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'inpaint_global_harmonious', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, {'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_use_sampler': False, 'ad_sampler': 'Euler a', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'inpaint_global_harmonious', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, False, True, False, 0, -1, False, 'txt2img', False, '', '', False, 'Euler a', False, 'train\riffusionTxt2audio_riffusionTxt2audio.safetensors [641c2ca3f2]', True, 0.5, True, 4, True, 32, True, False, 30, False, 6, False, 512, 512, '', False, 1, 'Both ▦', False, '', False, True, True, False, False, False, False, 100, 100, False, '', '', '', 'generateMasksTab', 4, 4, 2.5, 30, 1.03, 1, 1, 5, 0.5, 5, False, True, False, 20, False, 'keyword prompt', 'keyword1, keyword2', 'None', 'textual inversion first', 'None', '0.7', 'None', False, 'MultiDiffusion', False, True, 1024, 1024, 96, 96, 48, 1, '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, 1536, 96, True, True, True, False, 'Send to Canvas Editor', True, False, 1, False, False, False, 1.1, 1.5, 100, 0.7, False, False, True, False, False, 0, 'Gustavosta/MagicPrompt-Stable-Diffusion', '', False, 7, 100, 'Constant', 0, 'Constant', 0, 4, 1, 'Clear', 'Load', False, False, 'LoRA', 'None', 0, 0, 'LoRA', 'None', 0, 0, 'LoRA', 'None', 0, 0, 'LoRA', 'None', 0, 0, 'LoRA', 'None', 0, 0, None, 'Refresh models', False, 0, 16, 8, 'mm_sd_v15.ckpt', <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x0000016C73741810>, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x0000016C73743040>, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x0000016C73742B90>, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x0000016C73743970>, False, '', 0.5, True, False, '', 'Lerp', False, 0, False, False, 'Matrix', 'Horizontal', 'Mask', 'Prompt', '1,1', '0.2', False, False, False, 'Attention', False, '0', '0', '0.4', None, None, False, '0', 'D:\sd-webui-aki-v4\models\roop\inswapper_128.onnx', 'CodeFormer', 1, '', 1, 1, False, True, False, False, 0, None, [], 0, False, [], [], False, 0, 1, False, False, 0, None, [], -2, False, [], False, 0, None, None, 3, 5.0, 10.0, 0.1, '2', False, False, False, False, False, '', False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, False, False, False, '#000000', False, 5, 'all', 'all', 'all', '', '', '', '1', 'none', False, '', '', 'comma', '', True, '', '20', 'all', 'all', 'all', 'all', '', 5, 24, 12.5, 1000, '', 'DDIM', 0, 64, 64, '', 64, 7.5, 0.42, 'DDIM', 64, 64, 1, 0, 92, True, True, True, False, False, False, 'midas_v21_small', 'None', '', '', 1, 'FirstGen', False, False, 'Current', False, 1 2 3
*** 0 , False, '', False, 1, False, False, 30, '', False, False, False, '', '', '', '', '', None, None, False, None, None, False, None, None, False, None, None, False, 50, True, False, 0, 1, 'GPU', True, False, False, False, False, 0, 512, False, 512, False, False, 3, False, 3, True, 3, False, 'Horizontal', False, False, 'u2net', False, True, True, False, 0, 2.5, 'polylines_sharp', ['left-right', 'red-cyan-anaglyph'], 0, '∯boost∯clipdepth∯clipdepth_far∯clipdepth_near∯compute_device∯do_output_depth∯gen_normalmap∯gen_rembg∯gen_simple_mesh∯gen_stereo∯model_type∯net_height∯net_size_match∯net_width∯normalmap_invert∯normalmap_post_blur∯normalmap_post_blur_kernel∯normalmap_pre_blur∯normalmap_pre_blur_kernel∯normalmap_sobel∯normalmap_sobel_kernel∯output_depth_combine∯output_depth_combine_axis∯output_depth_invert∯pre_depth_background_removal∯rembg_model∯save_background_removal_masks∯save_outputs∯simple_mesh_occlude∯simple_mesh_spherical∯stereo_balance∯stereo_divergence∯stereo_fill_algo∯stereo_modes∯stereo_separation', 0, 1, 512, 512, True, False, False, True, True, False, 1, True, 3, False, 3, False, 3, 1) {}
Traceback (most recent call last):
File "D:\sd-webui-aki-v4\modules\call_queue.py", line 58, in f
res = list(func(*args, **kwargs))
File "D:\sd-webui-aki-v4\modules\call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "D:\sd-webui-aki-v4\modules\txt2img.py", line 62, in txt2img
processed = processing.process_images(p)
File "D:\sd-webui-aki-v4\modules\processing.py", line 673, in process_images
res = process_images_inner(p)
File "D:\sd-webui-aki-v4\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack
return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
File "D:\sd-webui-aki-v4\modules\processing.py", line 782, in process_images_inner
p.setup_conds()
File "D:\sd-webui-aki-v4\modules\processing.py", line 1180, in setup_conds
super().setup_conds()
File "D:\sd-webui-aki-v4\modules\processing.py", line 365, in setup_conds
self.c = self.get_conds_with_caching(prompt_parser.get_multicond_learned_conditioning, prompts, self.steps * self.step_multiplier, [self.cached_c], self.extra_network_data)
File "D:\sd-webui-aki-v4\modules\processing.py", line 353, in get_conds_with_caching
cache[1] = function(shared.sd_model, required_prompts, steps)
File "D:\sd-webui-aki-v4\modules\prompt_parser.py", line 236, in get_multicond_learned_conditioning
learned_conditioning = get_learned_conditioning(model, prompt_flat_list, steps)
File "D:\sd-webui-aki-v4\modules\prompt_parser.py", line 163, in get_learned_conditioning
conds = model.get_learned_conditioning(texts)
File "D:\sd-webui-aki-v4\modules\sd_models_xl.py", line 24, in get_learned_conditioning
"original_size_as_tuple": torch.tensor([height, width], **devices_args).repeat(len(batch), 1),
TypeError: must be real number, not NoneType
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

Steps to reproduce the problem

  1. choose xl model
  2. generate image
  3. error pop up

What should have happened?

generat image just like other models

Version or Commit where the problem happens

Version: v1.5

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

Windows

What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

Cross attention optimization

xformers

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

List of extensions

many,,,but works fine with 1.5/2.1 models

Console logs

Additional information

No response