Repository: AUTOMATIC1111/stable-diffusion-webui

Issue:
[Bug]: "Processed" has no attribute 's_min_uncond'
### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

Upon generating, python throws: `AttributeError: 'Processed' object has no attribute 's_min_uncond'`

### Steps to reproduce the problem

1. Install 'Depth Map extensions` – https://github.com/thygate/stable-diffusion-webui-depthmap-script/tree/main
2. Generate Depth Map

### What should have happened?

It should work as expected – see fix in "Additional Information".

### Commit where the problem happens

1.2.1

### What platforms do you use to access the UI ?

Windows

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
None
```


### List of extensions

'Depth Map extensions' – https://github.com/thygate/stable-diffusion-webui-depthmap-script/tree/main

### Console logs

```Shell
Traceback (most recent call last):
  File "[path]\stable-diffusion-webui-master\modules\call_queue.py", line 57, in f
    res = list(func(*args, **kwargs))
  File "[path]\stable-diffusion-webui-master\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "[path]\stable-diffusion-webui-master\modules\img2img.py", line 180, in img2img
    processed = modules.scripts.scripts_img2img.run(p, *args)
  File "[path]\stable-diffusion-webui-master\modules\scripts.py", line 408, in run
    processed = script.run(p, *script_args)
  File "[path]\stable-diffusion-webui-master\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 282, in run
    newmaps, mesh_fi, meshsimple_fi = run_depthmap(processed, p.outpath_samples, inputimages, None,
  File "[path]\stable-diffusion-webui-master\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 601, in run_depthmap
    info = create_infotext(processed, processed.all_prompts, processed.all_seeds, processed.all_subseeds, "", 0, count)
  File "[path]\stable-diffusion-webui-master\modules\processing.py", line 495, in create_infotext
    "NGMS": None if p.s_min_uncond == 0 else p.s_min_uncond,
AttributeError: 'Processed' object has no attribute 's_min_uncond'
```


### Additional information

File `modules/processing.py`:
Error at Line 917, `def save_intermediate(image, index):` is missing `self` attribute.
Adding `self` as an attribute fixes the issue – `def save_intermediate(self, image, index):`
[Bug]: "Processed" has no attribute 's_min_uncond'
### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

Upon generating, python throws: `AttributeError: 'Processed' object has no attribute 's_min_uncond'`

### Steps to reproduce the problem

1. Install 'Depth Map extensions` – https://github.com/thygate/stable-diffusion-webui-depthmap-script/tree/main
2. Generate Depth Map

### What should have happened?

It should work as expected – see fix in "Additional Information".

### Commit where the problem happens

1.2.1

### What platforms do you use to access the UI ?

Windows

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
None
```


### List of extensions

'Depth Map extensions' – https://github.com/thygate/stable-diffusion-webui-depthmap-script/tree/main

### Console logs

```Shell
Traceback (most recent call last):
  File "[path]\stable-diffusion-webui-master\modules\call_queue.py", line 57, in f
    res = list(func(*args, **kwargs))
  File "[path]\stable-diffusion-webui-master\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "[path]\stable-diffusion-webui-master\modules\img2img.py", line 180, in img2img
    processed = modules.scripts.scripts_img2img.run(p, *args)
  File "[path]\stable-diffusion-webui-master\modules\scripts.py", line 408, in run
    processed = script.run(p, *script_args)
  File "[path]\stable-diffusion-webui-master\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 282, in run
    newmaps, mesh_fi, meshsimple_fi = run_depthmap(processed, p.outpath_samples, inputimages, None,
  File "[path]\stable-diffusion-webui-master\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 601, in run_depthmap
    info = create_infotext(processed, processed.all_prompts, processed.all_seeds, processed.all_subseeds, "", 0, count)
  File "[path]\stable-diffusion-webui-master\modules\processing.py", line 495, in create_infotext
    "NGMS": None if p.s_min_uncond == 0 else p.s_min_uncond,
AttributeError: 'Processed' object has no attribute 's_min_uncond'
```


### Additional information

File `modules/processing.py`:
Error at Line 917, `def save_intermediate(image, index):` is missing `self` attribute.
Adding `self` as an attribute fixes the issue – `def save_intermediate(self, image, index):`


Discussion:
There's an issue for this at https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/204
The error originates from 'modules/processing.py', which is part of this repo though.
There's an issue for this at https://github.com/thygate/stable-diffusion-webui-depthmap-script/issues/204
The error originates from 'modules/processing.py', which is part of this repo though.

Resolving patch:
diff --git a/modules/processing.py b/modules/processing.py
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -316,6 +316,7 @@ def __init__(self, p: StableDiffusionProcessing, images_list, seed=-1, info="",
         self.s_tmin = p.s_tmin
         self.s_tmax = p.s_tmax
         self.s_noise = p.s_noise
+        self.s_min_uncond = p.s_min_uncond
         self.sampler_noise_scheduler_override = p.sampler_noise_scheduler_override
         self.prompt = self.prompt if type(self.prompt) != list else self.prompt[0]
         self.negative_prompt = self.negative_prompt if type(self.negative_prompt) != list else self.negative_prompt[0]


Test patch: