huchenlei / sd-webui-model-patcher

ComfyUI style LDM patching in A1111
Apache License 2.0
49 stars 1 forks source link

not working model patcher #1

Open arkboy1224 opened 1 month ago

arkboy1224 commented 1 month ago

error occur when i install this extension as

AttributeError: 'StableDiffusionProcessingImg2Img' object has no attribute 'model_patcher'. Did you mean: 'get_model_patcher'

but i delete extension img2img work again. why this happen?

huchenlei commented 1 month ago

Full console log please. It's likely that you need to update your IC-Light extension that uses the model patcher.

arkboy1224 commented 1 month ago

Startup time: 48.9s (prepare environment: 19.7s, import torch: 4.2s, import gradio: 1.4s, setup paths: 1.1s, initialize shared: 0.4s, other imports: 0.8s, load scripts: 12.7s, scripts before_ui_callback: 0.2s, create ui: 3.6s, gradio launch: 4.5s, app_started_callback: 0.2s). Warning: field include_init_images in API payload not found in <modules.processing.StableDiffusionProcessingImg2Img object at 0x000001CDDCE536A0>. Warning: field infotext in API payload not found in <modules.processing.StableDiffusionProcessingImg2Img object at 0x000001CDDCE536A0>. tiled upscale: 100%|█████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 10.74it/s] Error completing request Arguments: ('task(12mag6q7vmsrqaq)', <gradio.routes.Request object at 0x000001CDDCEE6E90>, 0, '((best quality, high_resolution, distinct_image)), ', ', (worst quality:1.2, low quality:1.2, bad anatomy:1.2, cropped hands, extra digit, fewer digit), text, error, jpeg artifacts, signature, watermark, username, artist name, ', [], <PIL.Image.Image image mode=RGBA size=225x225 at 0x1CDDCE53D60>, None, None, None, None, None, None, 4, 0, 1, 1, 1, 11, 1.5, 0.5, 0.0, 768, 512, 1, 0, 0, 32, 0, '', '', '', [], False, [], '', 0, False, 1, 0.5, 4, 0, 0.5, 2, 20, 'DPM++ 2M', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, ['face (skin)'], False, 4, 0, 1, 0, 32, 0, False, False, {'ad_model': 'face_yolov8n.pt', 'ad_model_classes': '', 'ad_tab_enable': True, 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_k_largest': 0, '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_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, {'ad_model': 'None', 'ad_model_classes': '', 'ad_tab_enable': True, 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_k_largest': 0, '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_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, False, 7, 100, 'Constant', 0, 'Constant', 0, 4, True, 'MEAN', 'AD', 1, {'enabled': False, 'model_type': 'FC', 'input_fg': None, 'uploaded_bg': None, 'bg_source_fc': 'Custom LightMap', 'bg_source_fbc': 'Use Background Image', 'remove_bg': True, 'reinforce_fg': False, 'detail_transfer': False, 'detail_transfer_use_raw_input': False, 'detail_transfer_blur_radius': 5}, <scripts.animatediff_ui.AnimateDiffProcess object at 0x000001CDDCE74D30>, False, 'Use same checkpoint', 'Use same vae', 1, 0, 'None', 'None', 'None', False, 0.15, 3, 0.4, 4, 'bicubic', 0.5, 2, True, False, True, False, False, False, 'Use same checkpoint', 'Use same vae', 'txt2img-1pass', 'None', '', '', 'Use same sampler', 'Use same scheduler', 'BMAB fast', 20, 7, 0.75, 0.5, 0.1, 0.9, False, False, 'Use same checkpoint', 'Use same vae', 'Select Model', 'None', '', '', 'Use same sampler', 'Use same scheduler', 20, 7, 0.75, 4, 0.35, False, 50, 200, 0.5, False, True, 'stretching', 'bottom', 'None', 0.85, 0.75, False, 'Use same checkpoint', 'Use same vae', True, '', '', 'Use same sampler', 'Use same scheduler', 'BMAB fast', 20, 7, 0.75, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, None, False, 1, False, '', False, False, False, True, True, 'Use same checkpoint', 'Use same vae', 'Use same sampler', 'Use same scheduler', 4, 3, 0.1, 1, 1, 0, 0.4, 7, 20, False, False, False, 'Score', 1, '', '', '', '', '', '', '', '', '', '', False, 512, 512, 7, 20, 4, 'Use same checkpoint', 'Use same vae', 'Use same sampler', 'Use same scheduler', 'Only masked', 32, 'BMAB Face(Normal)', 0.4, 4, 0.35, False, 0.26, False, True, False, 'subframe', '', '', 0.4, 7, True, 4, 0.3, 0.1, 'Only masked', 32, '', False, False, False, 0.4, 0.1, 0.9, 'Both', False, 1, 0, 1, False, 'Random', False, 0.6, 0, 0.3, 'Random', 'normal', False, True, 'normal', '', 'None', 0.5, False, False, 'Inpaint', 0.85, 0.6, 30, False, True, 'None', 1.5, 'None', False, 'AcadEref.ttf', 'bottom-left', 'left', '0', '#000000', '#000000', 12, 100, 0, 5, '', '', 'None', ControlNetUnit(is_ui=True, input_mode=<InputMode.SIMPLE: 'simple'>, batch_images='', output_dir='', loopback=False, enabled=False, module='none', model='None', weight=1.0, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, low_vram=False, processor_res=-1, threshold_a=-1.0, threshold_b=-1.0, guidance_start=0.0, guidance_end=1.0, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, inpaint_crop_input_image=False, hr_option=<HiResFixOption.BOTH: 'Both'>, save_detected_map=True, advanced_weighting=None, effective_region_mask=None, pulid_mode=<PuLIDMode.FIDELITY: 'Fidelity'>, union_control_type=<ControlNetUnionControlType.UNKNOWN: 'Unknown'>, ipadapter_input=None, mask=None, batch_mask_dir=None, animatediff_batch=False, batch_modifiers=[], batch_image_files=[], batch_keyframe_idx=None), ControlNetUnit(is_ui=True, input_mode=<InputMode.SIMPLE: 'simple'>, batch_images='', output_dir='', loopback=False, enabled=False, module='none', model='None', weight=1.0, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, low_vram=False, processor_res=-1, threshold_a=-1.0, threshold_b=-1.0, guidance_start=0.0, guidance_end=1.0, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, inpaint_crop_input_image=False, hr_option=<HiResFixOption.BOTH: 'Both'>, save_detected_map=True, advanced_weighting=None, effective_region_mask=None, pulid_mode=<PuLIDMode.FIDELITY: 'Fidelity'>, union_control_type=<ControlNetUnionControlType.UNKNOWN: 'Unknown'>, ipadapter_input=None, mask=None, batch_mask_dir=None, animatediff_batch=False, batch_modifiers=[], batch_image_files=[], batch_keyframe_idx=None), ControlNetUnit(is_ui=True, input_mode=<InputMode.SIMPLE: 'simple'>, batch_images='', output_dir='', loopback=False, enabled=False, module='none', model='None', weight=1.0, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, low_vram=False, processor_res=-1, threshold_a=-1.0, threshold_b=-1.0, guidance_start=0.0, guidance_end=1.0, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, inpaint_crop_input_image=False, hr_option=<HiResFixOption.BOTH: 'Both'>, save_detected_map=True, advanced_weighting=None, effective_region_mask=None, pulid_mode=<PuLIDMode.FIDELITY: 'Fidelity'>, union_control_type=<ControlNetUnionControlType.UNKNOWN: 'Unknown'>, ipadapter_input=None, mask=None, batch_mask_dir=None, animatediff_batch=False, batch_modifiers=[], batch_image_files=[], batch_keyframe_idx=None), False, False, 0, None, [], 0, False, [], [], False, 0, 1, False, False, 0, None, [], -2, False, [], False, 0, None, None, False, '1.5', 0, False, 0.01, 0.5, -0.13, 0, 0, 0, 0, False, 1, 0.8, 3, 0, 0, 150, 4, False, 0, 0, 150, False, 'Constant', 0, 100, False, False, False, 2, 0.1, 0.5, 0, '', 0, 25, 1, False, False, False, 'BREAK', '-', 0.2, 10, False, None, False, '0', '0', 'inswapper_128.onnx', 'CodeFormer', 1, True, 'None', 1, 1, False, True, 1, 0, 0, False, 0.5, True, False, 'CUDA', False, 0, 'None', '', None, False, False, 0.5, 0, 'tab_single', False, True, True, 'realisticVisionV51_v51VAE.safetensors [15012c538f]', True, True, False, '', '', '', '', 'None', -1, 'DPM++ 2M SDE', 'Automatic', 20, 0.3, 35, 4, 1280, 'sam_vit_b_01ec64.pth', 'GroundingDINO_SwinT_OGC (694MB)', 5.5, 1, 40, 0, 512, 512, 1, 1, 0, ['script'], False, False, 'realisticVisionV51_v51VAE.safetensors [15012c538f]', 'Random', ['Draw mask'], None, True, ['Draw mask'], None, True, None, '', 2, False, False, False, '-', -1, 0, 'ESRGAN_4x', 4, 'Use same sampler', 'Use same scheduler', 0.35, 1, '', 1800, 'Lanczos', True, True, 5, '', '', 'Use same checkpoint', 250, 2, True, 'Same', ControlNetUnit(is_ui=False, input_mode=<InputMode.SIMPLE: 'simple'>, batch_images=None, output_dir='', loopback=False, enabled=False, module='none', model='None', weight=1.0, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0.0, guidance_end=1.0, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, inpaint_crop_input_image=True, hr_option=<HiResFixOption.BOTH: 'Both'>, save_detected_map=True, advanced_weighting=None, effective_region_mask=None, pulid_mode=<PuLIDMode.FIDELITY: 'Fidelity'>, union_control_type=<ControlNetUnionControlType.UNKNOWN: 'Unknown'>, ipadapter_input=None, mask=None, batch_mask_dir=None, animatediff_batch=False, batch_modifiers=[], batch_image_files=[], batch_keyframe_idx=None), ControlNetUnit(is_ui=False, input_mode=<InputMode.SIMPLE: 'simple'>, batch_images=None, output_dir='', loopback=False, enabled=False, module='none', model='None', weight=1.0, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0.0, guidance_end=1.0, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, inpaint_crop_input_image=True, hr_option=<HiResFixOption.BOTH: 'Both'>, save_detected_map=True, advanced_weighting=None, effective_region_mask=None, pulid_mode=<PuLIDMode.FIDELITY: 'Fidelity'>, union_control_type=<ControlNetUnionControlType.UNKNOWN: 'Unknown'>, ipadapter_input=None, mask=None, batch_mask_dir=None, animatediff_batch=False, batch_modifiers=[], batch_image_files=[], batch_keyframe_idx=None), ControlNetUnit(is_ui=False, input_mode=<InputMode.SIMPLE: 'simple'>, batch_images=None, output_dir='', loopback=False, enabled=False, module='none', model='None', weight=1.0, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0.0, guidance_end=1.0, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, inpaint_crop_input_image=True, hr_option=<HiResFixOption.BOTH: 'Both'>, save_detected_map=True, advanced_weighting=None, effective_region_mask=None, pulid_mode=<PuLIDMode.FIDELITY: 'Fidelity'>, union_control_type=<ControlNetUnionControlType.UNKNOWN: 'Unknown'>, ipadapter_input=None, mask=None, batch_mask_dir=None, animatediff_batch=False, batch_modifiers=[], batch_image_files=[], batch_keyframe_idx=None), False, 1, 0.5, 4, 0, 0.5, 2, False, 0, 'Flat', 0, 'Flat', ' CFG Scale should be 2 or lower.', 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, 'start', '', '

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

', 64, 0, 1.5, 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False, None, None, False, None, None, False, None, None, False, 50, 16, 16, 8, True, False, 0, 'Range', 1, 'GPU', True, False, False, False, False, 0, 448, False, 448, 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'], 1, 0, False, '∯boost∯clipdepth∯clipdepth_far∯clipdepth_mode∯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_offset_exponent∯stereo_separation∯tiling_mode', 'Positive', 0, ', ', 'Generate and always save', 32, '') {} Traceback (most recent call last): File "H:\stable-diffusion-webui\modules\call_queue.py", line 57, in f res = list(func(
args, kwargs)) File "H:\stable-diffusion-webui\modules\call_queue.py", line 36, in f res = func(*args, *kwargs) File "H:\stable-diffusion-webui\modules\img2img.py", line 232, in img2img processed = process_images(p) File "H:\stable-diffusion-webui\modules\processing.py", line 845, in process_images res = process_images_inner(p) File "H:\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 59, in processing_process_images_hijack return getattr(processing, '__controlnet_original_process_images_inner')(p, args, kwargs) File "H:\stable-diffusion-webui\modules\processing.py", line 981, in process_images_inner samples_ddim = p.sample(conditioning=p.c, unconditional_conditioning=p.uc, seeds=p.seeds, subseeds=p.subseeds, subseed_strength=p.subseed_strength, prompts=p.prompts) File "H:\stable-diffusion-webui\modules\processing.py", line 1741, in sample samples = self.sampler.sample_img2img(self, self.init_latent, x, conditioning, unconditional_conditioning, image_conditioning=self.image_conditioning) File "H:\stable-diffusion-webui\modules\sd_samplers_kdiffusion.py", line 172, in sample_img2img samples = self.launch_sampling(t_enc + 1, lambda: self.func(self.model_wrap_cfg, xi, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs)) File "H:\stable-diffusion-webui\extensions\sd-webui-model-patcher\scripts\model_patcher_hook.py", line 94, in wrapped_sample_func patcher: ModelPatcher = self.p.get_model_patcher() File "H:\stable-diffusion-webui\extensions\sd-webui-model-patcher\scripts\model_patcher_hook.py", line 115, in get_model_patcher return self.model_patcher AttributeError: 'StableDiffusionProcessingImg2Img' object has no attribute 'model_patcher'. Did you mean: 'get_model_patcher'?


same problem here