Repository: stable-diffusion-webui
Issue: [Bug]: RecursionError: maximum recursion depth exceeded while calling a Python object
Labels: bug-report

### Checklist

- [ ] The issue exists after disabling all extensions
- [ ] The issue exists on a clean installation of webui
- [x] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [x] The issue exists in the current version of the webui
- [x] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

Every time I try to generate an image, I start getting this error, this happened today after configuring a model and installing an extension, the generated image used to look blurry but the error is now solved but now I have this other error for every time I want to make an image image gives me this error RecursionError: maximum recursion depth exceeded while calling a Python object with any model I am using. Does anyone know if there is a solution?

### Steps to reproduce the problem

1. Go to txt2img
2. Choose your model
3. Generate the image

### What should have happened?

It should generated an image

### What browsers do you use to access the UI ?

Other

### Sysinfo

[sysinfo-2024-03-12-23-19.json](https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/14579795/sysinfo-2024-03-12-23-19.json)


### Console logs

```Shell
Traceback (most recent call last):
      File "/Users/omibros2002/stable-diffusion-webui/modules/call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "/Users/omibros2002/stable-diffusion-webui/modules/call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "/Users/omibros2002/stable-diffusion-webui/modules/txt2img.py", line 110, in txt2img
        processed = processing.process_images(p)
      File "/Users/omibros2002/stable-diffusion-webui/modules/processing.py", line 785, in process_images
        res = process_images_inner(p)
      File "/Users/omibros2002/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 "/Users/omibros2002/stable-diffusion-webui/modules/processing.py", line 1016, in process_images_inner
        images.save_image(image, p.outpath_samples, "", p.seeds[i], p.prompts[i], opts.samples_format, info=infotext(i), p=p)
      File "/Users/omibros2002/stable-diffusion-webui/modules/images.py", line 622, in save_image
        os.makedirs(path, exist_ok=True)
      File "/usr/local/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/os.py", line 215, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/usr/local/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/os.py", line 215, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/usr/local/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/os.py", line 215, in makedirs
        makedirs(head, exist_ok=exist_ok)
      [Previous line repeated 1482 more times]
      File "/usr/local/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/os.py", line 210, in makedirs
        head, tail = path.split(name)
      File "/usr/local/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/posixpath.py", line 105, in split
        sep = _get_sep(p)
      File "/usr/local/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/posixpath.py", line 43, in _get_sep
        if isinstance(path, bytes):
    RecursionError: maximum recursion depth exceeded while calling a Python object
```


### Additional information

_No response_