You're looking at a specific version of this model. Jump to the model overview.
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run zsyoaoa/invsr using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zsyoaoa/invsr:37eebabfb6cdc4be2892b884b96b361d6fedc9f6a934d2fa3c1a2f85f004b0f0",
{
input: {
seed: 12345,
in_path: "https://replicate.delivery/pbxt/M8qQo1QjqgM7itL5HrVQ7vWHR51VorDTQbJCTnoUPaojBgSd/oldphoto6.png",
num_steps: 1,
chopping_size: 128
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run zsyoaoa/invsr using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zsyoaoa/invsr:37eebabfb6cdc4be2892b884b96b361d6fedc9f6a934d2fa3c1a2f85f004b0f0",
input={
"seed": 12345,
"in_path": "https://replicate.delivery/pbxt/M8qQo1QjqgM7itL5HrVQ7vWHR51VorDTQbJCTnoUPaojBgSd/oldphoto6.png",
"num_steps": 1,
"chopping_size": 128
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run zsyoaoa/invsr 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": "37eebabfb6cdc4be2892b884b96b361d6fedc9f6a934d2fa3c1a2f85f004b0f0",
"input": {
"seed": 12345,
"in_path": "https://replicate.delivery/pbxt/M8qQo1QjqgM7itL5HrVQ7vWHR51VorDTQbJCTnoUPaojBgSd/oldphoto6.png",
"num_steps": 1,
"chopping_size": 128
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/zsyoaoa/invsr@sha256:37eebabfb6cdc4be2892b884b96b361d6fedc9f6a934d2fa3c1a2f85f004b0f0 \
-i 'seed=12345' \
-i 'in_path="https://replicate.delivery/pbxt/M8qQo1QjqgM7itL5HrVQ7vWHR51VorDTQbJCTnoUPaojBgSd/oldphoto6.png"' \
-i 'num_steps=1' \
-i 'chopping_size=128'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/zsyoaoa/invsr@sha256:37eebabfb6cdc4be2892b884b96b361d6fedc9f6a934d2fa3c1a2f85f004b0f0
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": 12345, "in_path": "https://replicate.delivery/pbxt/M8qQo1QjqgM7itL5HrVQ7vWHR51VorDTQbJCTnoUPaojBgSd/oldphoto6.png", "num_steps": 1, "chopping_size": 128 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.067. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
We were unable to load these images. Please make sure the URLs are valid.
{ "input": "https://replicate.delivery/pbxt/M8qQo1QjqgM7itL5HrVQ7vWHR51VorDTQbJCTnoUPaojBgSd/oldphoto6.png", "outut": "https://replicate.delivery/czjl/AZjtiuCm0G41BVaHjR1brPG9gN8OVtleHbLUQQwkaizrlX9JA/out.png" }
{
"completed_at": "2024-12-14T08:24:55.165209Z",
"created_at": "2024-12-14T08:24:46.064000Z",
"data_removed": false,
"error": null,
"id": "gvvqsps4y1rga0ckrh2rcjrq5r",
"input": {
"seed": 12345,
"in_path": "https://replicate.delivery/pbxt/M8qQo1QjqgM7itL5HrVQ7vWHR51VorDTQbJCTnoUPaojBgSd/oldphoto6.png",
"num_steps": 1,
"chopping_size": 128
},
"logs": "Setting timesteps for inference: [200]\nLoading pipeline components...: 0%| | 0/5 [00:00<?, ?it/s]\nLoading pipeline components...: 20%|██ | 1/5 [00:00<00:00, 5.90it/s]\nLoading pipeline components...: 80%|████████ | 4/5 [00:00<00:00, 4.29it/s]\nLoading pipeline components...: 100%|██████████| 5/5 [00:02<00:00, 2.06it/s]\nLoading pipeline components...: 100%|██████████| 5/5 [00:02<00:00, 2.43it/s]\nYou have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .\nYou have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_inversion_sr.StableDiffusionInvEnhancePipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .\nActivating gradient checkpoing for vae...\nLoading started model from ./weights/noise_predictor_sd_turbo_v5.pth...\nLoading Done\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 16.31it/s]\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 17.18it/s]\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 9.84it/s]\n100%|██████████| 1/1 [00:00<00:00, 9.82it/s]\nProcessing done, enjoy the results in invsr_output",
"metrics": {
"predict_time": 9.081789597,
"total_time": 9.101209
},
"output": "https://replicate.delivery/czjl/AZjtiuCm0G41BVaHjR1brPG9gN8OVtleHbLUQQwkaizrlX9JA/out.png",
"started_at": "2024-12-14T08:24:46.083420Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/fddq-5dd5skkpgudwgd7zikflt7chldbcahbs4umd2cejaosbw7n27efq",
"get": "https://api.replicate.com/v1/predictions/gvvqsps4y1rga0ckrh2rcjrq5r",
"cancel": "https://api.replicate.com/v1/predictions/gvvqsps4y1rga0ckrh2rcjrq5r/cancel"
},
"version": "37eebabfb6cdc4be2892b884b96b361d6fedc9f6a934d2fa3c1a2f85f004b0f0"
}
Setting timesteps for inference: [200]
Loading pipeline components...: 0%| | 0/5 [00:00<?, ?it/s]
Loading pipeline components...: 20%|██ | 1/5 [00:00<00:00, 5.90it/s]
Loading pipeline components...: 80%|████████ | 4/5 [00:00<00:00, 4.29it/s]
Loading pipeline components...: 100%|██████████| 5/5 [00:02<00:00, 2.06it/s]
Loading pipeline components...: 100%|██████████| 5/5 [00:02<00:00, 2.43it/s]
You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .
You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_inversion_sr.StableDiffusionInvEnhancePipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .
Activating gradient checkpoing for vae...
Loading started model from ./weights/noise_predictor_sd_turbo_v5.pth...
Loading Done
0%| | 0/1 [00:00<?, ?it/s]
100%|██████████| 1/1 [00:00<00:00, 16.31it/s]
0%| | 0/1 [00:00<?, ?it/s]
100%|██████████| 1/1 [00:00<00:00, 17.18it/s]
0%| | 0/1 [00:00<?, ?it/s]
100%|██████████| 1/1 [00:00<00:00, 9.84it/s]
100%|██████████| 1/1 [00:00<00:00, 9.82it/s]
Processing done, enjoy the results in invsr_output