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]: Dev Branch 'KDiffusionSampler' object has no attribute 'trajectory_enable' #15588

Closed
6 tasks
OliviaOliveiira opened this issue Apr 21, 2024 · 4 comments
Closed
6 tasks
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@OliviaOliveiira
Copy link

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

Latest dev commit broke the generation process completely.
image

Steps to reproduce the problem

  1. Get latest dev commit and click generate on any dpm

What should have happened?

Generate an image

What browsers do you use to access the UI ?

No response

Sysinfo

...

Console logs

From https://github.com/AUTOMATIC1111/stable-diffusion-webui
 * branch              dev        -> FETCH_HEAD
Already up to date.
venv "venv\Scripts\Python.exe"
fatal: No names found, cannot describe anything.
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Version: 1.9.0
Commit hash: e6a8d0b4e65b365a684bd7539cf5b2cd16f9c44c
current transparent-background 1.2.9
Launching Web UI with arguments: --xformers
*** Error loading script: My sciprt.py
    Traceback (most recent call last):
      File "C:\STAbledsai\stable-diffusion-portable-main\modules\scripts.py", line 508, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\STAbledsai\stable-diffusion-portable-main\modules\script_loading.py", line 16, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\STAbledsai\stable-diffusion-portable-main\scripts\My sciprt.py", line 2, in <module>
        from glitch_this import ImageGlitcher
    ModuleNotFoundError: No module named 'glitch_this'

---
Civitai Helper: Root Path is: C:\STAbledsai\stable-diffusion-portable-main
Civitai Helper: Get Custom Model Folder
C:\STAbledsai\stable-diffusion-portable-main\extensions\Text\scripts\test.py:63: GradioDeprecationWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components
  image_input = gr.inputs.Image(label="Image", shape=None)
C:\STAbledsai\stable-diffusion-portable-main\modules\gradio_extensons.py:25: GradioDeprecationWarning: `optional` parameter is deprecated, and it has no effect
  res = original_IOComponent_init(self, *args, **kwargs)
C:\STAbledsai\stable-diffusion-portable-main\extensions\Text\scripts\test.py:64: GradioDeprecationWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components
  text_input = gr.inputs.Textbox(default="Your text here", label="Text")
C:\STAbledsai\stable-diffusion-portable-main\modules\gradio_extensons.py:25: GradioDeprecationWarning: `numeric` parameter is deprecated, and it has no effect
  res = original_IOComponent_init(self, *args, **kwargs)
C:\STAbledsai\stable-diffusion-portable-main\extensions\Text\scripts\test.py:66: GradioDeprecationWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components
  font_size_input = gr.inputs.Slider(minimum=1, maximum=300, default=50, label="Font Size")
C:\STAbledsai\stable-diffusion-portable-main\extensions\Text\scripts\test.py:67: GradioDeprecationWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components
  x_position_input = gr.inputs.Slider(minimum=0, maximum=1, default=0, label="X Position")
C:\STAbledsai\stable-diffusion-portable-main\extensions\Text\scripts\test.py:68: GradioDeprecationWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components
  y_position_input = gr.inputs.Slider(minimum=0, maximum=1, default=0, label="Y Position")
C:\STAbledsai\stable-diffusion-portable-main\extensions\Text\scripts\test.py:69: GradioDeprecationWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components
  magic_input = gr.inputs.Checkbox(default=False, label="Make Magic")
C:\STAbledsai\stable-diffusion-portable-main\extensions\Text\scripts\test.py:70: GradioDeprecationWarning: Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components
  output_image = gr.outputs.Image(type="numpy", label="Output Image")
C:\STAbledsai\stable-diffusion-portable-main\extensions\Text\scripts\test.py:71: GradioDeprecationWarning: Usage of gradio.outputs is deprecated, and will not be supported in the future, please import your components from gradio.components
  output_coordinates = gr.outputs.Textbox(label="Actual Coordinates")
[-] ADetailer initialized. version: 24.4.1, num models: 10
ControlNet preprocessor location: C:\STAbledsai\stable-diffusion-portable-main\extensions\sd-webui-controlnet\annotator\downloads
2024-04-21 21:14:21,557 - ControlNet - INFO - ControlNet v1.1.443
2024-04-21 21:14:21,710 - ControlNet - INFO - ControlNet v1.1.443
Loading weights [0ea2ac3ab6] from C:\STAbledsai\stable-diffusion-portable-main\models\Stable-diffusion\Huita.safetensors
*** Error # failed to initialize Script <module 'scripts.resharpen' from 'C:\\STAbledsai\\stable-diffusion-portable-main\\extensions\\sd-webui-resharpen\\scripts\\resharpen.py'>:
    Traceback (most recent call last):
      File "C:\STAbledsai\stable-diffusion-portable-main\modules\scripts.py", line 582, in initialize_scripts
        script = script_data.script_class()
      File "C:\STAbledsai\stable-diffusion-portable-main\extensions\sd-webui-resharpen\scripts\resharpen.py", line 32, in __init__
        xyz_support(self.XYZ_CACHE)
      File "C:\STAbledsai\stable-diffusion-portable-main\extensions\sd-webui-resharpen\scripts\res_xyz.py", line 19, in xyz_support
        xyz_grid = grid_reference()
      File "C:\STAbledsai\stable-diffusion-portable-main\extensions\sd-webui-resharpen\scripts\res_xyz.py", line 9, in grid_reference
        raise SystemError("Could not find X/Y/Z Plot...")
    SystemError: Could not find X/Y/Z Plot...

---
*** Error # failed to initialize Script <module 'scripts.resharpen' from 'C:\\STAbledsai\\stable-diffusion-portable-main\\extensions\\sd-webui-resharpen\\scripts\\resharpen.py'>:
    Traceback (most recent call last):
      File "C:\STAbledsai\stable-diffusion-portable-main\modules\scripts.py", line 582, in initialize_scripts
        script = script_data.script_class()
      File "C:\STAbledsai\stable-diffusion-portable-main\extensions\sd-webui-resharpen\scripts\resharpen.py", line 32, in __init__
        xyz_support(self.XYZ_CACHE)
      File "C:\STAbledsai\stable-diffusion-portable-main\extensions\sd-webui-resharpen\scripts\res_xyz.py", line 19, in xyz_support
        xyz_grid = grid_reference()
      File "C:\STAbledsai\stable-diffusion-portable-main\extensions\sd-webui-resharpen\scripts\res_xyz.py", line 9, in grid_reference
        raise SystemError("Could not find X/Y/Z Plot...")
    SystemError: Could not find X/Y/Z Plot...

---
2024-04-21 21:14:22,266 - ControlNet - INFO - ControlNet UI callback registered.
Civitai Helper: Settings:
Civitai Helper: max_size_preview: True
Civitai Helper: skip_nsfw_preview: False
Civitai Helper: open_url_with_js: True
Civitai Helper: proxy:
Civitai Helper: use civitai api key: False
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Creating model from config: C:\STAbledsai\stable-diffusion-portable-main\repositories\generative-models\configs\inference\sd_xl_base.yaml
IIB Database file has been successfully backed up to the backup folder.
Startup time: 16.1s (prepare environment: 5.4s, import torch: 3.5s, import gradio: 1.1s, setup paths: 0.8s, initialize shared: 0.2s, other imports: 0.4s, load scripts: 3.6s, create ui: 0.6s, gradio launch: 0.4s).
Applying attention optimization: xformers... done.
Model loaded in 6.6s (load weights from disk: 1.0s, create model: 1.6s, apply weights to model: 3.5s, calculate empty prompt: 0.2s).
  0%|                                                                                           | 0/20 [00:00<?, ?it/s]
*** Error completing request
*** Arguments: ('task(3p5livjc9t9ex85)', <gradio.routes.Request object at 0x00000199026B7BE0>, '', '', ['- Basic Negative'], 1, 1, 7, 640, 640, False, 0.36, 2, '4x_NMKD-Siax_200k', 8, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 20, 'DPM++ 2M', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, False, False, False, 'None', 0, '', 'None', False, False, 0, 0, '', False, False, {'ad_model': 'face_yolov8s.pt', 'ad_model_classes': '', '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.28, '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_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': ()}, UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=False, hr_option='Both', save_detected_map=True, advanced_weighting=None, ipadapter_input=None), UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=False, hr_option='Both', save_detected_map=True, advanced_weighting=None, ipadapter_input=None), UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', inpaint_crop_input_image=False, hr_option='Both', save_detected_map=True, advanced_weighting=None, ipadapter_input=None), False, True, 3, 4, 0.15, 0.3, 'bicubic', 0.5, 2, True, False, True, False, 1, False, False, 'positive', 'comma', 0, False, False, 'start', '', 7, '', [], 0, '', [], 0, '', [], False, False, False, False, False, False, False, 0, False, None, None, False, None, None, False, None, None, False, 50, False, 1) {}
    Traceback (most recent call last):
      File "C:\STAbledsai\stable-diffusion-portable-main\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "C:\STAbledsai\stable-diffusion-portable-main\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "C:\STAbledsai\stable-diffusion-portable-main\modules\txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "C:\STAbledsai\stable-diffusion-portable-main\modules\processing.py", line 845, in process_images
        res = process_images_inner(p)
      File "C:\STAbledsai\stable-diffusion-portable-main\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 "C:\STAbledsai\stable-diffusion-portable-main\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 "C:\STAbledsai\stable-diffusion-portable-main\modules\processing.py", line 1328, in sample
        samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
      File "C:\STAbledsai\stable-diffusion-portable-main\modules\sd_samplers_kdiffusion.py", line 218, in sample
        samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
      File "C:\STAbledsai\stable-diffusion-portable-main\modules\sd_samplers_common.py", line 272, in launch_sampling
        return func()
      File "C:\STAbledsai\stable-diffusion-portable-main\modules\sd_samplers_kdiffusion.py", line 218, in <lambda>
        samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
      File "C:\STAbledsai\stable-diffusion-portable-main\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
        return func(*args, **kwargs)
      File "C:\STAbledsai\stable-diffusion-portable-main\repositories\k-diffusion\k_diffusion\sampling.py", line 596, in sample_dpmpp_2m
        callback({'x': x, 'i': i, 'sigma': sigmas[i], 'sigma_hat': sigmas[i], 'denoised': denoised})
      File "C:\STAbledsai\stable-diffusion-portable-main\extensions\sd-webui-resharpen\scripts\resharpen.py", line 13, in hijack_callback
        if not self.trajectory_enable:
    AttributeError: 'KDiffusionSampler' object has no attribute 'trajectory_enable'

Additional information

No response

@OliviaOliveiira OliviaOliveiira added the bug-report Report of a bug, yet to be confirmed label Apr 21, 2024
@OliviaOliveiira OliviaOliveiira changed the title [Bug]: 'KDiffusionSampler' object has no attribute 'trajectory_enable' [Bug]: Dev Branch 'KDiffusionSampler' object has no attribute 'trajectory_enable' Apr 21, 2024
@w-e-w
Copy link
Collaborator

w-e-w commented Apr 22, 2024

I made a fix PR the the extention

for now disable the extention until it's fixed

@w-e-w
Copy link
Collaborator

w-e-w commented Apr 22, 2024

fix was merged, update sd-webui-resharpen

@w-e-w w-e-w closed this as completed Apr 22, 2024
@ixsanet
Copy link

ixsanet commented Jun 24, 2024

I finaly fix it by
deleting "sd-webui-resharpen" folder
..\stable-diffusion-webui\extensions(sd-webui-resharpen) << delete this

@hoodady
Copy link

hoodady commented Jul 4, 2024

thank you man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

4 participants