Option to add ControlNet image file name to prompt when batch processing? #1314
Replies: 3 comments 3 replies
-
Is this possible? It's been three weeks and I've gotten no response. I think this is a really good idea. |
Beta Was this translation helpful? Give feedback.
-
I think this would be a great addition too. I am convinced I am missing something because it feels so obvious that this information would be available somewhere that I haven't raised a feature request issue yet but perhaps it really just doesn't exist at the moment? |
Beta Was this translation helpful? Give feedback.
-
I think the issue described here can be achieved using the API. You can have a custom script sending requests to WebUI with your desired ControlNet input and prompt. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to add the text of file names from the Input Directory of a batch to the respective prompts for each image? I think such an option would would be especially helpful with the reference-only preprocessor.
I am trying to generate hundreds of images that will subsequently be used as a dataset for a style. I want to experiment with mixing various styles in order to do this. The reference-only preprocessor makes this task easier.
For example, I have three pictures that I want to batch process in ControlNet. One is a photo of a car, another of a truck, and another of a bus. The files are named, 01_car.png, 02_truck.png, and 03_bus.png. For each image that I generate, I want to combine three art styles. I can specify "[art by van gogh|art by rembrandt|art by alphonse mucha]" in the prompt but the reference-only preprocessor requires something in the prompt that describes each respective image. Otherwise it makes some sort of random guess as if I had left the prompt field blank. When the ControlNet reference-only preprocessor uses the 01_car.png file in the batch, I need to explicitly state in the prompt that it is a "car".
What I need to have it do is generate three images. Each image should be generated with these three prompts and ControlNet conditions:
I attempted to use the Prompts From File script and the Dynamics Prompts extension to accomplish this task. I even tried implementing Jinja2 templates. But in each of those cases it applied all the permutations specified on each individual image of the batch before moving on to the next. That's not what I want. I want the ControlNet batch process to perform as I described above.
I suggest a solution to this. Add the words in each file name in the batch (excluding numbers and symbols) to the respective prompts of each batch image. Perhaps a checkbox near the top of the tab that is labeled "Add Filename to Prompt". Or a drop-down menu that has options to add the filename words to the beginning or end of the prompt.
One of the primary concerns for training a unique art style for stable diffusion is curating a vast dataset of images that have examples of various things that are rendered in that desired style. For a few weeks I have been attempting to randomly generate images by specifying a subject in a prompt along with an experimental mixture of styles and then choose the best ones to use in a dataset. This is difficult because of the limited range of various art styles. Prompting "space shuttle, art by van gogh" may or may not have desirable results because there are no artworks by Vincent van Gogh that depict spacecraft. With ControlNet, and especially with the help of the reference-only preprocessor, it's now much easier to imbue any image with a specific style.
I believe the reference-only preprocessor is the key to generating wide-ranging datasets for style training. But the batch process for reference-only needs some way of specifying the subject of each image.
Or is there another way to do what I'm trying to do? I searched for similar discussions and didn't find anything related to my idea. Please forgive me if I am in error.
Beta Was this translation helpful? Give feedback.
All reactions