novitalabs / javascript-sdk

JavaScript SDK for Novita AI API (Txt2Img, Img2Img, Txt2Video, Img2Video, Doodle, Remove Background, Replace Object, Reimagine, Merge Faces, ControlNet, VAE, LoRA)

Home Page:https://novita.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.txt2img is not a function

nietsmmar opened this issue · comments

I am using the example code to generate text2img. But I get .txt2img is not a function as an error.

When I print my NovitaSDK-Instance I get this:

[Info] NovitaSDK {
  cleanup: [Function (anonymous)],
  outpainting: [Function (anonymous)],
  removeBackground: [Function (anonymous)],
  replaceBackground: [Function (anonymous)],
  mixpose: [Function (anonymous)],
  doodle: [Function (anonymous)],
  lcmTxt2Img: [Function (anonymous)],
  lcmImg2Img: [Function (anonymous)],
  replaceSky: [Function (anonymous)],
  replaceObject: [Function (anonymous)],
  mergeFace: [Function (anonymous)],
  removeText: [Function (anonymous)],
  removeWatermark: [Function (anonymous)],
  restoreFace: [Function (anonymous)],
  reimagine: [Function (anonymous)],
  createTile: [Function (anonymous)],
  txt2Video: [Function (anonymous)],
  img2Video: [Function (anonymous)],
  img2VideoSync: [Function (anonymous)],
  img2VideoMotion: [Function (anonymous)],
  img2VideoMotionSync: [Function (anonymous)],
  upload: [Function (anonymous)],
  key: "key",
  BASE_URL: "https://api.novita.ai"
}

And yes, there is no txt2img. What am I doing wrong?

I can't find /v3/async/txt2img anywhere in this codebase.

I am using txt2ImgV3 today and that seems to work fine.