Public
Script
February 6, 2024
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import fal from "npm:@fal-ai/serverless-client";
export let creativeUpscaler = async (
prompt: string,
image_url: string,
creativity: number = 0.5,
detail: number = 1,
shape_preservation: number = 1.5,
negative_prompt: string =
"blurry, low resolution, bad, ugly, low quality, pixelated, interpolated, compression artifacts, noisey, grainy",
seed: number = 42,
guidance_scale: number = 7.5,
num_inference_steps: number = 20,
enable_safety_checks: boolean = true,
): Promise<{ image: { url: string } }> => {
return await fal.subscribe("fal-ai/creative-upscaler", {
input: {
prompt: prompt,
image_url: image_url,
creativity: creativity,
detail: detail,
shape_preservation: shape_preservation,
negative_prompt: negative_prompt,
seed: seed,
guidance_scale: guidance_scale,
num_inference_steps: num_inference_steps,
enable_safety_checks: enable_safety_checks,
},
});
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
February 6, 2024