AbdullahAlfaraj / Auto-Photoshop-StableDiffusion-Plugin

A user-friendly plug-in that makes it easy to generate stable diffusion images inside Photoshop using either Automatic or ComfyUI as a backend.
MIT License
6.7k stars 510 forks source link

sd-forge-controlnet support? #466

Open ktee95 opened 6 months ago

ktee95 commented 6 months ago

Please support SD-Forge built-in ControlNET , it's a simple version of Controlnet work with Stable Diffusion Forge. https://github.com/lllyasviel/stable-diffusion-webui-forge/tree/main/extensions-builtin/sd_forge_controlnet

Stone-dielianhua commented 6 months ago

strongly agree

ktee95 commented 6 months ago

where is dev man?

GeminiSquishGames commented 6 months ago

I also agree. It's kind of essential for me since it's the only way I can reliably use XL models in photoshop and have access to controlnet, otherwise I have to use Comfy and Krita.

lilngu commented 6 months ago

I also agree. It's kind of essential for me since it's the only way I can reliably use XL models in photoshop and have access to controlnet, otherwise I have to use Comfy and Krita.

Forge version is best optimized ever

v4806 commented 6 months ago

非常同意!

bluelovers commented 5 months ago

https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/684

Absinthze commented 4 months ago

This is a much needed feature for me as well.

an303042 commented 3 months ago

+1

yesitsno0ne commented 3 months ago

+1

Absinthze commented 3 months ago

It looks as if the developer has been offline from Github since December 2023. Is it possible someone could pick this up as a Fork and continue the work?

GeminiSquishGames commented 3 months ago

It looks as if the developer has been offline from Github since December 2023. Is it possible someone could pick this up as a Fork and continue the work?

Pretty sure that's what #478 is attempting, up above a few posts. Edit: You can get the repo like normal and it shouldn't get over written unless the extension detects a need to update. But the only change doesn't seem to do anything to help the issue at this time. I thought that it would need a path to where the control net files were but that didn't do anything. I also tried the setting to let other scripts take control of controlnet but that didn't help either.

Also, this functionality we require probably needs the dev2 branch of Forge, not the main. https://github.com/lllyasviel/stable-diffusion-webui-forge/pull/692 is the request to add better ControlNet support with API.

I had to change the line 6 of clip.py to "import packaging" to make it run of the dev2 repo version. It won't find pkg_resources as a module for whatever reason. Python dependencies and packaging is sometimes confusing when relying on other peoples code and pip to do things for you.

Edit: This seems to be an error with Stability Matrix, which I use to manage versions, that was fixed yesterday.

zombieyang commented 3 months ago

Hi, I'm one of the contributor of this repository before. And I started another project to provide a more lightweight tool to connect PS and SD/SD Forge/Comfy:

https://github.com/zombieyang/sd-ppp

ktee95 commented 3 months ago

Hi, I'm one of the contributor of this repository before. And I started another project to provide a more lightweight tool to connect PS and SD/SD Forge/Comfy:

https://github.com/zombieyang/sd-ppp

Your plugin is very promising. What I think users want most right now is a plugin that is fully compatible with the final version of SD webui (A1111, SD Next) and ControlNet, for both text2img and img2img. That's it! Good work bro!

ktee95 commented 3 months ago

It looks as if the developer has been offline from Github since December 2023. Is it possible someone could pick this up as a Fork and continue the work?

Pretty sure that's what #478 is attempting, up above a few posts. However, the original extension is written to replace the code with Abdullah's original repo upon loading the extention. So it'll just overwrite if you manually add bluelovers changes, since no one is there to approve the merge, it won't be officially added unless whoever has access to Abdullah's repo can merge it.

Also, this functionality we require probably needs the dev2 branch of Forge, not the main. lllyasviel/stable-diffusion-webui-forge#692 is the request to add better ControlNet support with API.

I had to change the line 6 of clip.py to "import packaging" to make it run of the dev2 repo version. It won't find pkg_resources as a module for whatever reason. Python dependencies and packaging is sometimes confusing when relying on other peoples code and pip to do things for you.

Edit: This seems to be an error with Stability Matrix, which I use to manage versions, that was fixed yesterday.

As you stated, to make this plugin compatible with SD Forge, we have to manually modify the extension files locally? Let me know if you have done it successfully? Does it work? Looking forward to your respones.

Absinthze commented 3 months ago

I wish I could help guys, I'm just a user not a coder. I wish you great success and thank you for your efforts!

GeminiSquishGames commented 3 months ago

It looks as if the developer has been offline from Github since December 2023. Is it possible someone could pick this up as a Fork and continue the work?

Pretty sure that's what #478 is attempting, up above a few posts. However, the original extension is written to replace the code with Abdullah's original repo upon loading the extention. So it'll just overwrite if you manually add bluelovers changes, since no one is there to approve the merge, it won't be officially added unless whoever has access to Abdullah's repo can merge it. Also, this functionality we require probably needs the dev2 branch of Forge, not the main. lllyasviel/stable-diffusion-webui-forge#692 is the request to add better ControlNet support with API. I had to change the line 6 of clip.py to "import packaging" to make it run of the dev2 repo version. It won't find pkg_resources as a module for whatever reason. Python dependencies and packaging is sometimes confusing when relying on other peoples code and pip to do things for you. Edit: This seems to be an error with Stability Matrix, which I use to manage versions, that was fixed yesterday.

As you stated, to make this plugin compatible with SD Forge, we have to manually modify the extension files locally? Let me know if you have done it successfully? Does it work? Looking forward to your respones.

I looked into what bluelovers change and it looks for a JSON file for the setting in one line. I'm not sure if that is all that is needed to make it work with dev2 branch of forge. I haven't had time to look into preventing the original extension from auto updating when web-ui starts, should just be in the initialization of the extension, but I'll try that after I look into @zombieyang 's contributions a bit. It might be good to have a more modern solution if we can't get the extension and .ccx plugin source needed to improve for future technology. I will let you know what I come up with.

GeminiSquishGames commented 3 months ago

Hi, I'm one of the contributor of this repository before. And I started another project to provide a more lightweight tool to connect PS and SD/SD Forge/Comfy:

https://github.com/zombieyang/sd-ppp

When using it with Forge, I can't get any results. It finds the layers but doesn't do anything when I try getting or sending. I'm getting the following error when performing get:

ERROR:asyncio:Task exception was never retrieved future: <Task finished name='Task-1669' coro=<AsyncServer._handle_event_internal() done, defined at D:\Graphics\stability matrix\Data\Packages\Stable Diffusion WebUI Forge\venv\lib\site-packages\socketio\async_server.py:608> exception=Exception('sdppp PS side error:HTTP 422')> Traceback (most recent call last): File "D:\Graphics\stability matrix\Data\Packages\Stable Diffusion WebUI Forge\venv\lib\site-packages\socketio\async_server.py", line 610, in _handle_event_internal r = await server._trigger_event(data[0], namespace, sid, *data[1:]) File "D:\Graphics\stability matrix\Data\Packages\Stable Diffusion WebUI Forge\venv\lib\site-packages\socketio\async_server.py", line 637, in _trigger_event ret = await handler(*args) File "D:\Graphics\stability matrix\Data\Packages\Stable Diffusion WebUI Forge\extensions\sd-ppp\sdppp_python\apis.py", line 80, in c_get_image upload_name, opacity = await photoshopInstance.get_image(layer_id=id, bounds_id=bounds_id) File "D:\Graphics\stability matrix\Data\Packages\Stable Diffusion WebUI Forge\extensions\sd-ppp\sdppp_python\photoshop_instance.py", line 59, in get_image raise Exception('sdppp PS side error:' + result['error']) Exception: sdppp PS side error:HTTP 422

Send creates a new layer but doesn't actually push the image to it, it doesn't seem to make an error.