const output = await replicate.run(
"underthestar2021/test:12c5a78a10253c14a6834596472602b11054e0a6c81aefe6305a508736e27698",
{
input: {
prompt: "a photo of an astronaut riding a horse on mars",
clip_skip: 2,
pipe_type: "txt2img",
scheduler: "DPM++ SDE Karras",
lora_model: "empty",
num_outputs: 1,
resize_mode: "fill",
target_width: 512,
target_height: 700,
callback_steps: 4,
guidance_scale: 7.5,
prompt_strength: 0.7,
show_system_info: false,
swap_face_enable: true,
controlnet_enable: true,
face_editor_enable: false,
canny_low_threshold: 100,
codeformer_fidelity: 0.7,
num_inference_steps: 26,
restore_face_enable: true,
canny_high_threshold: 200,
control_guidance_end: 1,
firebase_api_version: 4,
restore_face_upscale: 1,
cross_attention_scale: 0.8,
face_editor_mask_blur: 12,
face_editor_mask_size: 6,
face_editor_strength1: 0.4,
face_editor_strength2: 0.05,
restore_face_upsample: true,
control_guidance_start: 0,
face_editor_confidence: 0.97,
controlnet_conditioning_scale: 1,
restore_face_background_enhance: true
}
}
);
console.log(output[0].url());
fs.writeFile("my-image.png", output[0]);