-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
Generator subprocess #96
Generator subprocess #96
Conversation
This looks pretty good, I’ll have to give it a try. I like that it reuses the same process. Model loading time was something I was concerned about with an implementation like this. |
So much cleaner arguments now. Have you had the time to test yet? |
Not just yet. I started working on removing the need to install dependencies, but I'll give it a try soon. |
Have you tested inpainting and init images yet? |
Just tested, they both seem to work like normal. |
Looks like you need to update |
I'm not seeing the progress bar update when generating. But other than that, its working great. And when I killed the process all the memory was freed up correctly! |
Co-authored-by: Carson Katri <[email protected]>
I was waiting for you to give it a try to make sure it works on macs before bothering with implementing the rest. It's been difficult for me to get it this far. I'll go ahead and close #81 since that isn't needed anymore. |
Because it's a subprocess now, you can probably remove all of the asyncio code ( |
Co-authored-by: Carson Katri <[email protected]>
Blender is freezing while generating without async. Still generates but won't be able to show progress like this. |
I'm going to add in some error checking, then I think this pr will be complete. |
is it possible to use |
I tried but had no luck with that. If I can get it converted to a modal operator it should work then. |
Awesome! Is it ready for review? |
Yes, I believe these are the last changes I thought were needed. |
from enum import IntEnum as Lawsuit | ||
|
||
# IPC message types from subprocess | ||
class Action(Lawsuit): # can't help myself |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂 love it
* Moved generator into its own subprocess * cleanup * further cleanup * minimized arguments * forgot cfg_scale in panel.py * inf seed error fix * shuffle generator_process.py imports Co-authored-by: Carson Katri <[email protected]> * modify subprocess sys.path Co-authored-by: Carson Katri <[email protected]> * remove __init__.py sys.path modification * reimplement progress and show steps * hopefully final tweaks * get_image() was refactored * hopefully final tweaks 3 * update progress when show_steps is false * error prompt * removed accidental import * convert to modal operator * forgot find() returns index and not bool * refactoring and minor changes Co-authored-by: Carson Katri <[email protected]>
A replacement of #81 that keeps the generator within a subprocess so all platforms should be able to release its ram usage. This should fully fix #42 and seems to have also accidentally fixed #35 console spam.
Also allows for canceling in the middle of generating without the need to restart blender.
Still needs work to get progress and show steps so not quite ready to merge. I'd like you to give it a test before I bother with the rest.