eleazhong
/
strotss
image to image style transfer using STROTSS loss
- Public
- 8.9K runs
-
T4
- GitHub
Prediction
eleazhong/strotss:07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484IDwbxprneek5fyvpac2glitttiu4StatusSucceededSourceWebHardware–Total durationCreatedInput
{ "style": "https://replicate.delivery/mgxm/81863ea4-a1ce-42e8-9763-22f3569c83fa/koi-fishes-textured-palette-knife-oil-painting-mona-edulesc.jpg", "content": "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", "content_weight": "1.0" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run eleazhong/strotss using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "eleazhong/strotss:07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484", { input: { style: "https://replicate.delivery/mgxm/81863ea4-a1ce-42e8-9763-22f3569c83fa/koi-fishes-textured-palette-knife-oil-painting-mona-edulesc.jpg", content: "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", content_weight: "1.0" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run eleazhong/strotss using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "eleazhong/strotss:07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484", input={ "style": "https://replicate.delivery/mgxm/81863ea4-a1ce-42e8-9763-22f3569c83fa/koi-fishes-textured-palette-knife-oil-painting-mona-edulesc.jpg", "content": "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", "content_weight": "1.0" } ) # The eleazhong/strotss model can stream output as it's running. # The predict method returns an iterator, and you can iterate over that output. for item in output: # https://replicate.com/eleazhong/strotss/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run eleazhong/strotss using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484", "input": { "style": "https://replicate.delivery/mgxm/81863ea4-a1ce-42e8-9763-22f3569c83fa/koi-fishes-textured-palette-knife-oil-painting-mona-edulesc.jpg", "content": "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", "content_weight": "1.0" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2021-12-17T09:40:54.127842Z", "created_at": "2021-12-17T09:39:00.737082Z", "data_removed": false, "error": null, "id": "wbxprneek5fyvpac2glitttiu4", "input": { "style": "https://replicate.delivery/mgxm/81863ea4-a1ce-42e8-9763-22f3569c83fa/koi-fishes-textured-palette-knife-oil-painting-mona-edulesc.jpg", "content": "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", "content_weight": "1.0" }, "logs": "Transferring Style :)\nstarting running the strotss algorithm\nOptimizing at resoluton [64, 60]\n/root/.pyenv/versions/3.7.12/lib/python3.7/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.)\n return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)\nOptimizing at resoluton [128, 121]\nOptimizing at resoluton [256, 242]\nOptimizing at resoluton [512, 485]\nDone in 96.123s", "metrics": { "predict_time": 96.489029, "total_time": 113.39076 }, "output": [ { "file": "https://replicate.delivery/mgxm/05eee051-3aa4-4325-8545-70a5413d032c/out.png" } ], "started_at": "2021-12-17T09:39:17.638813Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/wbxprneek5fyvpac2glitttiu4", "cancel": "https://api.replicate.com/v1/predictions/wbxprneek5fyvpac2glitttiu4/cancel" }, "version": "07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484" }
Generated inTransferring Style :) starting running the strotss algorithm Optimizing at resoluton [64, 60] /root/.pyenv/versions/3.7.12/lib/python3.7/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.) return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode) Optimizing at resoluton [128, 121] Optimizing at resoluton [256, 242] Optimizing at resoluton [512, 485] Done in 96.123s
Prediction
eleazhong/strotss:07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484IDic54rxrwubhidmet4w5dynkh7eStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "style": "https://replicate.delivery/mgxm/00e0205f-39ae-45aa-b104-b0952867c87c/bendinthepond_jenniferyoung.jpeg", "content": "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", "content_weight": "1.0" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run eleazhong/strotss using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "eleazhong/strotss:07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484", { input: { style: "https://replicate.delivery/mgxm/00e0205f-39ae-45aa-b104-b0952867c87c/bendinthepond_jenniferyoung.jpeg", content: "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", content_weight: "1.0" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run eleazhong/strotss using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "eleazhong/strotss:07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484", input={ "style": "https://replicate.delivery/mgxm/00e0205f-39ae-45aa-b104-b0952867c87c/bendinthepond_jenniferyoung.jpeg", "content": "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", "content_weight": "1.0" } ) # The eleazhong/strotss model can stream output as it's running. # The predict method returns an iterator, and you can iterate over that output. for item in output: # https://replicate.com/eleazhong/strotss/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run eleazhong/strotss using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484", "input": { "style": "https://replicate.delivery/mgxm/00e0205f-39ae-45aa-b104-b0952867c87c/bendinthepond_jenniferyoung.jpeg", "content": "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", "content_weight": "1.0" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2021-12-17T10:08:41.739047Z", "created_at": "2021-12-17T10:07:07.997263Z", "data_removed": false, "error": null, "id": "ic54rxrwubhidmet4w5dynkh7e", "input": { "style": "https://replicate.delivery/mgxm/00e0205f-39ae-45aa-b104-b0952867c87c/bendinthepond_jenniferyoung.jpeg", "content": "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", "content_weight": "1.0" }, "logs": "Transferring Style :)\nstarting running the strotss algorithm\nOptimizing at resoluton [64, 60]\nOptimizing at resoluton [128, 121]\nOptimizing at resoluton [256, 242]\nOptimizing at resoluton [512, 485]\nDone in 413.353s", "metrics": { "predict_time": 93.096329, "total_time": 93.741784 }, "output": [ { "file": "https://replicate.delivery/mgxm/34d1bcfa-0363-4aab-9a0e-c46b9188c64f/out.png" } ], "started_at": "2021-12-17T10:07:08.642718Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ic54rxrwubhidmet4w5dynkh7e", "cancel": "https://api.replicate.com/v1/predictions/ic54rxrwubhidmet4w5dynkh7e/cancel" }, "version": "07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484" }
Generated inTransferring Style :) starting running the strotss algorithm Optimizing at resoluton [64, 60] Optimizing at resoluton [128, 121] Optimizing at resoluton [256, 242] Optimizing at resoluton [512, 485] Done in 413.353s
Prediction
eleazhong/strotss:07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484Input
{ "style": "https://replicate.delivery/mgxm/9d51a899-ceac-4b05-98fb-10c6c356fa7e/margarita-aivazian-dh8.jpg", "content": "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", "content_weight": "1.0" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run eleazhong/strotss using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "eleazhong/strotss:07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484", { input: { style: "https://replicate.delivery/mgxm/9d51a899-ceac-4b05-98fb-10c6c356fa7e/margarita-aivazian-dh8.jpg", content: "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", content_weight: "1.0" } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run eleazhong/strotss using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "eleazhong/strotss:07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484", input={ "style": "https://replicate.delivery/mgxm/9d51a899-ceac-4b05-98fb-10c6c356fa7e/margarita-aivazian-dh8.jpg", "content": "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", "content_weight": "1.0" } ) # The eleazhong/strotss model can stream output as it's running. # The predict method returns an iterator, and you can iterate over that output. for item in output: # https://replicate.com/eleazhong/strotss/api#output-schema print(item)
To learn more, take a look at the guide on getting started with Python.
Run eleazhong/strotss using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484", "input": { "style": "https://replicate.delivery/mgxm/9d51a899-ceac-4b05-98fb-10c6c356fa7e/margarita-aivazian-dh8.jpg", "content": "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", "content_weight": "1.0" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2021-12-17T10:03:22.411475Z", "created_at": "2021-12-17T10:01:45.132952Z", "data_removed": false, "error": null, "id": "ykhgztchljgzzjci527oyv35wm", "input": { "style": "https://replicate.delivery/mgxm/9d51a899-ceac-4b05-98fb-10c6c356fa7e/margarita-aivazian-dh8.jpg", "content": "https://replicate.delivery/mgxm/fb40f17f-0c54-4eb0-bab9-304f5c6f4439/aa.jpg", "content_weight": "1.0" }, "logs": "Transferring Style :)\nstarting running the strotss algorithm\nOptimizing at resoluton [64, 60]\n/root/.pyenv/versions/3.7.12/lib/python3.7/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.)\n return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)\nOptimizing at resoluton [128, 121]\nOptimizing at resoluton [256, 242]\nOptimizing at resoluton [512, 485]\nDone in 93.776s", "metrics": { "predict_time": 93.986144, "total_time": 97.278523 }, "output": [ { "file": "https://replicate.delivery/mgxm/1f23e3c8-7c05-4d55-a4b8-1d8be9811068/out.png" } ], "started_at": "2021-12-17T10:01:48.425331Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ykhgztchljgzzjci527oyv35wm", "cancel": "https://api.replicate.com/v1/predictions/ykhgztchljgzzjci527oyv35wm/cancel" }, "version": "07a5b687e08773bc375094478397441130df6ca62dc24b9682bb29e41813f484" }
Generated inTransferring Style :) starting running the strotss algorithm Optimizing at resoluton [64, 60] /root/.pyenv/versions/3.7.12/lib/python3.7/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.) return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode) Optimizing at resoluton [128, 121] Optimizing at resoluton [256, 242] Optimizing at resoluton [512, 485] Done in 93.776s
Want to make some of these yourself?
Run this model