nousr / koi

A plug-in for Krita that enables the use of AI models for img2img generation.
MIT License
445 stars 36 forks source link

How do I set my ngrok authtoken? #7

Open jameshfisher opened 2 years ago

jameshfisher commented 2 years ago

I ran all of the notebook in colab, but requests fail with responses like:

$ curl -X POST http://2e04-34-90-174-157.ngrok.io/api/img2img
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1201  100  1201    0     0   2327      0 --:--:-- --:--:-- --:--:--  2332<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="author" content="ngrok">
    <meta name="description" content="ngrok is the fastest way to put anything on the internet with a single command.">
    <meta name="robots" content="noindex, nofollow">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link id="style" rel="stylesheet" href="https://cdn.ngrok.com/static/css/error.css">
    <noscript>Before you can serve HTML content, you must sign up for an ngrok account and install your authtoken. (ERR_NGROK_6022)</noscript>
    <script id="script" src="https://cdn.ngrok.com/static/js/error.js" type="text/javascript"></script>
  </head>
  ...
</html>

I've signed up for an ngrok account and got an authtoken, but how do I set it in this environment?

jameshfisher commented 2 years ago

The notebook runs pip install ngrok - is that https://pypi.org/project/ngrok/?

Is it supposed to be https://pypi.org/project/pyngrok/ ?

jameshfisher commented 2 years ago

Okay, I got it running by:

  1. Changing pip install ngrok to pip install pyngrok
  2. Running !ngrok authtoken <myauthtokenhere> immediately after
nousr commented 2 years ago

have you confirmed wether this is still necessary inside of colab? or is this an issue for non-colab notebooks?

jameshfisher commented 2 years ago

@nousr I'm fairly sure this is an issue in Colab. Ngrok requires an authtoken, and fails if you don't set it, so when the user is setting up a new Colab instance, they somehow need to set their ngrok authtoken.

@guumaster it sounds like you also experienced this? Could you confirm?

guumaster commented 2 years ago

Exactly, just followed this instructions. Maybe it should be added to README/notebook guide.