hako-mikan / sd-webui-cd-tuner

Color/Detail control for Stable Diffusion web-ui
GNU Affero General Public License v3.0
191 stars 8 forks source link

Apply only after Adetailer #13

Closed marcusbob93 closed 3 months ago

marcusbob93 commented 8 months ago

Does anyone know how to do the generation process like this:

Image generation > afert detailer > cdtuner

Because now what happens is this:

Image generation > cdtuner > afert detailer > cdtuner on Afterdetailer

So if for example I decide to decrease the brightness by 5, the image will be darker and there will be a box around the face that is even darker because Cdtuner will be applied twice. If someone can fix this stuff, it would be really nice

hako-mikan commented 8 months ago

You can do that using prompt for Adetailer. Adetailer has prompt for adetailer. So you can input settings of CD Tuner only prompt for Adetailer.

marcusbob93 commented 8 months ago

No, what you say cannot be done, because, as I already said, CDTuner must stop before adetailer. What should happen is:

The image is generated, CDTuner intervenes and, for example, decreases the brightness. After that, ADetailer should intervene and make the impaint on the already darkened face, adapting. At this point CDTuner should stop, but instead it performs another pass on the newly generated face. As you can see from the screenshot, the face is incredibly darker than the rest and you can see the outline of the ADetailer mask. The prompts inserted are simple and precise, I don't think they can be inserted in other ways, or at least I think so. Exampl

hako-mikan commented 8 months ago

That would be the case in that method. What I want to say is that CD Tuner can be instructed to execute from the prompt as well. At that time, all sliders of the CD Tuner are set to zero, and instructions are given in the prompt input field, similar to LoRA. If there is no instruction for CD Tuner execution in the prompt field, CD Tuner will not be executed. Therefore, if you write instructions for CD Tuner execution in either the normal prompt or the Adetailer prompt, CD Tuner should be executed on one of them.

marcusbob93 commented 8 months ago

Nope, I entered in the main prompt "<cdt:0;0;0;0;-10> " to try, in the Adetailer prompt I entered a different prompt (I also tried to enter <cdt:0;0;0;0;0>) and in the CDTuner settings I left everything at 0, but in any case it continues to apply to Adetailer too, I'm sorry but I think they are not compatible, or maybe I'm doing something wrong.

hako-mikan commented 8 months ago

When I tried using Adetailer with the feature to modify faces enabled, I generated an image by only inserting<cdt:0;0;0;0;-10>in the prompt of Adetailer. As a result, only the facial area of the image turned dark. This indicates that the CD Tuner is operating only when Adetailer is functioning. When I added <cdt:0;0;0;0;-10> to both prompts, the entire image became darker, and additionally, the facial area became even darker.

hako-mikan commented 3 months ago

Added option "Apply once". Checking this option, you can prevent applying CD tuner in Adetailer. The CD Tuner is an extension that acts during generation, so it's not practical to apply it after generation. From my testing, it seems there are no issues even if I stop applying it before Adetailer starts. This is likely because Adetailer processes through i2i.