File tree 1 file changed +7
-4
lines changed
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
57
57
const input = {
58
58
prompt: " a 19th century portrait of a raccoon gentleman wearing a suit" ,
59
59
};
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
62
65
```
63
66
64
67
You can also run a model in the background:
@@ -100,8 +103,8 @@ const model = "nightmareai/real-esrgan:42fed1c4974146d4d2414e2be2c5277c7fcf05fcc
100
103
const input = {
101
104
image: await fs .readFile (" path/to/image.png" ),
102
105
};
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')
105
108
```
106
109
107
110
> [ !NOTE]
You can’t perform that action at this time.
0 commit comments