Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include_init_images missing from StableDiffusionProcessingImg2Img #4989

Closed
wants to merge 1 commit into from

Conversation

moonshinegloss
Copy link

The missing include_init_images causes painthua to crash; I could not find a reason this would have been removed on purpose, especially with tests still supplying that value:

"include_init_images": False

This PR adds it back with a default False as seen here:

[{"key": "sampler_index", "type": str, "default": "Euler"}, {"key": "init_images", "type": list, "default": None}, {"key": "denoising_strength", "type": float, "default": 0.75}, {"key": "mask", "type": str, "default": None}, {"key": "include_init_images", "type": bool, "default": False, "exclude" : True}]

@georgzoeller
Copy link

Does processing.py:739 need to be patched as well to pass through the arg?

@AUTOMATIC1111
Copy link
Owner

git history shows this was never added to img2img processing class in the first place and i'm sure it's not supposed to go there in the first place. In fact, tests still complete properly with both "include_init_images": True and "include_init_images": False.

@georgzoeller
Copy link

georgzoeller commented Nov 27, 2022

git history shows this was never added to img2img processing class in the first place and i'm sure it's not supposed to go there in the first place. In fact, tests still complete properly with both "include_init_images": True and "include_init_images": False.

This is interesting, I have a crash on image2image that necessitates adding include_init_images: bool=False to the arglist in line 737 of processing.py to fix
image

This is coming through the img2img api in api.py

I'm on origin master
image

@georgzoeller
Copy link

If I try adding this change manually, I get this error on startup:

Embeddings: ERROR: [Errno 10048] error while attempting to bind on address ('0.0.0.0', 16996): only one usage of each socket address (protocol/network address/port) is normally permitted

I'm using these args:

Launching Web UI with arguments: --listen --port 16996 --api --cors-allow-origins=https://www.painthua.com

The error is only seen after making the changes in this commit.

That would be you running another instance of webui while the old one is still running and blocking the port ;)

@GalaxyTimeMachine
Copy link

GalaxyTimeMachine commented Nov 28, 2022 via email

@BlinkDL
Copy link

BlinkDL commented Nov 28, 2022

git history shows this was never added to img2img processing class in the first place and i'm sure it's not supposed to go there in the first place. In fact, tests still complete properly with both "include_init_images": True and "include_init_images": False.

This happens when the user is using some extensions such as sd-dynamic-prompts.

And I confirmed that this pull can fix it.

@GalaxyTimeMachine
Copy link

I can confirm that manually making this change in the file resolves the problem.

@mike-hearn
Copy link

This happens when the user is using some extensions such as sd-dynamic-prompts.

I'm also hitting this error when using the API and having sd-dynamic-prompts installed.

@ghost
Copy link

ghost commented Dec 1, 2022

Getting the error that this would fix (painthua) when trying to add to an image created.
generating in painthua works fine unless there is overlap with another image if there is over lap then i get the crash that includes: TypeError: StableDiffusionProcessing.__init__() got an unexpected keyword argument 'include_init_images'

Given the frequency of automatic1111 updates (in this ever changing world of ai stuff thats to be expected and not moaning about it) I am reluctant to edit files. Can this fix not be brought into the main branch? does it negatively affect anything?

@BlinkDL
Copy link

BlinkDL commented Dec 2, 2022

git history shows this was never added to img2img processing class in the first place and i'm sure it's not supposed to go there in the first place. In fact, tests still complete properly with both "include_init_images": True and "include_init_images": False.

This happens only when the user is using sd-dynamic-prompts .

Please run img2img_test.py with sd-dynamic-prompts installed and you might see the same error.

@ghost
Copy link

ghost commented Dec 2, 2022

just to confirm the fix works

so here is me doing a video for the painthua developer to show the issue clearer than i could in text https://www.youtube.com/watch?v=_IrQ0eygfiw

during the video he pinged me some possible solutions to fix it...which i tried to no avail.

he then asked me to try the fix here...I was reluctant to edit my files as i know how swift the development moves...but was willing to do it as a test...

https://www.youtube.com/watch?v=siRaWaHvDoE

as you can see its a success.

Is there a reason the two line hasnt been merged? it seems a simple solution but i am gessing there is a reason?

AUTOMATIC1111 added a commit that referenced this pull request Dec 3, 2022
@Sirfrummel
Copy link

This fix worked for me. I just edited my file by hand -- I'll deal with a merge conflict later while updating lol

@AUTOMATIC1111
Copy link
Owner

with the b2f17dd commit the problem should be gone.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants