File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,11 @@ const model = "stability-ai/stable-diffusion:27b93a2413e7f36cd83da926f3656280b29
5757const input = {
5858 prompt: " a 19th century portrait of a raccoon gentleman wearing a suit" ,
5959};
60- const output = await replicate .run (model, { input });
61- // ['https://replicate.delivery/pbxt/GtQb3Sgve42ZZyVnt8xjquFk9EX5LP0fF68NTIWlgBMUpguQA/out-0.png']
60+ const [output ] = await replicate .run (model, { input });
61+ // FileOutput('https://replicate.delivery/pbxt/GtQb3Sgve42ZZyVnt8xjquFk9EX5LP0fF68NTIWlgBMUpguQA/out-0.png')
62+
63+ console .log (output .url ()); // 'https://replicate.delivery/pbxt/GtQb3Sgve42ZZyVnt8xjquFk9EX5LP0fF68NTIWlgBMUpguQA/out-0.png'
64+ console .log (output .blob ()); // Blob
6265```
6366
6467You can also run a model in the background:
@@ -100,8 +103,8 @@ const model = "nightmareai/real-esrgan:42fed1c4974146d4d2414e2be2c5277c7fcf05fcc
100103const input = {
101104 image: await fs .readFile (" path/to/image.png" ),
102105};
103- const output = await replicate .run (model, { input });
104- // [ 'https://replicate.delivery/mgxm/e7b0e122-9daa-410e-8cde-006c7308ff4d/output.png']
106+ const [ output ] = await replicate .run (model, { input });
107+ // FileOutput( 'https://replicate.delivery/mgxm/e7b0e122-9daa-410e-8cde-006c7308ff4d/output.png')
105108```
106109
107110> [ !NOTE]
You can’t perform that action at this time.
0 commit comments