microsoft
/
bringing-old-photos-back-to-life
Bringing Old Photos Back to Life
Prediction
microsoft/bringing-old-photos-back-to-life:c75db81dInput
{ "HR": false, "image": "https://replicate.delivery/mgxm/7869b8fd-2393-450b-8fd0-281f00eedef9/a.png", "with_scratch": false }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run microsoft/bringing-old-photos-back-to-life using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "microsoft/bringing-old-photos-back-to-life:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799", { input: { HR: false, image: "https://replicate.delivery/mgxm/7869b8fd-2393-450b-8fd0-281f00eedef9/a.png", with_scratch: false } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run microsoft/bringing-old-photos-back-to-life using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "microsoft/bringing-old-photos-back-to-life:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799", input={ "HR": False, "image": "https://replicate.delivery/mgxm/7869b8fd-2393-450b-8fd0-281f00eedef9/a.png", "with_scratch": False } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run microsoft/bringing-old-photos-back-to-life 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": "c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799", "input": { "HR": false, "image": "https://replicate.delivery/mgxm/7869b8fd-2393-450b-8fd0-281f00eedef9/a.png", "with_scratch": false } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run microsoft/bringing-old-photos-back-to-life using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/microsoft/bringing-old-photos-back-to-life@sha256:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799 \ -i 'HR=false' \ -i 'image="https://replicate.delivery/mgxm/7869b8fd-2393-450b-8fd0-281f00eedef9/a.png"' \ -i 'with_scratch=false'
To learn more, take a look at the Cog documentation.
Pull and run microsoft/bringing-old-photos-back-to-life using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/microsoft/bringing-old-photos-back-to-life@sha256:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "HR": false, "image": "https://replicate.delivery/mgxm/7869b8fd-2393-450b-8fd0-281f00eedef9/a.png", "with_scratch": false } }' \ http://localhost:5000/predictions
Output
{ "completed_at": "2021-09-20T16:27:51.532784Z", "created_at": "2021-09-20T16:27:28.360906Z", "data_removed": false, "error": null, "id": "cxqxicgcjng5rfrrgtbsx2ffmm", "input": { "HR": false, "image": "https://replicate.delivery/mgxm/7869b8fd-2393-450b-8fd0-281f00eedef9/a.png", "with_scratch": false }, "logs": "Running Stage 1: Overall restoration\nFinish Stage 1 ...\nRunning Stage 2: Face Detection\nFinish Stage 2 ...\nRunning Stage 3: Face Enhancement\nFinish Stage 3 ...\nRunning Stage 4: Blending\nFinish Stage 4 ...\nAll the processing is done. Please check the results.", "metrics": { "total_time": 23.171878 }, "output": [ { "file": "https://replicate.delivery/mgxm/18b02ad9-ae81-4044-800e-65732df6bdc7/out.png" } ], "started_at": "2021-12-04T14:16:37.885270Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/cxqxicgcjng5rfrrgtbsx2ffmm", "cancel": "https://api.replicate.com/v1/predictions/cxqxicgcjng5rfrrgtbsx2ffmm/cancel" }, "version": "7c0dc6206cc4d002ccd985f0a3944a18dcb918cfd9f2e4678db568388a57d98d" }
Running Stage 1: Overall restoration Finish Stage 1 ... Running Stage 2: Face Detection Finish Stage 2 ... Running Stage 3: Face Enhancement Finish Stage 3 ... Running Stage 4: Blending Finish Stage 4 ... All the processing is done. Please check the results.
Prediction
microsoft/bringing-old-photos-back-to-life:c75db81dInput
{ "HR": false, "image": "https://replicate.delivery/mgxm/b033ff07-1d2e-4768-a137-6c16b5ed4bed/d_1.png", "with_scratch": true }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run microsoft/bringing-old-photos-back-to-life using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "microsoft/bringing-old-photos-back-to-life:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799", { input: { HR: false, image: "https://replicate.delivery/mgxm/b033ff07-1d2e-4768-a137-6c16b5ed4bed/d_1.png", with_scratch: true } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run microsoft/bringing-old-photos-back-to-life using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "microsoft/bringing-old-photos-back-to-life:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799", input={ "HR": False, "image": "https://replicate.delivery/mgxm/b033ff07-1d2e-4768-a137-6c16b5ed4bed/d_1.png", "with_scratch": True } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run microsoft/bringing-old-photos-back-to-life 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": "c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799", "input": { "HR": false, "image": "https://replicate.delivery/mgxm/b033ff07-1d2e-4768-a137-6c16b5ed4bed/d_1.png", "with_scratch": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run microsoft/bringing-old-photos-back-to-life using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/microsoft/bringing-old-photos-back-to-life@sha256:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799 \ -i 'HR=false' \ -i 'image="https://replicate.delivery/mgxm/b033ff07-1d2e-4768-a137-6c16b5ed4bed/d_1.png"' \ -i 'with_scratch=true'
To learn more, take a look at the Cog documentation.
Pull and run microsoft/bringing-old-photos-back-to-life using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/microsoft/bringing-old-photos-back-to-life@sha256:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "HR": false, "image": "https://replicate.delivery/mgxm/b033ff07-1d2e-4768-a137-6c16b5ed4bed/d_1.png", "with_scratch": true } }' \ http://localhost:5000/predictions
Output
{ "completed_at": "2021-09-20T16:28:35.961042Z", "created_at": "2021-09-20T16:28:02.481822Z", "data_removed": false, "error": null, "id": "jnmdsyzowvc6vk7biocmzgbi7y", "input": { "HR": false, "image": "https://replicate.delivery/mgxm/b033ff07-1d2e-4768-a137-6c16b5ed4bed/d_1.png", "with_scratch": true }, "logs": "Running Stage 1: Overall restoration\nFinish Stage 1 ...\nRunning Stage 2: Face Detection\nFinish Stage 2 ...\nRunning Stage 3: Face Enhancement\nFinish Stage 3 ...\nRunning Stage 4: Blending\nFinish Stage 4 ...\nAll the processing is done. Please check the results.", "metrics": { "total_time": 33.47922 }, "output": [ { "file": "https://replicate.delivery/mgxm/892cca7f-4f6f-4359-9865-f9cacba34199/out.png" } ], "started_at": "2022-10-24T04:46:59.366881Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/jnmdsyzowvc6vk7biocmzgbi7y", "cancel": "https://api.replicate.com/v1/predictions/jnmdsyzowvc6vk7biocmzgbi7y/cancel" }, "version": "7c0dc6206cc4d002ccd985f0a3944a18dcb918cfd9f2e4678db568388a57d98d" }
Running Stage 1: Overall restoration Finish Stage 1 ... Running Stage 2: Face Detection Finish Stage 2 ... Running Stage 3: Face Enhancement Finish Stage 3 ... Running Stage 4: Blending Finish Stage 4 ... All the processing is done. Please check the results.
Prediction
microsoft/bringing-old-photos-back-to-life:c75db81dInput
{ "HR": false, "image": "https://replicate.delivery/mgxm/f1dc46af-ca20-4ea4-a573-54afd40f74ce/d.png", "with_scratch": false }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run microsoft/bringing-old-photos-back-to-life using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "microsoft/bringing-old-photos-back-to-life:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799", { input: { HR: false, image: "https://replicate.delivery/mgxm/f1dc46af-ca20-4ea4-a573-54afd40f74ce/d.png", with_scratch: false } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run microsoft/bringing-old-photos-back-to-life using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "microsoft/bringing-old-photos-back-to-life:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799", input={ "HR": False, "image": "https://replicate.delivery/mgxm/f1dc46af-ca20-4ea4-a573-54afd40f74ce/d.png", "with_scratch": False } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run microsoft/bringing-old-photos-back-to-life 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": "c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799", "input": { "HR": false, "image": "https://replicate.delivery/mgxm/f1dc46af-ca20-4ea4-a573-54afd40f74ce/d.png", "with_scratch": false } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run microsoft/bringing-old-photos-back-to-life using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/microsoft/bringing-old-photos-back-to-life@sha256:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799 \ -i 'HR=false' \ -i 'image="https://replicate.delivery/mgxm/f1dc46af-ca20-4ea4-a573-54afd40f74ce/d.png"' \ -i 'with_scratch=false'
To learn more, take a look at the Cog documentation.
Pull and run microsoft/bringing-old-photos-back-to-life using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/microsoft/bringing-old-photos-back-to-life@sha256:c75db81db6cbd809d93cc3b7e7a088a351a3349c9fa02b6d393e35e0d51ba799
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "HR": false, "image": "https://replicate.delivery/mgxm/f1dc46af-ca20-4ea4-a573-54afd40f74ce/d.png", "with_scratch": false } }' \ http://localhost:5000/predictions
Output
{ "completed_at": "2021-09-20T16:29:56.551476Z", "created_at": "2021-09-20T16:29:30.997317Z", "data_removed": false, "error": null, "id": "hexqsphiczhqphqruret5h4fam", "input": { "HR": false, "image": "https://replicate.delivery/mgxm/f1dc46af-ca20-4ea4-a573-54afd40f74ce/d.png", "with_scratch": false }, "logs": "Running Stage 1: Overall restoration\nFinish Stage 1 ...\nRunning Stage 2: Face Detection\nFinish Stage 2 ...\nRunning Stage 3: Face Enhancement\nFinish Stage 3 ...\nRunning Stage 4: Blending\nFinish Stage 4 ...\nAll the processing is done. Please check the results.", "metrics": { "total_time": 25.554159 }, "output": [ { "file": "https://replicate.delivery/mgxm/e4af3751-bc0f-4a71-b69a-0f52a2a8f7f4/out.png" } ], "started_at": "2023-01-30T23:53:05.117008Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/hexqsphiczhqphqruret5h4fam", "cancel": "https://api.replicate.com/v1/predictions/hexqsphiczhqphqruret5h4fam/cancel" }, "version": "7c0dc6206cc4d002ccd985f0a3944a18dcb918cfd9f2e4678db568388a57d98d" }
Running Stage 1: Overall restoration Finish Stage 1 ... Running Stage 2: Face Detection Finish Stage 2 ... Running Stage 3: Face Enhancement Finish Stage 3 ... Running Stage 4: Blending Finish Stage 4 ... All the processing is done. Please check the results.
Want to make some of these yourself?
Run this model