lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
7.93k stars 767 forks source link

ControlNet Batch does not work[Bug]: #208

Open NovaSabre opened 8 months ago

NovaSabre commented 8 months ago

Checklist

What happened?

The batch feature in ControlNet does not work. It only takes the first image in the folder and does not move on to the other files.

Steps to reproduce the problem

Go to controlnet, open the batch tab, paste the Input Directory that has multiple files in it.

What should have happened?

In Automatic1111 you could let it run and it would automatically generate an new image based on each file in the batch folder.

What browsers do you use to access the UI ?

Mozilla Firefox

Sysinfo

sysinfo-2024-02-12-10-28.json

Console logs

2024-02-12 12:34:34,543 - ControlNet - INFO - ControlNet Input Mode: InputMode.BATCH████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:13<00:00,  1.64it/s]
2024-02-12 12:34:34,544 - ControlNet - INFO - Try to read image: E:\New folder\1 (1).png
2024-02-12 12:34:34,583 - ControlNet - INFO - Try to read image: E:\New folder\1 (2).png
2024-02-12 12:34:34,619 - ControlNet - INFO - Try to read image: E:\New folder\1 (3).png
2024-02-12 12:34:34,660 - ControlNet - INFO - Try to read image: E:\New folder\1 (4).png
2024-02-12 12:34:34,700 - ControlNet - INFO - Try to read image: E:\New folder\1 (5).png
2024-02-12 12:34:34,739 - ControlNet - INFO - Try to read image: E:\New folder\1 (6).png
2024-02-12 12:34:34,790 - ControlNet - INFO - Try to read image: E:\New folder\1 (7).png
2024-02-12 12:34:34,828 - ControlNet - INFO - Try to read image: E:\New folder\1 (8).png
2024-02-12 12:34:34,865 - ControlNet - INFO - Try to read image: E:\New folder\1 (9).png
2024-02-12 12:34:34,904 - ControlNet - INFO - Try to read image: E:\New folder\1 (10).png
2024-02-12 12:34:34,954 - ControlNet - INFO - Try to read image: E:\New folder\1 (11).png
2024-02-12 12:34:34,992 - ControlNet - INFO - Try to read image: E:\New folder\1 (12).png
2024-02-12 12:34:35,029 - ControlNet - INFO - Try to read image: E:\New folder\1 (13).png
  0%|                                                                                                                                                                                                                | 0/13 [00:00<?, ?it/s]2024-02-12 12:34:35,067 - ControlNet - INFO - Using preprocessor: CLIP-ViT-H (IPAdapter)
2024-02-12 12:34:35,068 - ControlNet - INFO - preprocessor resolution = 0.5
2024-02-12 12:34:35,086 - ControlNet - INFO - Batch wise input only support controlnet, control-lora, and t2i adapters!
  0%|                                                                                                                                                                                                                | 0/13 [00:00<?, ?it/s]
2024-02-12 12:34:35,087 - ControlNet - INFO - Current ControlNet IPAdapterPatcher: E:\Forge\stable-diffusion-webui-forge\models\ControlNet\ip-adapter_sd15.pth
INFO: the IPAdapter reference image is not a square, CLIPImageProcessor will resize and crop it at the center. If the main focus of the picture is not in the middle the result might not be what you are expecting.
To load target model CLIPVisionModelWithProjection
Begin to load 1 model
Moving model(s) has taken 0.38 seconds
2024-02-12 12:34:35,827 - ControlNet - INFO - ControlNet Method CLIP-ViT-H (IPAdapter) patched.
To load target model BaseModel
Begin to load 1 model
Moving model(s) has taken 1.02 seconds
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:12<00:00,  1.66it/s]
To load target model AutoencoderKL██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:11<00:00,  1.65it/s]
Begin to load 1 model
Moving model(s) has taken 0.84 seconds
Total progress: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:13<00:00,  1.53it/s]
Total progress: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:13<00:00,  1.65it/s]

Additional information

This is in the logs : ControlNet - INFO - Batch wise input only support controlnet, control-lora, and t2i adapters!

But it works 100% in Automatic1111 so this can't be the case.

jepjoo commented 8 months ago

If, I'm understanding correctly, it looks like that functionality is removed:

"You now need to enable multiple IP-Adapter units to achieve effect of previous multi-inputs"

https://github.com/lllyasviel/stable-diffusion-webui-forge/discussions/40

lllyasviel commented 8 months ago

Yes they are removed to make room for animatediff. We need to make a decision between animatediff's batch and the old batch. And the animatediff is more important, because the old batch can be reproduced by simply with multiple units

NovaSabre commented 8 months ago

maybe I'm missing something, in Automatic1111 on the exact same location with the exact same text you can paste an directory link so that it runs all the files one after another. Instead of sitting in font of the computer doing one by one for a 100 images you put the files in a folder and let it run them all automatically.

I'm not talking about combining them.

In my use case I want a bunch of different style images to be run one after another with Ip-adapter. I can do this with Automatic1111 but I would like to also be able to do it with Forge due to the less vram memory requirements.

NovaSabre commented 8 months ago

Forge

Automatic1111

huchenlei commented 8 months ago

If, I'm understanding correctly, it looks like that functionality is removed:

"You now need to enable multiple IP-Adapter units to achieve effect of previous multi-inputs"

40

The multiple-inputs tab is removed. The batch tab is not removed.

jepjoo commented 8 months ago

The multiple-inputs tab is removed. The batch tab is not removed.

Hmm... not sure I follow. Batch tab is not removed, correct, but it isn't really working as only one image will have an effect even if a batch of two is entered. I thought that is what the post I referenced was trying to say(?)

srandovnidobrodruzstvi commented 8 months ago

It's a very useful feature that unfortunately doesn't work. Thanks to the super optimization of vram in hires.fix, which one must instantly fall in love with, the txt2img batch "multiple inputs->multiple outputs" is super necessary. It works with one image in a folder, but with multiple, it only produces preprocessors from all of them but the final image from only one.

Nucleareal commented 8 months ago

I'm using ControlNet Tile with batch and also still problem. Automatic1111 and Forge are so different in it (The difference in production is not small enough to be called slight). The problem is that I can't just use Automatic1111 because Forge sometimes gives better results.

sandner-art commented 8 months ago

I can confirm this with Instant ID. Batch takes only the first image and ignores the rest. This is a pretty serious bug for batch workflow, both Batch folder and Batch upload are not working.

StellarBeing25 commented 8 months ago

FaceID portrait IP-Adapter requires 5 input face images to create better likeness which will now become so tedious to use without multi-input, please consider adding it back.

StellarBeing25 commented 8 months ago

Just found FaceID portrait is not even working with 5 control units and generating artifacts.

sdcarterchen commented 7 months ago

I can confirm this with Instant ID. Batch takes only the first image and ignores the rest. This is a pretty serious bug for batch workflow, both Batch folder and Batch upload are not working.

The same

Lalimec commented 7 months ago

Any development on this, i ve seen a pr but seems like its not merged.

Wildboy85 commented 7 months ago

not working for me either, using forge integrated controlnet

Wildboy85 commented 7 months ago

controlnet.py, line 348 found something: Batch wise input only support controlnet, control-lora, and t2i adapters! tried removing the requirement of 1 image only, not working