Api Text-to-Image
GuoFeng3api  Text-to-ImageHow to set optional parameters?
2023-06-12T19:24:52Z
hi@blansjNot possible to change params via WidgetUI, however you you can explore the API Inference with rate limit via simple requests, or using orPython clientorJavasScript client, here is an example with JS,(async () => {
  const PROMPT =
    "best quality masterpiece highres 1girl china dress Beautiful face";
  const NEGATIVE_PROMPT =
    "NSFW, lowres,bad anatomy,bad hands, text, error, missing fingers,extra digit, fewer digits, cropped, worstquality, low quality, normal quality,jpegartifacts,signature, watermark, username,blurry,bad feet";
  const HF_TOKEN = ""; //with TOKEN you have more images
  const HFInference = (
    await import("https://cdn.jsdelivr.net/npm/@huggingface/inference/+esm")
  ).HfInference;
  const hf = new HFInference(HF_TOKEN);
  await hf
    .textToImage({
      inputs: PROMPT,
      parameters: {
        negative_prompt: NEGATIVE_PROMPT,
        width: 768,
        height: 768
      },
      model: "xiaolxl/GuoFeng3"
    })
    .then((blob) => {
      window.open(URL.createObjectURL(blob), "_blank");
    });
})()