CompVis / stable-diffusion

A latent text-to-image diffusion model
https://ommer-lab.com/research/latent-diffusion-models/
Other
68.55k stars 10.18k forks source link

Free Stable Diffusion API? #795

Open incomingflyingbrick opened 1 year ago

incomingflyingbrick commented 1 year ago

I fount a free stable diffusion api from this site https://www.wizmodel.com/docs/sdApi is this the official API?

wang-xiaowu commented 1 year ago

execuse me,i got the result of the interface /sdapi/v1/txt2img,but how can i use it image

incomingflyingbrick commented 1 year ago

Hi Xiaowu, You can use the code below to show the image. The image from SD is base64 encoded, so you have to decode it to bytes before you can use it or save it or show it. Let me know if you still have question

import requests
import json
from PIL import Image
from io import BytesIO
import base64

url = "https://api.wizmodel.com/sdapi/v1/txt2img"

payload = json.dumps({
  "prompt": "puppy dog running on grass",
  "steps": 50
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer <YOUR_API_KEY>'
}

response = requests.request("POST", url, headers=headers, data=payload)

# Example base64 string (replace with your own)
base64_string = response.json()['images'][0]

# Decode the base64 string into bytes
image_data = base64.b64decode(base64_string)
image_bytes = BytesIO(image_data)

# Open and display the image using Pillow
image = Image.open(image_bytes)
image.show()

# Save the image to a local file
image.save("output_image.jpg")
incomingflyingbrick commented 1 year ago

I just reply to your question, please check it out on github.

On Wed, Sep 13, 2023 at 5:48 PM xiaowu @.***> wrote:

execuse me,i got the result of the interface /sdapi/v1/txt2img,but how can i use it [image: image] https://user-images.githubusercontent.com/44340137/267610766-c641ecdf-5ce7-49d6-8561-d0c996137b78.png

— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/795#issuecomment-1717306191, or unsubscribe https://github.com/notifications/unsubscribe-auth/AELYV6QEOHP3KLLAKDVMQOLX2F6OVANCNFSM6AAAAAA4OMCG3M . You are receiving this because you authored the thread.Message ID: @.***>

wang-xiaowu commented 1 year ago

thx i will check it out later

richiy commented 1 year ago

Hi Xiaowu, You can use the code below to show the image. The image from SD is base64 encoded, so you have to decode it to bytes before you can use it or save it or show it. Let me know if you still have question

import requests
import json
from PIL import Image
from io import BytesIO
import base64

url = "https://api.wizmodel.com/sdapi/v1/txt2img"

payload = json.dumps({
  "prompt": "puppy dog running on grass",
  "steps": 50
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer <YOUR_API_KEY>'
}

response = requests.request("POST", url, headers=headers, data=payload)

# Example base64 string (replace with your own)
base64_string = response.json()['images'][0]

# Decode the base64 string into bytes
image_data = base64.b64decode(base64_string)
image_bytes = BytesIO(image_data)

# Open and display the image using Pillow
image = Image.open(image_bytes)
image.show()

# Save the image to a local file
image.save("output_image.jpg")

hi, i try this, and the response.status_code is 502. Is something wrong?

incomingflyingbrick commented 1 year ago

Hi Xiaowu, You can use the code below to show the image. The image from SD is base64 encoded, so you have to decode it to bytes before you can use it or save it or show it. Let me know if you still have question

import requests
import json
from PIL import Image
from io import BytesIO
import base64

url = "https://api.wizmodel.com/sdapi/v1/txt2img"

payload = json.dumps({
  "prompt": "puppy dog running on grass",
  "steps": 50
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer <YOUR_API_KEY>'
}

response = requests.request("POST", url, headers=headers, data=payload)

# Example base64 string (replace with your own)
base64_string = response.json()['images'][0]

# Decode the base64 string into bytes
image_data = base64.b64decode(base64_string)
image_bytes = BytesIO(image_data)

# Open and display the image using Pillow
image = Image.open(image_bytes)
image.show()

# Save the image to a local file
image.save("output_image.jpg")

hi, i try this, and the response.status_code is 502. Is something wrong?

Hi , Could you post the error message and response here?

richiy commented 1 year ago

Hi Xiaowu, You can use the code below to show the image. The image from SD is base64 encoded, so you have to decode it to bytes before you can use it or save it or show it. Let me know if you still have question

import requests
import json
from PIL import Image
from io import BytesIO
import base64

url = "https://api.wizmodel.com/sdapi/v1/txt2img"

payload = json.dumps({
  "prompt": "puppy dog running on grass",
  "steps": 50
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer <YOUR_API_KEY>'
}

response = requests.request("POST", url, headers=headers, data=payload)

# Example base64 string (replace with your own)
base64_string = response.json()['images'][0]

# Decode the base64 string into bytes
image_data = base64.b64decode(base64_string)
image_bytes = BytesIO(image_data)

# Open and display the image using Pillow
image = Image.open(image_bytes)
image.show()

# Save the image to a local file
image.save("output_image.jpg")

hi, i try this, and the response.status_code is 502. Is something wrong?

Hi , Could you post the error message and response here?

It works now. It may be a problem with my proxy settings. Thx.

incomingflyingbrick commented 1 year ago

Great, good to know

On Sat, Sep 30, 2023 at 10:02 AM richiy @.***> wrote:

Hi Xiaowu, You can use the code below to show the image. The image from SD is base64 encoded, so you have to decode it to bytes before you can use it or save it or show it. Let me know if you still have question

import requestsimport jsonfrom PIL import Imagefrom io import BytesIOimport base64 url = "https://api.wizmodel.com/sdapi/v1/txt2img" payload = json.dumps({ "prompt": "puppy dog running on grass", "steps": 50 })headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' } response = requests.request("POST", url, headers=headers, data=payload)

Example base64 string (replace with your own)base64_string = response.json()['images'][0]

Decode the base64 string into bytesimage_data = base64.b64decode(base64_string)image_bytes = BytesIO(image_data)

Open and display the image using Pillowimage = Image.open(image_bytes)image.show()

Save the image to a local fileimage.save("output_image.jpg")

hi, i try this, and the response.status_code is 502. Is something wrong?

Hi , Could you post the error message and response here?

It works now. It may be a problem with my proxy settings. Thx.

— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/795#issuecomment-1741628734, or unsubscribe https://github.com/notifications/unsubscribe-auth/AELYV6SJQOWL2HNZ5EJI44LX454R3ANCNFSM6AAAAAA4OMCG3M . You are receiving this because you modified the open/close state.Message ID: @.***>

richiy commented 1 year ago

Hi Xiaowu, You can use the code below to show the image. The image from SD is base64 encoded, so you have to decode it to bytes before you can use it or save it or show it. Let me know if you still have question

import requests
import json
from PIL import Image
from io import BytesIO
import base64

url = "https://api.wizmodel.com/sdapi/v1/txt2img"

payload = json.dumps({
  "prompt": "puppy dog running on grass",
  "steps": 50
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer <YOUR_API_KEY>'
}

response = requests.request("POST", url, headers=headers, data=payload)

# Example base64 string (replace with your own)
base64_string = response.json()['images'][0]

# Decode the base64 string into bytes
image_data = base64.b64decode(base64_string)
image_bytes = BytesIO(image_data)

# Open and display the image using Pillow
image = Image.open(image_bytes)
image.show()

# Save the image to a local file
image.save("output_image.jpg")

hi, i try this, and the response.status_code is 502. Is something wrong?

Hi , Could you post the error message and response here?

It works now. It may be a problem with my proxy settings. Thx.

It not work again. Got error message: requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

incomingflyingbrick commented 1 year ago

Hi, Richiy, could you try again? It's working now. The server was done this morning. sorry about that.

On Sun, Oct 8, 2023 at 10:00 PM richiy @.***> wrote:

Hi Xiaowu, You can use the code below to show the image. The image from SD is base64 encoded, so you have to decode it to bytes before you can use it or save it or show it. Let me know if you still have question

import requestsimport jsonfrom PIL import Imagefrom io import BytesIOimport base64 url = "https://api.wizmodel.com/sdapi/v1/txt2img" payload = json.dumps({ "prompt": "puppy dog running on grass", "steps": 50 })headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' } response = requests.request("POST", url, headers=headers, data=payload)

Example base64 string (replace with your own)base64_string = response.json()['images'][0]

Decode the base64 string into bytesimage_data = base64.b64decode(base64_string)image_bytes = BytesIO(image_data)

Open and display the image using Pillowimage = Image.open(image_bytes)image.show()

Save the image to a local fileimage.save("output_image.jpg")

hi, i try this, and the response.status_code is 502. Is something wrong?

Hi , Could you post the error message and response here?

It works now. It may be a problem with my proxy settings. Thx.

It not work again. Got error message: requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/795#issuecomment-1752035536, or unsubscribe https://github.com/notifications/unsubscribe-auth/AELYV6QYGDIMETFRHSKQBS3X6KWWRAVCNFSM6AAAAAA4OMCG3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGAZTKNJTGY . You are receiving this because you modified the open/close state.Message ID: @.***>

richiy commented 1 year ago

Hi, Richiy, could you try again? It's working now. The server was done this morning. sorry about that. On Sun, Oct 8, 2023 at 10:00 PM richiy @.> wrote: Hi Xiaowu, You can use the code below to show the image. The image from SD is base64 encoded, so you have to decode it to bytes before you can use it or save it or show it. Let me know if you still have question import requestsimport jsonfrom PIL import Imagefrom io import BytesIOimport base64 url = "https://api.wizmodel.com/sdapi/v1/txt2img" payload = json.dumps({ "prompt": "puppy dog running on grass", "steps": 50 })headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' } response = requests.request("POST", url, headers=headers, data=payload) # Example base64 string (replace with your own)base64_string = response.json()['images'][0] # Decode the base64 string into bytesimage_data = base64.b64decode(base64_string)image_bytes = BytesIO(image_data) # Open and display the image using Pillowimage = Image.open(image_bytes)image.show() # Save the image to a local fileimage.save("output_image.jpg") hi, i try this, and the response.status_code is 502. Is something wrong? Hi , Could you post the error message and response here? It works now. It may be a problem with my proxy settings. Thx. It not work again. Got error message: requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) — Reply to this email directly, view it on GitHub <#795 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AELYV6QYGDIMETFRHSKQBS3X6KWWRAVCNFSM6AAAAAA4OMCG3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGAZTKNJTGY . You are receiving this because you modified the open/close state.Message ID: @.>

It's working now. Thx!

ainsteen01 commented 1 year ago

{ "error": "OutOfMemoryError", "detail": "", "body": "", "errors": "CUDA out of memory. Tried to allocate 2.00 MiB (GPU 0; 22.19 GiB total capacity; 21.24 GiB already allocated; 1.50 MiB free; 21.79 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF" }

incomingflyingbrick commented 1 year ago

Fixed!

On Mon, Oct 23, 2023 at 4:43 PM Ainsteen Varghese @.***> wrote:

{ "error": "OutOfMemoryError", "detail": "", "body": "", "errors": "CUDA out of memory. Tried to allocate 2.00 MiB (GPU 0; 22.19 GiB total capacity; 21.24 GiB already allocated; 1.50 MiB free; 21.79 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF" }

— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/795#issuecomment-1774706929, or unsubscribe https://github.com/notifications/unsubscribe-auth/AELYV6RPHJ6M56ICJSOKJRTYAYU35AVCNFSM6AAAAAA4OMCG3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZUG4YDMOJSHE . You are receiving this because you modified the open/close state.Message ID: @.***>

ainsteen01 commented 1 year ago

Thanks now its working

LeognidusW commented 1 year ago

Hello! I'm a bit of a newbie, so I don't understand all the nuances. The Python code is working, but the C# code I need is not cooperating. I tried to make everything without asynchronous processing, as it was written in the documentation, could you help me figure it out? using System; using System.IO; using System.Net; using System.Text;

class Program { static void Main() { string url = "https://api.wizmodel.com/sdapi/v1/txt2img";

    // Подготовка данных для POST-запроса
    string postData = "{\"prompt\":\"puppy dog running on grass\",\"steps\":50}";
    byte[] data = Encoding.UTF8.GetBytes(postData);

    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
    request.Method = "POST";
    request.ContentType = "application/json";
    request.Headers.Add("Authorization", "Bearer <MyApi c> >");

    using (Stream requestStream = request.GetRequestStream())
    {
        requestStream.Write(data, 0, data.Length);
    }

    using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
    using (Stream dataStream = response.GetResponseStream())
    using (StreamReader reader = new StreamReader(dataStream))
    {
        string responseText = reader.ReadToEnd();
        Console.WriteLine(responseText);
    }
}

} Of course, I enter my API key, but I keep getting this message. {"code":403,"msg":"Access denied: API-Key invalid","data":{}}

incomingflyingbrick commented 1 year ago

Hello Leognidus you can try the following C# code. It might work.

using System; using System.Net.Http; using System.Text; // for Encoding.UTF8 using System.Threading.Tasks; // for async Task using Newtonsoft.Json.Linq; // for JObject. Make sure to install the Newtonsoft.Json package.

class Program { private static readonly string ApiKey = ""; private const string Url = "https://api.wizmodel.com/sdapi/v1/txt2img";

static async Task Main()
{
    using var client = new HttpClient();

    // Prepare headers
    client.DefaultRequestHeaders.Add("Authorization", "Bearer " +

ApiKey); client.DefaultRequestHeaders.Add("Content-Type", "application/json");

    // Create payload
    var payload = new JObject
    {
        ["prompt"] = "puppy dog running on grass",
        ["steps"] = 100
    };

    var response = await client.PostAsync(Url, new

StringContent(payload.ToString(), Encoding.UTF8, "application/json"));

    if (response.IsSuccessStatusCode)
    {
        var jsonResponse = await response.Content.ReadAsStringAsync();
        Console.WriteLine(jsonResponse);
    }
    else
    {
        Console.WriteLine($"Error: {response.StatusCode}");
    }
}

}

On Thu, Oct 26, 2023 at 12:54 AM LeognidusW @.***> wrote:

Hello! I'm a bit of a newbie, so I don't understand all the nuances. The Python code is working, but the C# code I need is not cooperating. I tried to make everything without asynchronous processing, as it was written in the documentation, could you help me figure it out? using System; using System.IO; using System.Net; using System.Text;

class Program { static void Main() { string url = "https://api.wizmodel.com/sdapi/v1/txt2img";

// Подготовка данных для POST-запроса
string postData = "{\"prompt\":\"puppy dog running on grass\",\"steps\":50}";
byte[] data = Encoding.UTF8.GetBytes(postData);

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "Bearer <MyApi c> >");

using (Stream requestStream = request.GetRequestStream())
{
    requestStream.Write(data, 0, data.Length);
}

using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
using (Stream dataStream = response.GetResponseStream())
using (StreamReader reader = new StreamReader(dataStream))
{
    string responseText = reader.ReadToEnd();
    Console.WriteLine(responseText);
}

}

} Of course, I enter my API key, but I keep getting this message. {"code":403,"msg":"Access denied: API-Key invalid","data":{}}

— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/795#issuecomment-1779683736, or unsubscribe https://github.com/notifications/unsubscribe-auth/AELYV6SF5BKP75JKEGVPI3TYBE74DAVCNFSM6AAAAAA4OMCG3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZZGY4DGNZTGY . You are receiving this because you modified the open/close state.Message ID: @.***>

SANTINO27 commented 1 year ago

Hey bro , how are you? This api works good? Are the images good? Can I run it on swift UI? this is gold

incomingflyingbrick commented 1 year ago

Hi SANTINO27, The API is working as expected. The image is good or not depends on what prompt you entered, the more detailed prompt the better. Yes, it doesn't work on Swift UI as long as you can send a simple HTTP POST request to the API :)

On Fri, Oct 27, 2023 at 12:21 PM SANTINO27 @.***> wrote:

Hey bro , how are you? This api works good? Are the images good? Can I run it on swift UI? this is gold

— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/795#issuecomment-1782267926, or unsubscribe https://github.com/notifications/unsubscribe-auth/AELYV6UCUHMOMP3Z56J663TYBMZEFAVCNFSM6AAAAAA4OMCG3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGI3DOOJSGY . You are receiving this because you modified the open/close state.Message ID: @.***>

kshabanaa commented 1 year ago

If you use jupyter you can do

`import base64 from IPython import display

js = response.json() base64_string = js['images'][0] image_data = base64.b64decode(base64_string)

display.display(display.Image(data=image_data))`

TommyDong1998 commented 1 year ago

I noticed the api is giving the same image every time. Is there a seed option for this api?

incomingflyingbrick commented 1 year ago

"I noticed the api is giving the same image every time. Is there a seed option for this api?" We will try to add that

On Sat, Nov 18, 2023 at 8:37 PM Tommy Dong @.***> wrote:

I noticed the api is giving the same image every time. Is there a seed option for this api?

— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/795#issuecomment-1817497752, or unsubscribe https://github.com/notifications/unsubscribe-auth/AELYV6XT3GBQAJKPGDZBRALYFCTXBAVCNFSM6AAAAAA4OMCG3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGQ4TONZVGI . You are receiving this because you modified the open/close state.Message ID: @.***>

ainsteen01 commented 1 year ago

The api is giving same image for the same text

incomingflyingbrick commented 1 year ago

The api is giving same image for the same text

I added a seed, it should now output random picture everytime.

incomingflyingbrick commented 1 year ago

I noticed the api is giving the same image every time. Is there a seed option for this api?

I added a seed, it should now output random picture everytime for you.

incomingflyingbrick commented 1 year ago

Good day! Denoising_strength stopped working in the img2img Wizmodel API. Now the API responds with some random images. Is there any way to make it work again?

I will take a look today

incomingflyingbrick commented 1 year ago

Good day! Denoising_strength stopped working in the img2img Wizmodel API. Now the API responds with some random images. Is there any way to make it work again?

Hi Metim0l, I just tried the "denoising strength" parameter, it is working fine. Did you change your code recently? or You could upload your code here to see if there is anything wrong with it.

incomingflyingbrick commented 1 year ago

Good day! Denoising_strength stopped working in the img2img Wizmodel API. Now the API responds with some random images. Is there any way to make it work again?

Btw this parameter's value is between 0 and 1 inclusive.

incomingflyingbrick commented 1 year ago

Good day! Denoising_strength stopped working in the img2img Wizmodel API. Now the API responds with some random images. Is there any way to make it work again?

Hi Metim0l, May I know what application you are building so that you need to the "denoising strength" parameter, thz.

valentin19 commented 1 year ago

Hi @incomingflyingbrick Have you changed the txt2img model recently? I have the impression that the images have lost quality..

incomingflyingbrick commented 1 year ago

Hi @valentin19 I noticed that. The refiner is not working properly. I am working on it right now , tring to fix it ASAP. Thank you.

incomingflyingbrick commented 1 year ago

Hello @incomingflyingbrick

Does the img2img model still work? Because I get an internal server error.

Hi Metim0l, the img2img api is down due to high demand right now. I am trying to bring it back up, it should be back up in 1 or 2 days. Thanks.

santiagomirantes commented 1 year ago

I cannot fetch via JS by CORS policy, can you fix that by allowing requests from other domains?

santiagomirantes commented 1 year ago

Solved that by using a proxy, but I would really appreciate to not have to use it. Thanks!

incomingflyingbrick commented 1 year ago

Solved that by using a proxy, but I would really appreciate to not have to use it. Thanks!

Hi it's solved, it should be working now with out a proxy.

incomingflyingbrick commented 12 months ago

Screenshot_20231130-093057.png

The API stopped working completely 😢

HI Meti0l, I just added a new API for the img2img gen. You can use the following api to generate an image, it's using StableDiffusion-2. This API is using a preemptive GPU, so the first time you call this API there could be a wait time for requesting a GPU plus model loading time( like 15 minutes). When the model is loaded the second inference should be very fast (like 10-20 seconds).

import requests
import json

url = "https://api.wizmodel.com/v1/predictions"

payload = json.dumps({
  "input": {
    "prompt": "Astronaut in a jungle, cold color palette, muted colors, detailed",
    "denoising_strength": 0.8,
    "guidance_scale": 10,
    "init_image": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/img2img-init.png"
  },
  "version": "fbe05661e1ab10b6e4c13908a3e55381e950b2904582cd55240b7733d59b14e6"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer <YOUR_API_KEY_HERE>'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
santiagomirantes commented 11 months ago

Solved that by using a proxy, but I would really appreciate to not have to use it. Thanks!

Hi it's solved, it should be working now with out a proxy.

thanks!

Mamin8002 commented 11 months ago

Hi, can you tell me. For some reason, my response to the request looks like this {'images': ['eyJlcnJvciI6Ik1vZGVsIHN0YWJpbGl0eWFpL3N0YWJsZS1kaWZmdXNpb24tMi0xIGlzIGN1cnJlbnRseSBsb2FkaW5nIiwiZXN0aW1hdGVkX3RpbWUiOjcyNi43Njk0NzAyMTQ4NDM4fQ==']} why is it too short

incomingflyingbrick commented 11 months ago

Hi, can you tell me. For some reason, my response to the request looks like this {'images': ['eyJlcnJvciI6Ik1vZGVsIHN0YWJpbGl0eWFpL3N0YWJsZS1kaWZmdXNpb24tMi0xIGlzIGN1cnJlbnRseSBsb2FkaW5nIiwiZXN0aW1hdGVkX3RpbWUiOjcyNi43Njk0NzAyMTQ4NDM4fQ==']} why is it too short

Hi, Mamin8002, this is because the model is loading. That's why it's so short. It would take about 10 mins to load the model if the model is in sleep mode. The reason it's sleeping is because we are trying to save GPU resource when the demand is not that high, so it would automatically put the model to sleep. The model will awaken if someone send a http request to the model for inference, note it would take about 10 mins to awaken the model.

Mazeniify commented 11 months ago

@incomingflyingbrick What do you think is the best way to avoid getting these short base64 strings? I use this API in a loop (python) and I use sleep for around 2 minutes between each call, if I used sleep for 10 minutes before beginning the loop itself would it fix the problem?

incomingflyingbrick commented 11 months ago

First solution is Checking the length of a base64 would work, cause base64 str are usually very long. The second solution is I will return a error msg instead of return a base64 string. I will be working on the second solution in a few days.

incomingflyingbrick commented 11 months ago

@MazenMamdouh371 sleeping for 10mins before the call would work.

unblock7 commented 10 months ago

Hi, can i adjust resolution?

Feyeepop commented 10 months ago

Tried this api several times hopefully, and checking everything entered. The only response recieved is on the screen attached. Sorry. 2024-01-10_175935

incomingflyingbrick commented 10 months ago

Tried this api several times hopefully, and checking everything entered. The only response recieved is on the screen attached. Sorry. 2024-01-10_175935

@Feyeepop You are puting header in the wrong place, delete the header and put the header in the Authorization tab, see picture below

Screenshot 2024-01-11 at 10 07 17
incomingflyingbrick commented 10 months ago

Hi, can i adjust resolution?

@unblock7 I will try to make this work. give me a few days

Feyeepop commented 10 months ago

2024-01-12_142315 2024-01-12_141618 Thanks for the attention. A few more tries.

incomingflyingbrick commented 10 months ago

296255840-d59f753d-f6f8-444d-83c1-7ec213b6515f Hi you should remove the header (line 7-10), then it should work @Feyeepop

Feyeepop commented 10 months ago

2024-01-14_133031 Thanks for the attention. The time passed, everything checked.

incomingflyingbrick commented 10 months ago

@Feyeepop replace url with this https://api.wizmodel.com/v1/predictions

katywilliams1121 commented 7 months ago

where to get available models