runwayml/hosted-models

Inactive hosted model can't be woken up, 404s my request

CharlieHess opened this issue · 3 comments

This is similar to #3 but I see that one was closed because the user had a $0 balance. In my case I only have a single hosted model, in the unsubscribed mode. It set itself to inactive, and hovering over the status says:

image

Leading me to believe instantiating the model and calling waitUntilAwake would kick it into gear. However, any attempt to instantiate the model fails with:

Unhandled error during request: Error: Model not found. Make sure the url is correct and that the model is "active".
  at new NotFoundError (/vercel/workpath0/node_modules/@runwayml/hosted-models/build/HTTPErrors.js:38:23)
  at HostedModel.<anonymous> (/vercel/workpath0/node_modules/@runwayml/hosted-models/build/HostedModel.js:230:39)

So, how can I programmatically wake a model up???

Hi Charlie,

The solution here is to set your hosted model state to "active". Hosted model endpoints that are inactive are effectively disabled. Because free user accounts can only have one active hosted model at a time, we provide the ability to deactivate hosted models without deleting them, in case you want to use them again at a later date.

"Active" models should be able to be queried at any time, even if they are asleep. The first request to an active model that's asleep should wake it up.

@brannondorsey I keep toggling my model to active, and it keeps toggling itself back to inactive after some period of time. This causes my first build of the day to fail, and then the subsequent one will succeed as the model is woken up. Can I toggle it programmatically? Why does it toggle itself off?

Summarizing my findings here for future searchers:

  1. Once your free plan hosted model hits a certain number of requests, it'll be auto-deactivated after each request
  2. It doesn't appear there is a way to reactivate it programmatically, and this behavior is not yet documented (😔)
  3. Upgrading your plan and putting a card on file will cause your hosted model to stay in the active state