File size: 738 Bytes
6b9a7d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fetch(
  "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-2",
  {
    method: "POST",
    headers: {
      "content-type": "application/json",
    },
    body: JSON.stringify({
      inputs:
        "award winning high resolution photo of a giant tortoise/((ladybird)) hybrid, [trending on artstation]",
      negative_prompt: "malformed",deformed, bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, disgusting, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blurry.
    }),
  }
)
  .then((res) => res.blob())
  .then((blob) => {
    const tab = window.open((target = "_blank"));
    tab.location.href = window.URL.createObjectURL(blob);
  });