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

[Feature]: Reject requests based on sampling steps #84

Open
1 task done
axemaster opened this issue Mar 15, 2023 · 5 comments
Open
1 task done

[Feature]: Reject requests based on sampling steps #84

axemaster opened this issue Mar 15, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@axemaster
Copy link

Is there existing issue for this?

  • I didn't find similar issue, also checked the latest commit.

Feature Description

I know what my system is capable of delivering on time. And when a request at my max reasonable resolution comes in with 100+ sampling steps there's no way it's going to get done in the ~3 minute limit enforced by the horde. So the resulting images get rejected with

"Failed to submit job with status code400: Processing Generation with ID some-guid took too long to process"

There's no point in processing these requests.

The desired feature is to set a max step count in the extension settings.

Proposed Solution

The desired feature is to set a max step count in the extension settings.

Requests popped over that limit get rejected or simply discarded if there is no rejection support in the API.

Alternatively, such requests would simply have the step count reduced to the set limit.

Additional Information

No response

@axemaster axemaster added the enhancement New feature or request label Mar 15, 2023
@MaikoTan
Copy link
Member

MaikoTan commented Mar 15, 2023

This sounds good.
Also we could now report faulted to Stable Horde when we found a job that is not able to be processed on our side. So this is not difficult to implement.

But I think would it be better to implement this on Stable Horde side?


cc @db0

@db0
Copy link

db0 commented Mar 15, 2023

The idea is that your system should NOT be picking up jobs it cannot implement in a reasonable amount of time. If this is happening, then your GPU is too slow to use on the AI Horde and you should reduce your max_power accordingly.

As steps scales lineary, if you're running out of time at 100 steps, it also means you're comparatively very slow at 30 steps as well.

For systems which are too slow, there's two options.

  1. Reduce the max_power as higher resolutions take exponentially longer
  2. If even at 8 max_power your system is getting timed out regularly, then your GPU is too slow, but you can use it to perform image interrogations instead which require far less power.

@axemaster
Copy link
Author

  • Reduce the max_power as higher resolutions take exponentially longer
  • If even at 8 max_power your system is getting timed out regularly, then your GPU is too slow, but you can use it to perform image interrogations instead which require far less power.

Is Max Power the same as Max Pixels in the extension UI?

I don't see an option to do (only) interrogations. These are the choices of what to allow in the extension UI. Apparently txt2img is always enabled and interrogations is not even a choice.

  • Allow img2img
  • Allow Painting
  • Allow Unsafe IP Address
  • Allow Post Processing
  • Allow NSFW

You can see which features are supported in the README of this repo. Interrogate is not one of them.

@axemaster
Copy link
Author

2. perform image interrogations instead which require far less power

Current horde status

There are 0 queued interrogation requests with 6 interrogation workers

This is some barren ground. No need to reduce the throughput of the horde when the popular queues are not getting dry.

@db0
Copy link

db0 commented Mar 16, 2023

I understand that interrogation is not in this repo, but it's anyway an option through our own AI Horde worker repo.

We plan to make interrogation much more valuable soon as well so it's use should start picking up.

Anyway I pushed a change now that can allow people to avoid slow workers if they need to, but the case remains that if you're consistently getting your requests timed out, you're too slow for your max resolution

Is Max Power the same as Max Pixels in the extension UI?

I don't know for sure but it sounds like it. The max_power is using the formula of 64x64x8*max_power. It's what we use in the AI Horde Worker to allow people to specify the max power without doing complex calculations in their head. In any case, max_power 8 corresponds to 512*512 pixels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants