We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5c9493 commit 475f5d9Copy full SHA for 475f5d9
README.md
@@ -111,6 +111,19 @@ You can list all the predictions you've run:
111
[<Prediction: 8b0ba5ab4d85>, <Prediction: 494900564e8c>]
112
```
113
114
+Output files are returned as HTTPS URLs. You can load an output file as a buffer:
115
+
116
+```python
117
+import replicate
118
+from urllib.request import urlretrieve
119
120
+model = replicate.models.get("stability-ai/stable-diffusion")
121
+version = model.versions.get("27b93a2413e7f36cd83da926f3656280b2931564ff050bf9575f1fdf9bcd7478")
122
+out = version.predict(prompt="wavy colorful abstract patterns, cgsociety"
123
+urlretrieve(out[0], "/tmp/out.png")
124
+background = Image.open("/tmp/out.png")
125
+```
126
127
## Install
128
129
```sh
0 commit comments