Skip to content

Make PyTorch upscaling pauseable #2705

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

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Mar 21, 2024

This adds support for pausing within a PyTorch Upscale Image node.

The implementation of pausing is quite simple. The executor runs all nodes in their own thread (well, it's a thread pool, but close enough), so I can just spin with time.sleep to allow other threads to run until the execution is resumed. This gives us pausing for minimal effort.

Edit: I forgot to mention, alongside pausing, aborting the current execution is also supported within PyTorch upscaling with this PR. So we'll hopefully need to kill the worker less frequently now.

@joeyballentine joeyballentine merged commit ac95d72 into chaiNNer-org:main Mar 22, 2024
@RunDevelopment RunDevelopment deleted the pause-upsclae branch March 22, 2024 13:12
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.

2 participants