Back to packages list

Vals using @fal-ai/serverless-client

Description from the NPM package:
Deprecation note: this library has been deprecated in favor of @fal-ai/client
turbo1912 avatar
turbo1912
fal_sdxl
Script
fal/sdxl This val is an example usage sdxl with fal.ai's javascript client. https://www.fal.ai/models/stable-diffusion-xl The client offers a way for you to subscribe to queue updates. This is useful if you want to get notified when a function is done running, or if you want to get the logs as they are being generated. import fal from "npm:@fal-ai/serverless-client"; const result = await fal.subscribe(FUNCTION_ID, { input: { seed: 176400, }, pollInterval: 5000, logs: true, onQueueUpdate: (update) => { console.log(update.status); if (update.status === "IN_PROGRESS") { update.logs.map((log) => log.message).forEach(console.log); } }, }); console.log(result.url); The onQueueUpdate callback will be called every time the queue status changes. The update object contains the queue status data as documented on the status types section .
0
2
Next