Run digitaljohn/urban-narrative using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"digitaljohn/urban-narrative:ea830af4eeb1f0c3d9eb209ecbbc4ef14bcb8d51ac59b6d0a8dc2eb632a2fa84",
{
input: {
model: "dev",
prompt: "an illustration of a man in new york in the style of URBNAR",
go_fast: false,
lora_scale: 1,
megapixels: "1",
num_outputs: 1,
aspect_ratio: "1:1",
output_format: "png",
guidance_scale: 3.5,
output_quality: 80,
prompt_strength: 0.8,
extra_lora_scale: 0.8,
num_inference_steps: 28
}
}
);
// To access the file URL:console.log(output[0].url()); //=> "http://example.com"// To write the file to disk:
fs.writeFile("my-image.png", output[0]);