You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let ip = await rl.question('what is the IP:PORT of you SD instance (default:127.0.0.1:7860): ')
const api = await SD_API('http://'+ip, {
dev:isDebug
})
if (isDebug) {
console.log(`\nconst api = await SD_API('http://${ip}')\n\nyou are running with --inspect, connect a debugger and check out: \n\n > api.search('endpoint query')\n > api.describe(endpoint)\n > endpoint.rawJSON\n`)
Object.assign(global, {api, SD_API, fs})
process.stdin.resume()
}
while (!isDebug) {
let prompt = await rl.question('what would you like to generate (default: waifu): ') || 'waifu'
let response = await api['/sdapi/v1/txt2img'].POST({prompt, steps: 20})