zsyoaoa
/
invsr
Arbitrary-steps Image Super-resolution via Diffusion Inversion
Prediction
zsyoaoa/invsr:37eebabfIDgvvqsps4y1rga0ckrh2rcjrq5rStatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "seed": 12345, "in_path": "https://replicate.delivery/pbxt/M8qQo1QjqgM7itL5HrVQ7vWHR51VorDTQbJCTnoUPaojBgSd/oldphoto6.png", "num_steps": 1, "chopping_size": 128 }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client: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.
Install Replicate’s Python client library:pip install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client: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.
Set theREPLICATE_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.
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" }
Generated inSetting 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
Prediction
zsyoaoa/invsr:37eebabfIDyns473fmbxrge0ckrh5rn7zt3rStatusSucceededSourceWebHardwareT4Total durationCreatedInput
{ "seed": 12345, "in_path": "https://replicate.delivery/pbxt/M8qXrZYsVfKb69dS1rTIuq2D14YEUWwqHkMXPNtukFizQyRk/animal1-flux.png", "num_steps": 3, "chopping_size": 128 }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client: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/M8qXrZYsVfKb69dS1rTIuq2D14YEUWwqHkMXPNtukFizQyRk/animal1-flux.png", num_steps: 3, chopping_size: 128 } } ); 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
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client: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/M8qXrZYsVfKb69dS1rTIuq2D14YEUWwqHkMXPNtukFizQyRk/animal1-flux.png", "num_steps": 3, "chopping_size": 128 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_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/M8qXrZYsVfKb69dS1rTIuq2D14YEUWwqHkMXPNtukFizQyRk/animal1-flux.png", "num_steps": 3, "chopping_size": 128 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
We were unable to load these images. Please make sure the URLs are valid.
{ "input": "https://replicate.delivery/pbxt/M8qXrZYsVfKb69dS1rTIuq2D14YEUWwqHkMXPNtukFizQyRk/animal1-flux.png", "outut": "https://replicate.delivery/czjl/SO8H1LC8tZ7GLlYsReR8oD8YzcJ4rDYYNFdBgpqap0HHrX9JA/out.png" }
{ "completed_at": "2024-12-14T08:36:30.368100Z", "created_at": "2024-12-14T08:32:12.383000Z", "data_removed": false, "error": null, "id": "yns473fmbxrge0ckrh5rn7zt3r", "input": { "seed": 12345, "in_path": "https://replicate.delivery/pbxt/M8qXrZYsVfKb69dS1rTIuq2D14YEUWwqHkMXPNtukFizQyRk/animal1-flux.png", "num_steps": 3, "chopping_size": 128 }, "logs": "Setting timesteps for inference: [200, 100, 50]\nDownloading: \"https://huggingface.co/OAOA/InvSR/resolve/main/noise_predictor_sd_turbo_v5.pth\" to /src/weights/noise_predictor_sd_turbo_v5.pth\n 0%| | 0.00/129M [00:00<?, ?B/s]\n 2%|▏ | 3.12M/129M [00:00<00:04, 31.8MB/s]\n 6%|▌ | 7.25M/129M [00:00<00:03, 38.5MB/s]\n 9%|▉ | 11.4M/129M [00:00<00:03, 39.8MB/s]\n 12%|█▏ | 15.6M/129M [00:00<00:02, 40.9MB/s]\n 15%|█▌ | 19.9M/129M [00:00<00:02, 41.6MB/s]\n 19%|█▊ | 24.1M/129M [00:00<00:02, 42.3MB/s]\n 22%|██▏ | 28.4M/129M [00:00<00:02, 42.7MB/s]\n 25%|██▌ | 32.5M/129M [00:00<00:02, 42.8MB/s]\n 28%|██▊ | 36.6M/129M [00:00<00:02, 42.6MB/s]\n 32%|███▏ | 40.9M/129M [00:01<00:02, 42.7MB/s]\n 35%|███▍ | 45.1M/129M [00:01<00:02, 42.7MB/s]\n 38%|███▊ | 49.4M/129M [00:01<00:01, 42.8MB/s]\n 42%|████▏ | 53.6M/129M [00:01<00:01, 42.8MB/s]\n 45%|████▍ | 57.9M/129M [00:01<00:01, 43.0MB/s]\n 48%|████▊ | 62.0M/129M [00:01<00:01, 43.0MB/s]\n 51%|█████ | 66.1M/129M [00:01<00:01, 42.7MB/s]\n 54%|█████▍ | 70.4M/129M [00:01<00:01, 42.8MB/s]\n 58%|█████▊ | 74.5M/129M [00:01<00:01, 42.9MB/s]\n 61%|██████ | 78.6M/129M [00:01<00:01, 42.6MB/s]\n 64%|██████▍ | 82.9M/129M [00:02<00:01, 42.6MB/s]\n 67%|██████▋ | 87.0M/129M [00:02<00:01, 42.7MB/s]\n 71%|███████ | 91.1M/129M [00:02<00:00, 42.4MB/s]\n 74%|███████▍ | 95.4M/129M [00:02<00:00, 42.4MB/s]\n 77%|███████▋ | 99.5M/129M [00:02<00:00, 42.6MB/s]\n 80%|████████ | 104M/129M [00:02<00:00, 42.4MB/s] \n 84%|████████▎ | 108M/129M [00:02<00:00, 42.6MB/s]\n 87%|████████▋ | 112M/129M [00:02<00:00, 42.8MB/s]\n 90%|█████████ | 116M/129M [00:02<00:00, 42.8MB/s]\n 93%|█████████▎| 120M/129M [00:02<00:00, 42.3MB/s]\n 96%|█████████▋| 124M/129M [00:03<00:00, 42.4MB/s]\n100%|█████████▉| 129M/129M [00:03<00:00, 41.9MB/s]\n100%|██████████| 129M/129M [00:03<00:00, 42.3MB/s]\nFetching 12 files: 0%| | 0/12 [00:00<?, ?it/s]\nFetching 12 files: 17%|█▋ | 2/12 [00:00<00:03, 3.27it/s]\nFetching 12 files: 33%|███▎ | 4/12 [00:33<01:17, 9.72s/it]\nFetching 12 files: 83%|████████▎ | 10/12 [01:23<00:17, 8.72s/it]\nFetching 12 files: 100%|██████████| 12/12 [01:23<00:00, 6.93s/it]\nLoading pipeline components...: 0%| | 0/5 [00:00<?, ?it/s]\nLoading pipeline components...: 40%|████ | 2/5 [00:00<00:01, 2.01it/s]\nLoading pipeline components...: 60%|██████ | 3/5 [00:01<00:00, 2.99it/s]\nLoading pipeline components...: 80%|████████ | 4/5 [00:01<00:00, 2.21it/s]\nLoading pipeline components...: 100%|██████████| 5/5 [00:03<00:00, 1.14it/s]\nLoading pipeline components...: 100%|██████████| 5/5 [00:03<00:00, 1.46it/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...\n/src/sampler_invsr.py:101: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.\nstate = torch.load(ckpt_path, map_location=f\"cuda\")\nLoading Done\n/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/diffusers/configuration_utils.py:140: FutureWarning: Accessing config attribute `vae_latent_channels` directly via 'VaeImageProcessor' object attribute is deprecated. Please access 'vae_latent_channels' over 'VaeImageProcessor's config object instead, e.g. 'scheduler.config.vae_latent_channels'.\ndeprecate(\"direct config name access\", \"1.0.0\", deprecation_message, standard_warn=False)\n 0%| | 0/3 [00:00<?, ?it/s]\n 33%|███▎ | 1/3 [00:00<00:00, 4.31it/s]\n100%|██████████| 3/3 [00:00<00:00, 6.05it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.81it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 7.18it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.56it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.82it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 7.07it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.46it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.72it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 7.02it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.37it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.63it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.85it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.35it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.59it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 7.02it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.42it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.67it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.99it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.30it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.57it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.84it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.27it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.52it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.84it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.29it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.53it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.82it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.20it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.46it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.77it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.23it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.47it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.62it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.08it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.32it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.56it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.06it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.30it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.52it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.01it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.25it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.55it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.02it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.26it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.35it/s]\n100%|██████████| 3/3 [00:00<00:00, 4.93it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.16it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.31it/s]\n100%|██████████| 3/3 [00:00<00:00, 4.90it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.13it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.37it/s]\n100%|██████████| 3/3 [00:00<00:00, 4.90it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.14it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.31it/s]\n100%|██████████| 3/3 [00:00<00:00, 4.91it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.14it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.45it/s]\n100%|██████████| 3/3 [00:00<00:00, 4.98it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.21it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.42it/s]\n100%|██████████| 3/3 [00:00<00:00, 4.99it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.22it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.52it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.02it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.26it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.67it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.09it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.34it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.61it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.12it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.36it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.65it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.14it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.39it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.58it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.13it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.36it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.73it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.16it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.41it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.78it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.19it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.45it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.83it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.22it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.47it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.71it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.21it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.45it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.79it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.22it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.47it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.83it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.20it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.46it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.89it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.23it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.49it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.72it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.20it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.44it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.77it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.19it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.44it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.75it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.20it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.44it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.81it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.19it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.44it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.75it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.21it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.46it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.64it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.16it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.40it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.66it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.12it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.37it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.70it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.16it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.41it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.64it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.12it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.36it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.66it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.10it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.35it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.68it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.11it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.36it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.55it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.09it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.32it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.53it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.06it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.30it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.51it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.05it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.29it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.54it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.06it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.30it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.53it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.04it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.28it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.59it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.11it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.34it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.56it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.09it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.33it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.54it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.07it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.31it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.60it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.08it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.32it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.65it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.11it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.36it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.71it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.13it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.38it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 6.68it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.15it/s]\n100%|██████████| 3/3 [00:00<00:00, 5.39it/s]\n 0%| | 0/3 [00:00<?, ?it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 14.48it/s]\n100%|██████████| 3/3 [00:00<00:00, 15.51it/s]\nProcessing done, enjoy the results in invsr_output", "metrics": { "predict_time": 257.965886005, "total_time": 257.9851 }, "output": "https://replicate.delivery/czjl/SO8H1LC8tZ7GLlYsReR8oD8YzcJ4rDYYNFdBgpqap0HHrX9JA/out.png", "started_at": "2024-12-14T08:32:12.402214Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/fddq-sjcljbnazo7mv5hxrkehl3gyft2yiihkl7mkrb7tjj44p66jd5bq", "get": "https://api.replicate.com/v1/predictions/yns473fmbxrge0ckrh5rn7zt3r", "cancel": "https://api.replicate.com/v1/predictions/yns473fmbxrge0ckrh5rn7zt3r/cancel" }, "version": "37eebabfb6cdc4be2892b884b96b361d6fedc9f6a934d2fa3c1a2f85f004b0f0" }
Generated inSetting timesteps for inference: [200, 100, 50] Downloading: "https://huggingface.co/OAOA/InvSR/resolve/main/noise_predictor_sd_turbo_v5.pth" to /src/weights/noise_predictor_sd_turbo_v5.pth 0%| | 0.00/129M [00:00<?, ?B/s] 2%|▏ | 3.12M/129M [00:00<00:04, 31.8MB/s] 6%|▌ | 7.25M/129M [00:00<00:03, 38.5MB/s] 9%|▉ | 11.4M/129M [00:00<00:03, 39.8MB/s] 12%|█▏ | 15.6M/129M [00:00<00:02, 40.9MB/s] 15%|█▌ | 19.9M/129M [00:00<00:02, 41.6MB/s] 19%|█▊ | 24.1M/129M [00:00<00:02, 42.3MB/s] 22%|██▏ | 28.4M/129M [00:00<00:02, 42.7MB/s] 25%|██▌ | 32.5M/129M [00:00<00:02, 42.8MB/s] 28%|██▊ | 36.6M/129M [00:00<00:02, 42.6MB/s] 32%|███▏ | 40.9M/129M [00:01<00:02, 42.7MB/s] 35%|███▍ | 45.1M/129M [00:01<00:02, 42.7MB/s] 38%|███▊ | 49.4M/129M [00:01<00:01, 42.8MB/s] 42%|████▏ | 53.6M/129M [00:01<00:01, 42.8MB/s] 45%|████▍ | 57.9M/129M [00:01<00:01, 43.0MB/s] 48%|████▊ | 62.0M/129M [00:01<00:01, 43.0MB/s] 51%|█████ | 66.1M/129M [00:01<00:01, 42.7MB/s] 54%|█████▍ | 70.4M/129M [00:01<00:01, 42.8MB/s] 58%|█████▊ | 74.5M/129M [00:01<00:01, 42.9MB/s] 61%|██████ | 78.6M/129M [00:01<00:01, 42.6MB/s] 64%|██████▍ | 82.9M/129M [00:02<00:01, 42.6MB/s] 67%|██████▋ | 87.0M/129M [00:02<00:01, 42.7MB/s] 71%|███████ | 91.1M/129M [00:02<00:00, 42.4MB/s] 74%|███████▍ | 95.4M/129M [00:02<00:00, 42.4MB/s] 77%|███████▋ | 99.5M/129M [00:02<00:00, 42.6MB/s] 80%|████████ | 104M/129M [00:02<00:00, 42.4MB/s] 84%|████████▎ | 108M/129M [00:02<00:00, 42.6MB/s] 87%|████████▋ | 112M/129M [00:02<00:00, 42.8MB/s] 90%|█████████ | 116M/129M [00:02<00:00, 42.8MB/s] 93%|█████████▎| 120M/129M [00:02<00:00, 42.3MB/s] 96%|█████████▋| 124M/129M [00:03<00:00, 42.4MB/s] 100%|█████████▉| 129M/129M [00:03<00:00, 41.9MB/s] 100%|██████████| 129M/129M [00:03<00:00, 42.3MB/s] Fetching 12 files: 0%| | 0/12 [00:00<?, ?it/s] Fetching 12 files: 17%|█▋ | 2/12 [00:00<00:03, 3.27it/s] Fetching 12 files: 33%|███▎ | 4/12 [00:33<01:17, 9.72s/it] Fetching 12 files: 83%|████████▎ | 10/12 [01:23<00:17, 8.72s/it] Fetching 12 files: 100%|██████████| 12/12 [01:23<00:00, 6.93s/it] Loading pipeline components...: 0%| | 0/5 [00:00<?, ?it/s] Loading pipeline components...: 40%|████ | 2/5 [00:00<00:01, 2.01it/s] Loading pipeline components...: 60%|██████ | 3/5 [00:01<00:00, 2.99it/s] Loading pipeline components...: 80%|████████ | 4/5 [00:01<00:00, 2.21it/s] Loading pipeline components...: 100%|██████████| 5/5 [00:03<00:00, 1.14it/s] Loading pipeline components...: 100%|██████████| 5/5 [00:03<00:00, 1.46it/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... /src/sampler_invsr.py:101: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. state = torch.load(ckpt_path, map_location=f"cuda") Loading Done /root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/diffusers/configuration_utils.py:140: FutureWarning: Accessing config attribute `vae_latent_channels` directly via 'VaeImageProcessor' object attribute is deprecated. Please access 'vae_latent_channels' over 'VaeImageProcessor's config object instead, e.g. 'scheduler.config.vae_latent_channels'. deprecate("direct config name access", "1.0.0", deprecation_message, standard_warn=False) 0%| | 0/3 [00:00<?, ?it/s] 33%|███▎ | 1/3 [00:00<00:00, 4.31it/s] 100%|██████████| 3/3 [00:00<00:00, 6.05it/s] 100%|██████████| 3/3 [00:00<00:00, 5.81it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 7.18it/s] 100%|██████████| 3/3 [00:00<00:00, 5.56it/s] 100%|██████████| 3/3 [00:00<00:00, 5.82it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 7.07it/s] 100%|██████████| 3/3 [00:00<00:00, 5.46it/s] 100%|██████████| 3/3 [00:00<00:00, 5.72it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 7.02it/s] 100%|██████████| 3/3 [00:00<00:00, 5.37it/s] 100%|██████████| 3/3 [00:00<00:00, 5.63it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.85it/s] 100%|██████████| 3/3 [00:00<00:00, 5.35it/s] 100%|██████████| 3/3 [00:00<00:00, 5.59it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 7.02it/s] 100%|██████████| 3/3 [00:00<00:00, 5.42it/s] 100%|██████████| 3/3 [00:00<00:00, 5.67it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.99it/s] 100%|██████████| 3/3 [00:00<00:00, 5.30it/s] 100%|██████████| 3/3 [00:00<00:00, 5.57it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.84it/s] 100%|██████████| 3/3 [00:00<00:00, 5.27it/s] 100%|██████████| 3/3 [00:00<00:00, 5.52it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.84it/s] 100%|██████████| 3/3 [00:00<00:00, 5.29it/s] 100%|██████████| 3/3 [00:00<00:00, 5.53it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.82it/s] 100%|██████████| 3/3 [00:00<00:00, 5.20it/s] 100%|██████████| 3/3 [00:00<00:00, 5.46it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.77it/s] 100%|██████████| 3/3 [00:00<00:00, 5.23it/s] 100%|██████████| 3/3 [00:00<00:00, 5.47it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.62it/s] 100%|██████████| 3/3 [00:00<00:00, 5.08it/s] 100%|██████████| 3/3 [00:00<00:00, 5.32it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.56it/s] 100%|██████████| 3/3 [00:00<00:00, 5.06it/s] 100%|██████████| 3/3 [00:00<00:00, 5.30it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.52it/s] 100%|██████████| 3/3 [00:00<00:00, 5.01it/s] 100%|██████████| 3/3 [00:00<00:00, 5.25it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.55it/s] 100%|██████████| 3/3 [00:00<00:00, 5.02it/s] 100%|██████████| 3/3 [00:00<00:00, 5.26it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.35it/s] 100%|██████████| 3/3 [00:00<00:00, 4.93it/s] 100%|██████████| 3/3 [00:00<00:00, 5.16it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.31it/s] 100%|██████████| 3/3 [00:00<00:00, 4.90it/s] 100%|██████████| 3/3 [00:00<00:00, 5.13it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.37it/s] 100%|██████████| 3/3 [00:00<00:00, 4.90it/s] 100%|██████████| 3/3 [00:00<00:00, 5.14it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.31it/s] 100%|██████████| 3/3 [00:00<00:00, 4.91it/s] 100%|██████████| 3/3 [00:00<00:00, 5.14it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.45it/s] 100%|██████████| 3/3 [00:00<00:00, 4.98it/s] 100%|██████████| 3/3 [00:00<00:00, 5.21it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.42it/s] 100%|██████████| 3/3 [00:00<00:00, 4.99it/s] 100%|██████████| 3/3 [00:00<00:00, 5.22it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.52it/s] 100%|██████████| 3/3 [00:00<00:00, 5.02it/s] 100%|██████████| 3/3 [00:00<00:00, 5.26it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.67it/s] 100%|██████████| 3/3 [00:00<00:00, 5.09it/s] 100%|██████████| 3/3 [00:00<00:00, 5.34it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.61it/s] 100%|██████████| 3/3 [00:00<00:00, 5.12it/s] 100%|██████████| 3/3 [00:00<00:00, 5.36it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.65it/s] 100%|██████████| 3/3 [00:00<00:00, 5.14it/s] 100%|██████████| 3/3 [00:00<00:00, 5.39it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.58it/s] 100%|██████████| 3/3 [00:00<00:00, 5.13it/s] 100%|██████████| 3/3 [00:00<00:00, 5.36it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.73it/s] 100%|██████████| 3/3 [00:00<00:00, 5.16it/s] 100%|██████████| 3/3 [00:00<00:00, 5.41it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.78it/s] 100%|██████████| 3/3 [00:00<00:00, 5.19it/s] 100%|██████████| 3/3 [00:00<00:00, 5.45it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.83it/s] 100%|██████████| 3/3 [00:00<00:00, 5.22it/s] 100%|██████████| 3/3 [00:00<00:00, 5.47it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.71it/s] 100%|██████████| 3/3 [00:00<00:00, 5.21it/s] 100%|██████████| 3/3 [00:00<00:00, 5.45it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.79it/s] 100%|██████████| 3/3 [00:00<00:00, 5.22it/s] 100%|██████████| 3/3 [00:00<00:00, 5.47it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.83it/s] 100%|██████████| 3/3 [00:00<00:00, 5.20it/s] 100%|██████████| 3/3 [00:00<00:00, 5.46it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.89it/s] 100%|██████████| 3/3 [00:00<00:00, 5.23it/s] 100%|██████████| 3/3 [00:00<00:00, 5.49it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.72it/s] 100%|██████████| 3/3 [00:00<00:00, 5.20it/s] 100%|██████████| 3/3 [00:00<00:00, 5.44it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.77it/s] 100%|██████████| 3/3 [00:00<00:00, 5.19it/s] 100%|██████████| 3/3 [00:00<00:00, 5.44it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.75it/s] 100%|██████████| 3/3 [00:00<00:00, 5.20it/s] 100%|██████████| 3/3 [00:00<00:00, 5.44it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.81it/s] 100%|██████████| 3/3 [00:00<00:00, 5.19it/s] 100%|██████████| 3/3 [00:00<00:00, 5.44it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.75it/s] 100%|██████████| 3/3 [00:00<00:00, 5.21it/s] 100%|██████████| 3/3 [00:00<00:00, 5.46it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.64it/s] 100%|██████████| 3/3 [00:00<00:00, 5.16it/s] 100%|██████████| 3/3 [00:00<00:00, 5.40it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.66it/s] 100%|██████████| 3/3 [00:00<00:00, 5.12it/s] 100%|██████████| 3/3 [00:00<00:00, 5.37it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.70it/s] 100%|██████████| 3/3 [00:00<00:00, 5.16it/s] 100%|██████████| 3/3 [00:00<00:00, 5.41it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.64it/s] 100%|██████████| 3/3 [00:00<00:00, 5.12it/s] 100%|██████████| 3/3 [00:00<00:00, 5.36it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.66it/s] 100%|██████████| 3/3 [00:00<00:00, 5.10it/s] 100%|██████████| 3/3 [00:00<00:00, 5.35it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.68it/s] 100%|██████████| 3/3 [00:00<00:00, 5.11it/s] 100%|██████████| 3/3 [00:00<00:00, 5.36it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.55it/s] 100%|██████████| 3/3 [00:00<00:00, 5.09it/s] 100%|██████████| 3/3 [00:00<00:00, 5.32it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.53it/s] 100%|██████████| 3/3 [00:00<00:00, 5.06it/s] 100%|██████████| 3/3 [00:00<00:00, 5.30it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.51it/s] 100%|██████████| 3/3 [00:00<00:00, 5.05it/s] 100%|██████████| 3/3 [00:00<00:00, 5.29it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.54it/s] 100%|██████████| 3/3 [00:00<00:00, 5.06it/s] 100%|██████████| 3/3 [00:00<00:00, 5.30it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.53it/s] 100%|██████████| 3/3 [00:00<00:00, 5.04it/s] 100%|██████████| 3/3 [00:00<00:00, 5.28it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.59it/s] 100%|██████████| 3/3 [00:00<00:00, 5.11it/s] 100%|██████████| 3/3 [00:00<00:00, 5.34it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.56it/s] 100%|██████████| 3/3 [00:00<00:00, 5.09it/s] 100%|██████████| 3/3 [00:00<00:00, 5.33it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.54it/s] 100%|██████████| 3/3 [00:00<00:00, 5.07it/s] 100%|██████████| 3/3 [00:00<00:00, 5.31it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.60it/s] 100%|██████████| 3/3 [00:00<00:00, 5.08it/s] 100%|██████████| 3/3 [00:00<00:00, 5.32it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.65it/s] 100%|██████████| 3/3 [00:00<00:00, 5.11it/s] 100%|██████████| 3/3 [00:00<00:00, 5.36it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.71it/s] 100%|██████████| 3/3 [00:00<00:00, 5.13it/s] 100%|██████████| 3/3 [00:00<00:00, 5.38it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 6.68it/s] 100%|██████████| 3/3 [00:00<00:00, 5.15it/s] 100%|██████████| 3/3 [00:00<00:00, 5.39it/s] 0%| | 0/3 [00:00<?, ?it/s] 67%|██████▋ | 2/3 [00:00<00:00, 14.48it/s] 100%|██████████| 3/3 [00:00<00:00, 15.51it/s] Processing done, enjoy the results in invsr_output
Prediction
zsyoaoa/invsr:37eebabfInput
{ "seed": 12345, "in_path": "https://replicate.delivery/pbxt/M8qdPdSSjBxI2nYTtGJ0WhyNdLOQBhf2PPwaTF8I3ZUODsoF/0030.jpg", "num_steps": 1, "chopping_size": 128 }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client: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/M8qdPdSSjBxI2nYTtGJ0WhyNdLOQBhf2PPwaTF8I3ZUODsoF/0030.jpg", num_steps: 1, chopping_size: 128 } } ); 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
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client: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/M8qdPdSSjBxI2nYTtGJ0WhyNdLOQBhf2PPwaTF8I3ZUODsoF/0030.jpg", "num_steps": 1, "chopping_size": 128 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_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/M8qdPdSSjBxI2nYTtGJ0WhyNdLOQBhf2PPwaTF8I3ZUODsoF/0030.jpg", "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.
Output
We were unable to load these images. Please make sure the URLs are valid.
{ "input": "https://replicate.delivery/pbxt/M8qdPdSSjBxI2nYTtGJ0WhyNdLOQBhf2PPwaTF8I3ZUODsoF/0030.jpg", "outut": "https://replicate.delivery/czjl/nFFftdUtrNSRCiILFXT8tpuqezIhmiPiLd6DAWMwboV1Zv6TA/out.png" }
{ "completed_at": "2024-12-14T08:40:21.577634Z", "created_at": "2024-12-14T08:38:03.710000Z", "data_removed": false, "error": null, "id": "dc4mhvjgqsrge0ckrh8t646j04", "input": { "seed": 12345, "in_path": "https://replicate.delivery/pbxt/M8qdPdSSjBxI2nYTtGJ0WhyNdLOQBhf2PPwaTF8I3ZUODsoF/0030.jpg", "num_steps": 1, "chopping_size": 128 }, "logs": "Setting timesteps for inference: [200]\nDownloading: \"https://huggingface.co/OAOA/InvSR/resolve/main/noise_predictor_sd_turbo_v5.pth\" to /src/weights/noise_predictor_sd_turbo_v5.pth\n 0%| | 0.00/129M [00:00<?, ?B/s]\n 3%|▎ | 3.62M/129M [00:00<00:03, 36.2MB/s]\n 6%|▌ | 7.75M/129M [00:00<00:03, 40.2MB/s]\n 9%|▉ | 11.9M/129M [00:00<00:02, 41.2MB/s]\n 12%|█▏ | 16.1M/129M [00:00<00:02, 41.9MB/s]\n 16%|█▌ | 20.4M/129M [00:00<00:02, 42.1MB/s]\n 19%|█▉ | 24.5M/129M [00:00<00:02, 42.5MB/s]\n 22%|██▏ | 28.6M/129M [00:00<00:02, 42.2MB/s]\n 25%|██▌ | 32.9M/129M [00:00<00:02, 42.4MB/s]\n 29%|██▊ | 37.1M/129M [00:00<00:02, 42.6MB/s]\n 32%|███▏ | 41.4M/129M [00:01<00:02, 42.6MB/s]\n 35%|███▌ | 45.6M/129M [00:01<00:02, 42.5MB/s]\n 39%|███▊ | 49.9M/129M [00:01<00:01, 42.8MB/s]\n 42%|████▏ | 54.1M/129M [00:01<00:01, 42.9MB/s]\n 45%|████▌ | 58.4M/129M [00:01<00:01, 43.1MB/s]\n 48%|████▊ | 62.6M/129M [00:01<00:01, 43.2MB/s]\n 52%|█████▏ | 66.9M/129M [00:01<00:01, 43.2MB/s]\n 55%|█████▌ | 71.1M/129M [00:01<00:01, 43.2MB/s]\n 58%|█████▊ | 75.4M/129M [00:01<00:01, 43.2MB/s]\n 62%|██████▏ | 79.6M/129M [00:01<00:01, 43.1MB/s]\n 65%|██████▍ | 83.9M/129M [00:02<00:01, 43.0MB/s]\n 68%|██████▊ | 88.1M/129M [00:02<00:00, 43.2MB/s]\n 72%|███████▏ | 92.4M/129M [00:02<00:00, 43.3MB/s]\n 75%|███████▍ | 96.6M/129M [00:02<00:00, 43.1MB/s]\n 78%|███████▊ | 101M/129M [00:02<00:00, 43.0MB/s] \n 81%|████████▏ | 105M/129M [00:03<00:02, 11.9MB/s]\n 98%|█████████▊| 126M/129M [00:03<00:00, 33.9MB/s]\n100%|██████████| 129M/129M [00:03<00:00, 37.2MB/s]\nFetching 12 files: 0%| | 0/12 [00:00<?, ?it/s]\nFetching 12 files: 17%|█▋ | 2/12 [00:00<00:02, 3.60it/s]\nFetching 12 files: 33%|███▎ | 4/12 [00:32<01:16, 9.54s/it]\nFetching 12 files: 83%|████████▎ | 10/12 [01:22<00:17, 8.68s/it]\nFetching 12 files: 100%|██████████| 12/12 [01:22<00:00, 6.89s/it]\nLoading pipeline components...: 0%| | 0/5 [00:00<?, ?it/s]\nLoading pipeline components...: 20%|██ | 1/5 [00:00<00:01, 2.47it/s]\nLoading pipeline components...: 60%|██████ | 3/5 [00:04<00:03, 1.60s/it]\nLoading pipeline components...: 100%|██████████| 5/5 [00:06<00:00, 1.37s/it]\nLoading pipeline components...: 100%|██████████| 5/5 [00:06<00:00, 1.35s/it]\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...\n/src/sampler_invsr.py:101: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.\nstate = torch.load(ckpt_path, map_location=f\"cuda\")\nLoading Done\n/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/diffusers/configuration_utils.py:140: FutureWarning: Accessing config attribute `vae_latent_channels` directly via 'VaeImageProcessor' object attribute is deprecated. Please access 'vae_latent_channels' over 'VaeImageProcessor's config object instead, e.g. 'scheduler.config.vae_latent_channels'.\ndeprecate(\"direct config name access\", \"1.0.0\", deprecation_message, standard_warn=False)\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 3.94it/s]\n100%|██████████| 1/1 [00:00<00:00, 3.94it/s]\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 19.70it/s]\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 10.25it/s]\nProcessing done, enjoy the results in invsr_output", "metrics": { "predict_time": 101.967340773, "total_time": 137.867634 }, "output": "https://replicate.delivery/czjl/nFFftdUtrNSRCiILFXT8tpuqezIhmiPiLd6DAWMwboV1Zv6TA/out.png", "started_at": "2024-12-14T08:38:39.610294Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/fddq-42ljgjgaqgs2ltbwgp5vjk2cswqsuljeo6mkp7iwsapm6u4e6v4a", "get": "https://api.replicate.com/v1/predictions/dc4mhvjgqsrge0ckrh8t646j04", "cancel": "https://api.replicate.com/v1/predictions/dc4mhvjgqsrge0ckrh8t646j04/cancel" }, "version": "37eebabfb6cdc4be2892b884b96b361d6fedc9f6a934d2fa3c1a2f85f004b0f0" }
Generated inSetting timesteps for inference: [200] Downloading: "https://huggingface.co/OAOA/InvSR/resolve/main/noise_predictor_sd_turbo_v5.pth" to /src/weights/noise_predictor_sd_turbo_v5.pth 0%| | 0.00/129M [00:00<?, ?B/s] 3%|▎ | 3.62M/129M [00:00<00:03, 36.2MB/s] 6%|▌ | 7.75M/129M [00:00<00:03, 40.2MB/s] 9%|▉ | 11.9M/129M [00:00<00:02, 41.2MB/s] 12%|█▏ | 16.1M/129M [00:00<00:02, 41.9MB/s] 16%|█▌ | 20.4M/129M [00:00<00:02, 42.1MB/s] 19%|█▉ | 24.5M/129M [00:00<00:02, 42.5MB/s] 22%|██▏ | 28.6M/129M [00:00<00:02, 42.2MB/s] 25%|██▌ | 32.9M/129M [00:00<00:02, 42.4MB/s] 29%|██▊ | 37.1M/129M [00:00<00:02, 42.6MB/s] 32%|███▏ | 41.4M/129M [00:01<00:02, 42.6MB/s] 35%|███▌ | 45.6M/129M [00:01<00:02, 42.5MB/s] 39%|███▊ | 49.9M/129M [00:01<00:01, 42.8MB/s] 42%|████▏ | 54.1M/129M [00:01<00:01, 42.9MB/s] 45%|████▌ | 58.4M/129M [00:01<00:01, 43.1MB/s] 48%|████▊ | 62.6M/129M [00:01<00:01, 43.2MB/s] 52%|█████▏ | 66.9M/129M [00:01<00:01, 43.2MB/s] 55%|█████▌ | 71.1M/129M [00:01<00:01, 43.2MB/s] 58%|█████▊ | 75.4M/129M [00:01<00:01, 43.2MB/s] 62%|██████▏ | 79.6M/129M [00:01<00:01, 43.1MB/s] 65%|██████▍ | 83.9M/129M [00:02<00:01, 43.0MB/s] 68%|██████▊ | 88.1M/129M [00:02<00:00, 43.2MB/s] 72%|███████▏ | 92.4M/129M [00:02<00:00, 43.3MB/s] 75%|███████▍ | 96.6M/129M [00:02<00:00, 43.1MB/s] 78%|███████▊ | 101M/129M [00:02<00:00, 43.0MB/s] 81%|████████▏ | 105M/129M [00:03<00:02, 11.9MB/s] 98%|█████████▊| 126M/129M [00:03<00:00, 33.9MB/s] 100%|██████████| 129M/129M [00:03<00:00, 37.2MB/s] Fetching 12 files: 0%| | 0/12 [00:00<?, ?it/s] Fetching 12 files: 17%|█▋ | 2/12 [00:00<00:02, 3.60it/s] Fetching 12 files: 33%|███▎ | 4/12 [00:32<01:16, 9.54s/it] Fetching 12 files: 83%|████████▎ | 10/12 [01:22<00:17, 8.68s/it] Fetching 12 files: 100%|██████████| 12/12 [01:22<00:00, 6.89s/it] Loading pipeline components...: 0%| | 0/5 [00:00<?, ?it/s] Loading pipeline components...: 20%|██ | 1/5 [00:00<00:01, 2.47it/s] Loading pipeline components...: 60%|██████ | 3/5 [00:04<00:03, 1.60s/it] Loading pipeline components...: 100%|██████████| 5/5 [00:06<00:00, 1.37s/it] Loading pipeline components...: 100%|██████████| 5/5 [00:06<00:00, 1.35s/it] 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... /src/sampler_invsr.py:101: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. state = torch.load(ckpt_path, map_location=f"cuda") Loading Done /root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/diffusers/configuration_utils.py:140: FutureWarning: Accessing config attribute `vae_latent_channels` directly via 'VaeImageProcessor' object attribute is deprecated. Please access 'vae_latent_channels' over 'VaeImageProcessor's config object instead, e.g. 'scheduler.config.vae_latent_channels'. deprecate("direct config name access", "1.0.0", deprecation_message, standard_warn=False) 0%| | 0/1 [00:00<?, ?it/s] 100%|██████████| 1/1 [00:00<00:00, 3.94it/s] 100%|██████████| 1/1 [00:00<00:00, 3.94it/s] 0%| | 0/1 [00:00<?, ?it/s] 100%|██████████| 1/1 [00:00<00:00, 19.70it/s] 0%| | 0/1 [00:00<?, ?it/s] 100%|██████████| 1/1 [00:00<00:00, 10.25it/s] Processing done, enjoy the results in invsr_output
Prediction
zsyoaoa/invsr:37eebabfInput
{ "seed": 12345, "in_path": "https://replicate.delivery/pbxt/M8qhJrY5aD7tG40HumHd3gIIR3LXjMKThkOCNB1oSfGrimcu/32.jpg", "num_steps": 1, "chopping_size": 128 }
Install Replicate’s Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client: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/M8qhJrY5aD7tG40HumHd3gIIR3LXjMKThkOCNB1oSfGrimcu/32.jpg", num_steps: 1, chopping_size: 128 } } ); 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
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client: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/M8qhJrY5aD7tG40HumHd3gIIR3LXjMKThkOCNB1oSfGrimcu/32.jpg", "num_steps": 1, "chopping_size": 128 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_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/M8qhJrY5aD7tG40HumHd3gIIR3LXjMKThkOCNB1oSfGrimcu/32.jpg", "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.
Output
We were unable to load these images. Please make sure the URLs are valid.
{ "input": "https://replicate.delivery/pbxt/M8qhJrY5aD7tG40HumHd3gIIR3LXjMKThkOCNB1oSfGrimcu/32.jpg", "outut": "https://replicate.delivery/czjl/BqklqAF5Wu5XOxH2WQJ8lV5HzkMruQ9V74VacSfYecMUdv6TA/out.png" }
{ "completed_at": "2024-12-14T08:44:04.962719Z", "created_at": "2024-12-14T08:42:11.447000Z", "data_removed": false, "error": null, "id": "j2xw7errexrge0ckrhatgy909g", "input": { "seed": 12345, "in_path": "https://replicate.delivery/pbxt/M8qhJrY5aD7tG40HumHd3gIIR3LXjMKThkOCNB1oSfGrimcu/32.jpg", "num_steps": 1, "chopping_size": 128 }, "logs": "Setting timesteps for inference: [200]\nDownloading: \"https://huggingface.co/OAOA/InvSR/resolve/main/noise_predictor_sd_turbo_v5.pth\" to /src/weights/noise_predictor_sd_turbo_v5.pth\n 0%| | 0.00/129M [00:00<?, ?B/s]\n 8%|▊ | 9.88M/129M [00:00<00:01, 102MB/s]\n 26%|██▌ | 33.6M/129M [00:00<00:00, 188MB/s]\n 40%|███▉ | 51.6M/129M [00:00<00:01, 45.9MB/s]\n 48%|████▊ | 62.5M/129M [00:01<00:01, 44.9MB/s]\n 55%|█████▍ | 70.8M/129M [00:01<00:01, 44.3MB/s]\n 60%|██████ | 77.5M/129M [00:01<00:01, 44.0MB/s]\n 65%|██████▍ | 83.4M/129M [00:01<00:01, 42.5MB/s]\n 69%|██████▊ | 88.5M/129M [00:01<00:01, 42.3MB/s]\n 72%|███████▏ | 93.2M/129M [00:02<00:00, 42.4MB/s]\n 76%|███████▌ | 97.9M/129M [00:02<00:00, 43.0MB/s]\n 79%|███████▉ | 102M/129M [00:02<00:00, 43.1MB/s] \n 83%|████████▎ | 107M/129M [00:02<00:00, 42.7MB/s]\n 86%|████████▌ | 111M/129M [00:02<00:00, 42.8MB/s]\n 89%|████████▉ | 115M/129M [00:02<00:00, 43.0MB/s]\n 93%|█████████▎| 120M/129M [00:02<00:00, 42.8MB/s]\n 96%|█████████▌| 124M/129M [00:02<00:00, 40.1MB/s]\n 99%|█████████▉| 128M/129M [00:02<00:00, 40.8MB/s]\n100%|██████████| 129M/129M [00:02<00:00, 46.3MB/s]\nFetching 12 files: 0%| | 0/12 [00:00<?, ?it/s]\nFetching 12 files: 17%|█▋ | 2/12 [00:00<00:02, 4.21it/s]\nFetching 12 files: 33%|███▎ | 4/12 [00:32<01:17, 9.65s/it]\nFetching 12 files: 83%|████████▎ | 10/12 [01:23<00:17, 8.72s/it]\nFetching 12 files: 100%|██████████| 12/12 [01:23<00:00, 6.92s/it]\nLoading pipeline components...: 0%| | 0/5 [00:00<?, ?it/s]\nLoading pipeline components...: 20%|██ | 1/5 [00:00<00:03, 1.19it/s]\nLoading pipeline components...: 40%|████ | 2/5 [00:01<00:03, 1.01s/it]\nLoading pipeline components...: 80%|████████ | 4/5 [00:02<00:00, 2.43it/s]\nLoading pipeline components...: 100%|██████████| 5/5 [00:02<00:00, 2.96it/s]\nLoading pipeline components...: 100%|██████████| 5/5 [00:02<00:00, 2.22it/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...\n/src/sampler_invsr.py:101: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.\nstate = torch.load(ckpt_path, map_location=f\"cuda\")\nLoading Done\n/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/diffusers/configuration_utils.py:140: FutureWarning: Accessing config attribute `vae_latent_channels` directly via 'VaeImageProcessor' object attribute is deprecated. Please access 'vae_latent_channels' over 'VaeImageProcessor's config object instead, e.g. 'scheduler.config.vae_latent_channels'.\ndeprecate(\"direct config name access\", \"1.0.0\", deprecation_message, standard_warn=False)\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 4.53it/s]\n100%|██████████| 1/1 [00:00<00:00, 4.52it/s]\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 21.85it/s]\n 0%| | 0/1 [00:00<?, ?it/s]\n100%|██████████| 1/1 [00:00<00:00, 10.38it/s]\nProcessing done, enjoy the results in invsr_output", "metrics": { "predict_time": 96.037241225, "total_time": 113.515719 }, "output": "https://replicate.delivery/czjl/BqklqAF5Wu5XOxH2WQJ8lV5HzkMruQ9V74VacSfYecMUdv6TA/out.png", "started_at": "2024-12-14T08:42:28.925478Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/fddq-2q5gkhdzdt4tnofrkfrdklb4e3uv7jv6stgo56xqhojelc2254rq", "get": "https://api.replicate.com/v1/predictions/j2xw7errexrge0ckrhatgy909g", "cancel": "https://api.replicate.com/v1/predictions/j2xw7errexrge0ckrhatgy909g/cancel" }, "version": "37eebabfb6cdc4be2892b884b96b361d6fedc9f6a934d2fa3c1a2f85f004b0f0" }
Generated inSetting timesteps for inference: [200] Downloading: "https://huggingface.co/OAOA/InvSR/resolve/main/noise_predictor_sd_turbo_v5.pth" to /src/weights/noise_predictor_sd_turbo_v5.pth 0%| | 0.00/129M [00:00<?, ?B/s] 8%|▊ | 9.88M/129M [00:00<00:01, 102MB/s] 26%|██▌ | 33.6M/129M [00:00<00:00, 188MB/s] 40%|███▉ | 51.6M/129M [00:00<00:01, 45.9MB/s] 48%|████▊ | 62.5M/129M [00:01<00:01, 44.9MB/s] 55%|█████▍ | 70.8M/129M [00:01<00:01, 44.3MB/s] 60%|██████ | 77.5M/129M [00:01<00:01, 44.0MB/s] 65%|██████▍ | 83.4M/129M [00:01<00:01, 42.5MB/s] 69%|██████▊ | 88.5M/129M [00:01<00:01, 42.3MB/s] 72%|███████▏ | 93.2M/129M [00:02<00:00, 42.4MB/s] 76%|███████▌ | 97.9M/129M [00:02<00:00, 43.0MB/s] 79%|███████▉ | 102M/129M [00:02<00:00, 43.1MB/s] 83%|████████▎ | 107M/129M [00:02<00:00, 42.7MB/s] 86%|████████▌ | 111M/129M [00:02<00:00, 42.8MB/s] 89%|████████▉ | 115M/129M [00:02<00:00, 43.0MB/s] 93%|█████████▎| 120M/129M [00:02<00:00, 42.8MB/s] 96%|█████████▌| 124M/129M [00:02<00:00, 40.1MB/s] 99%|█████████▉| 128M/129M [00:02<00:00, 40.8MB/s] 100%|██████████| 129M/129M [00:02<00:00, 46.3MB/s] Fetching 12 files: 0%| | 0/12 [00:00<?, ?it/s] Fetching 12 files: 17%|█▋ | 2/12 [00:00<00:02, 4.21it/s] Fetching 12 files: 33%|███▎ | 4/12 [00:32<01:17, 9.65s/it] Fetching 12 files: 83%|████████▎ | 10/12 [01:23<00:17, 8.72s/it] Fetching 12 files: 100%|██████████| 12/12 [01:23<00:00, 6.92s/it] Loading pipeline components...: 0%| | 0/5 [00:00<?, ?it/s] Loading pipeline components...: 20%|██ | 1/5 [00:00<00:03, 1.19it/s] Loading pipeline components...: 40%|████ | 2/5 [00:01<00:03, 1.01s/it] Loading pipeline components...: 80%|████████ | 4/5 [00:02<00:00, 2.43it/s] Loading pipeline components...: 100%|██████████| 5/5 [00:02<00:00, 2.96it/s] Loading pipeline components...: 100%|██████████| 5/5 [00:02<00:00, 2.22it/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... /src/sampler_invsr.py:101: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. state = torch.load(ckpt_path, map_location=f"cuda") Loading Done /root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/diffusers/configuration_utils.py:140: FutureWarning: Accessing config attribute `vae_latent_channels` directly via 'VaeImageProcessor' object attribute is deprecated. Please access 'vae_latent_channels' over 'VaeImageProcessor's config object instead, e.g. 'scheduler.config.vae_latent_channels'. deprecate("direct config name access", "1.0.0", deprecation_message, standard_warn=False) 0%| | 0/1 [00:00<?, ?it/s] 100%|██████████| 1/1 [00:00<00:00, 4.53it/s] 100%|██████████| 1/1 [00:00<00:00, 4.52it/s] 0%| | 0/1 [00:00<?, ?it/s] 100%|██████████| 1/1 [00:00<00:00, 21.85it/s] 0%| | 0/1 [00:00<?, ?it/s] 100%|██████████| 1/1 [00:00<00:00, 10.38it/s] Processing done, enjoy the results in invsr_output
Want to make some of these yourself?
Run this model