Acly / krita-ai-diffusion

Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required.
https://www.interstice.cloud
GNU General Public License v3.0
6.98k stars 344 forks source link

Get same result if using same option #1368

Closed oimoyu closed 2 weeks ago

oimoyu commented 2 weeks ago

1.27.1

I am using workflow node to generate. If I generate with same parameter, the result is consist(very fast, may use cache), but if I change one of them, then the result is new. And if I use batch option in this addon, the result is all consist same. Also I have uncheck the fix seed option of this addon in krita.

Some kind same as this #1292

image

nabileisa commented 2 weeks ago

You need to connect the seed output from the Krita Canvas node to the seed input in your KSampler image You see the problem is unlike when you are interacting with ComfyUI directly where the seed can randomize after each generation, The seed stored in your workflow does not randomize on generation and the workflow will always execute with the same seed stored in it, and since no other parameter has changed, it will return the same image, to get around that you need to insert the krita plugin seed in your ksampler and let the krita plugin randomize or make the seed fixed for you. this way you will get a new image every time as long as you set the seed to randomize in krita. Hope this helps.

oimoyu commented 2 weeks ago

You see the problem is unlike when you are interacting with ComfyUI directly where the seed can randomize after each generation, The seed stored in your workflow does not randomize on generation and the workflow will always execute with the same seed stored in it, and since no other parameter has changed, it will return the same image, to get around that you need to insert the krita plugin seed in your ksampler and let the krita plugin randomize or make the seed fixed for you.

did not realize this, works now, thanks for that.

nabileisa commented 2 weeks ago

Glad I could help, I ran into the same problem some time ago and took me a while to figure it out.