lllyasviel / lllyasviel/stable-diffusion-webui-forge

[Bug]: ControlNet Batch Folder takes the first file as input instead of all files

Open
#287 32 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
13k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### Checklist

- [X] The issue exists after disabling all extensions
- [X] 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
- [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?

ControlNet has a functionality "Batch Folder" which takes all the files from the folder and uses them as input sequentially (producing N outputs, where N equals to the number of images in the folder).
This functionality works correctly in vanilla Automatic1111, however in Forge it takes only the first file as an input and produces only 1 output.

### Steps to reproduce the problem

1. Enable ControlNet and switch to "Batch Folder".
2. Use the path with multiple images (for example multiple depth masks).
3. Generate the output

### What should have happened?

Forge had to generate output for each image in the Batch Folder and not for the first image only.

### What browsers do you use to access the UI ?

Mozilla Firefox

### Sysinfo

[sysinfo-2024-02-17-01-58.json](https://github.com/lllyasviel/stable-diffusion-webui-forge/files/14317340/sysinfo-2024-02-17-01-58.json)

### Console logs

```Shell
Starting job task(xthkxas0ldvaznl)
Token merging is under construction now and the setting will not take effect.
2024-02-17 01:49:33,953 - ControlNet - INFO - ControlNet Input Mode: InputMode.BATCH
2024-02-17 01:49:33,953 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/front.png
2024-02-17 01:49:33,959 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/front_downwards.png
2024-02-17 01:49:33,965 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/front_upwards.png
2024-02-17 01:49:33,970 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/left_1.png
2024-02-17 01:49:33,975 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/left_2.png
2024-02-17 01:49:33,980 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/left_downwards_1.png
2024-02-17 01:49:33,985 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/left_downwards_2.png
2024-02-17 01:49:33,990 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/left_upwards_1.png
2024-02-17 01:49:33,997 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/left_upwards_2.png
2024-02-17 01:49:34,002 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/right_1.png
2024-02-17 01:49:34,007 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/right_2.png
2024-02-17 01:49:34,012 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/right_downwards_1.png
2024-02-17 01:49:34,018 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/right_downwards_2.png
2024-02-17 01:49:34,023 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/right_upwards_1.png
2024-02-17 01:49:34,028 - ControlNet - INFO - Try to read image: /srv/shared/AI/AUTOMATIC1111/stable-diffusion-webui/models/POSES/DEPTH/characterHeadConceptPoses_v10/head_poses/single_depth_black/right_upwards_2.png
0%| | 0/15 [00:00

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with ControlNet in Batch Folder mode using several images, then trace the batch input handling from the ControlNet request path. Use the console output to confirm that all files are detected but only one is consumed; done means one generated output is produced for each input image.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.