andreasjansson / stable-diffusion-wip
(development branch) Inpainting for Stable Diffusion
- Public
- 13.4K runs
Prediction
andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7IDwi5pj7jb5zdghl2ujlvc52pwumStatusSucceededSourceWebHardware–Total durationCreatedInput
- width
- 512
- height
- 512
- prompt
- a photo of a cowboy wearing a cowboy hat
- num_outputs
- "4"
- guidance_scale
- 7.5
- prompt_strength
- 0.6
- num_inference_steps
- "100"
{ "mask": "https://replicate.delivery/mgxm/34b5189d-d051-4960-80b3-2a20dca3fc55/me-mask.png", "width": 512, "height": 512, "prompt": "a photo of a cowboy wearing a cowboy hat", "init_image": "https://replicate.delivery/mgxm/792e9cef-f3d6-497d-8f57-0acfc550f595/me.png", "num_outputs": "4", "guidance_scale": 7.5, "prompt_strength": 0.6, "num_inference_steps": "100" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/stable-diffusion-wip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", { input: { mask: "https://replicate.delivery/mgxm/34b5189d-d051-4960-80b3-2a20dca3fc55/me-mask.png", width: 512, height: 512, prompt: "a photo of a cowboy wearing a cowboy hat", init_image: "https://replicate.delivery/mgxm/792e9cef-f3d6-497d-8f57-0acfc550f595/me.png", num_outputs: "4", guidance_scale: 7.5, prompt_strength: 0.6, num_inference_steps: "100" } } ); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run andreasjansson/stable-diffusion-wip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", input={ "mask": "https://replicate.delivery/mgxm/34b5189d-d051-4960-80b3-2a20dca3fc55/me-mask.png", "width": 512, "height": 512, "prompt": "a photo of a cowboy wearing a cowboy hat", "init_image": "https://replicate.delivery/mgxm/792e9cef-f3d6-497d-8f57-0acfc550f595/me.png", "num_outputs": "4", "guidance_scale": 7.5, "prompt_strength": 0.6, "num_inference_steps": "100" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run andreasjansson/stable-diffusion-wip 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": "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", "input": { "mask": "https://replicate.delivery/mgxm/34b5189d-d051-4960-80b3-2a20dca3fc55/me-mask.png", "width": 512, "height": 512, "prompt": "a photo of a cowboy wearing a cowboy hat", "init_image": "https://replicate.delivery/mgxm/792e9cef-f3d6-497d-8f57-0acfc550f595/me.png", "num_outputs": "4", "guidance_scale": 7.5, "prompt_strength": 0.6, "num_inference_steps": "100" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-08-25T15:42:02.021740Z", "created_at": "2022-08-25T15:41:46.152114Z", "data_removed": false, "error": null, "id": "wi5pj7jb5zdghl2ujlvc52pwum", "input": { "mask": "https://replicate.delivery/mgxm/34b5189d-d051-4960-80b3-2a20dca3fc55/me-mask.png", "width": 512, "height": 512, "prompt": "a photo of a cowboy wearing a cowboy hat", "init_image": "https://replicate.delivery/mgxm/792e9cef-f3d6-497d-8f57-0acfc550f595/me.png", "num_outputs": "4", "guidance_scale": 7.5, "prompt_strength": 0.6, "num_inference_steps": "100" }, "logs": "Using seed: 8631\n\n0it [00:00, ?it/s]\n1it [00:00, 4.92it/s]\n2it [00:00, 5.36it/s]\n3it [00:00, 5.57it/s]\n4it [00:00, 5.68it/s]\n5it [00:00, 5.69it/s]\n6it [00:01, 5.74it/s]\n7it [00:01, 5.77it/s]\n8it [00:01, 5.79it/s]\n9it [00:01, 5.81it/s]\n10it [00:01, 5.83it/s]\n11it [00:01, 5.83it/s]\n12it [00:02, 5.83it/s]\n13it [00:02, 5.83it/s]\n14it [00:02, 5.84it/s]\n15it [00:02, 5.84it/s]\n16it [00:02, 5.85it/s]\n17it [00:02, 5.85it/s]\n18it [00:03, 5.84it/s]\n19it [00:03, 5.85it/s]\n20it [00:03, 5.85it/s]\n21it [00:03, 5.85it/s]\n22it [00:03, 5.85it/s]\n23it [00:03, 5.84it/s]\n24it [00:04, 5.84it/s]\n25it [00:04, 5.84it/s]\n26it [00:04, 5.84it/s]\n27it [00:04, 5.84it/s]\n28it [00:04, 5.84it/s]\n29it [00:05, 5.84it/s]\n30it [00:05, 5.84it/s]\n31it [00:05, 5.84it/s]\n32it [00:05, 5.84it/s]\n33it [00:05, 5.84it/s]\n34it [00:05, 5.84it/s]\n35it [00:06, 5.84it/s]\n36it [00:06, 5.84it/s]\n37it [00:06, 5.84it/s]\n38it [00:06, 5.84it/s]\n39it [00:06, 5.84it/s]\n40it [00:06, 5.85it/s]\n41it [00:07, 5.85it/s]\n42it [00:07, 5.85it/s]\n43it [00:07, 5.85it/s]\n44it [00:07, 5.85it/s]\n45it [00:07, 5.85it/s]\n46it [00:07, 5.85it/s]\n47it [00:08, 5.85it/s]\n48it [00:08, 5.84it/s]\n49it [00:08, 5.84it/s]\n50it [00:08, 5.85it/s]\n51it [00:08, 5.86it/s]\n52it [00:08, 5.86it/s]\n53it [00:09, 5.85it/s]\n54it [00:09, 5.84it/s]\n55it [00:09, 5.85it/s]\n56it [00:09, 5.85it/s]\n57it [00:09, 5.85it/s]\n58it [00:09, 5.86it/s]\n59it [00:10, 5.86it/s]\n60it [00:10, 5.85it/s]\n61it [00:10, 5.85it/s]\n62it [00:10, 5.85it/s]\n63it [00:10, 5.85it/s]\n64it [00:10, 5.85it/s]\n65it [00:11, 5.86it/s]\n66it [00:11, 5.85it/s]\n67it [00:11, 5.85it/s]\n68it [00:11, 5.86it/s]\n69it [00:11, 5.85it/s]\n69it [00:11, 5.83it/s]", "metrics": { "predict_time": 15.690243, "total_time": 15.869626 }, "output": [ "https://replicate.delivery/mgxm/b10f4430-5195-428f-9047-0ec64749ce38/out-0.png", "https://replicate.delivery/mgxm/eaf0df49-dc5e-45d3-b139-0372d08f8fe9/out-1.png", "https://replicate.delivery/mgxm/379047f8-4fbc-41d2-9e91-c1589c097320/out-2.png", "https://replicate.delivery/mgxm/8d87cc7d-c891-45ee-a5a2-df445abad1cb/out-3.png" ], "started_at": "2022-08-25T15:41:46.331497Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/wi5pj7jb5zdghl2ujlvc52pwum", "cancel": "https://api.replicate.com/v1/predictions/wi5pj7jb5zdghl2ujlvc52pwum/cancel" }, "version": "b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7" }
Generated inUsing seed: 8631 0it [00:00, ?it/s] 1it [00:00, 4.92it/s] 2it [00:00, 5.36it/s] 3it [00:00, 5.57it/s] 4it [00:00, 5.68it/s] 5it [00:00, 5.69it/s] 6it [00:01, 5.74it/s] 7it [00:01, 5.77it/s] 8it [00:01, 5.79it/s] 9it [00:01, 5.81it/s] 10it [00:01, 5.83it/s] 11it [00:01, 5.83it/s] 12it [00:02, 5.83it/s] 13it [00:02, 5.83it/s] 14it [00:02, 5.84it/s] 15it [00:02, 5.84it/s] 16it [00:02, 5.85it/s] 17it [00:02, 5.85it/s] 18it [00:03, 5.84it/s] 19it [00:03, 5.85it/s] 20it [00:03, 5.85it/s] 21it [00:03, 5.85it/s] 22it [00:03, 5.85it/s] 23it [00:03, 5.84it/s] 24it [00:04, 5.84it/s] 25it [00:04, 5.84it/s] 26it [00:04, 5.84it/s] 27it [00:04, 5.84it/s] 28it [00:04, 5.84it/s] 29it [00:05, 5.84it/s] 30it [00:05, 5.84it/s] 31it [00:05, 5.84it/s] 32it [00:05, 5.84it/s] 33it [00:05, 5.84it/s] 34it [00:05, 5.84it/s] 35it [00:06, 5.84it/s] 36it [00:06, 5.84it/s] 37it [00:06, 5.84it/s] 38it [00:06, 5.84it/s] 39it [00:06, 5.84it/s] 40it [00:06, 5.85it/s] 41it [00:07, 5.85it/s] 42it [00:07, 5.85it/s] 43it [00:07, 5.85it/s] 44it [00:07, 5.85it/s] 45it [00:07, 5.85it/s] 46it [00:07, 5.85it/s] 47it [00:08, 5.85it/s] 48it [00:08, 5.84it/s] 49it [00:08, 5.84it/s] 50it [00:08, 5.85it/s] 51it [00:08, 5.86it/s] 52it [00:08, 5.86it/s] 53it [00:09, 5.85it/s] 54it [00:09, 5.84it/s] 55it [00:09, 5.85it/s] 56it [00:09, 5.85it/s] 57it [00:09, 5.85it/s] 58it [00:09, 5.86it/s] 59it [00:10, 5.86it/s] 60it [00:10, 5.85it/s] 61it [00:10, 5.85it/s] 62it [00:10, 5.85it/s] 63it [00:10, 5.85it/s] 64it [00:10, 5.85it/s] 65it [00:11, 5.86it/s] 66it [00:11, 5.85it/s] 67it [00:11, 5.85it/s] 68it [00:11, 5.86it/s] 69it [00:11, 5.85it/s] 69it [00:11, 5.83it/s]
Prediction
andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7IDakmoxgumefghfck6ear3bsfvtyStatusSucceededSourceWebHardware–Total durationCreatedInput
- width
- 512
- height
- 512
- prompt
- modern apple watches with colorful hd displays, hanging from trees in a surrealist style
- num_outputs
- "1"
- guidance_scale
- "7.5"
- prompt_strength
- 0.5
- num_inference_steps
- "100"
{ "mask": "https://replicate.delivery/mgxm/2b11c416-a628-425a-9a95-ac2cb7866a8a/dali-mask.png", "width": 512, "height": 512, "prompt": "modern apple watches with colorful hd displays, hanging from trees in a surrealist style", "init_image": "https://replicate.delivery/mgxm/a40e022b-f7c7-4fcb-a009-a54e17487d6c/time-surrealism-watch-oil-wallpaper-preview.jpeg", "num_outputs": "1", "guidance_scale": "7.5", "prompt_strength": 0.5, "num_inference_steps": "100" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/stable-diffusion-wip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", { input: { mask: "https://replicate.delivery/mgxm/2b11c416-a628-425a-9a95-ac2cb7866a8a/dali-mask.png", width: 512, height: 512, prompt: "modern apple watches with colorful hd displays, hanging from trees in a surrealist style", init_image: "https://replicate.delivery/mgxm/a40e022b-f7c7-4fcb-a009-a54e17487d6c/time-surrealism-watch-oil-wallpaper-preview.jpeg", num_outputs: "1", guidance_scale: "7.5", prompt_strength: 0.5, num_inference_steps: "100" } } ); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run andreasjansson/stable-diffusion-wip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", input={ "mask": "https://replicate.delivery/mgxm/2b11c416-a628-425a-9a95-ac2cb7866a8a/dali-mask.png", "width": 512, "height": 512, "prompt": "modern apple watches with colorful hd displays, hanging from trees in a surrealist style", "init_image": "https://replicate.delivery/mgxm/a40e022b-f7c7-4fcb-a009-a54e17487d6c/time-surrealism-watch-oil-wallpaper-preview.jpeg", "num_outputs": "1", "guidance_scale": "7.5", "prompt_strength": 0.5, "num_inference_steps": "100" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run andreasjansson/stable-diffusion-wip 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": "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", "input": { "mask": "https://replicate.delivery/mgxm/2b11c416-a628-425a-9a95-ac2cb7866a8a/dali-mask.png", "width": 512, "height": 512, "prompt": "modern apple watches with colorful hd displays, hanging from trees in a surrealist style", "init_image": "https://replicate.delivery/mgxm/a40e022b-f7c7-4fcb-a009-a54e17487d6c/time-surrealism-watch-oil-wallpaper-preview.jpeg", "num_outputs": "1", "guidance_scale": "7.5", "prompt_strength": 0.5, "num_inference_steps": "100" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-08-25T16:06:26.665094Z", "created_at": "2022-08-25T16:06:20.693962Z", "data_removed": false, "error": null, "id": "akmoxgumefghfck6ear3bsfvty", "input": { "mask": "https://replicate.delivery/mgxm/2b11c416-a628-425a-9a95-ac2cb7866a8a/dali-mask.png", "width": 512, "height": 512, "prompt": "modern apple watches with colorful hd displays, hanging from trees in a surrealist style", "init_image": "https://replicate.delivery/mgxm/a40e022b-f7c7-4fcb-a009-a54e17487d6c/time-surrealism-watch-oil-wallpaper-preview.jpeg", "num_outputs": "1", "guidance_scale": "7.5", "prompt_strength": 0.5, "num_inference_steps": "100" }, "logs": "Using seed: 61373\n\n0it [00:00, ?it/s]\n2it [00:00, 11.35it/s]\n4it [00:00, 12.03it/s]\n6it [00:00, 12.68it/s]\n8it [00:00, 12.98it/s]\n10it [00:00, 13.12it/s]\n12it [00:00, 13.26it/s]\n14it [00:01, 12.93it/s]\n16it [00:01, 12.77it/s]\n18it [00:01, 12.98it/s]\n20it [00:01, 13.11it/s]\n22it [00:01, 13.19it/s]\n24it [00:01, 13.26it/s]\n26it [00:01, 13.32it/s]\n28it [00:02, 13.27it/s]\n30it [00:02, 13.26it/s]\n32it [00:02, 13.29it/s]\n34it [00:02, 13.31it/s]\n36it [00:02, 13.33it/s]\n38it [00:02, 13.31it/s]\n40it [00:03, 13.18it/s]\n42it [00:03, 13.15it/s]\n44it [00:03, 13.22it/s]\n46it [00:03, 13.20it/s]\n48it [00:03, 13.22it/s]\n50it [00:03, 13.25it/s]\n52it [00:03, 13.29it/s]\n54it [00:04, 13.20it/s]\n56it [00:04, 13.04it/s]\n58it [00:04, 13.08it/s]\n59it [00:04, 13.12it/s]", "metrics": { "predict_time": 5.757835, "total_time": 5.971132 }, "output": [ "https://replicate.delivery/mgxm/0cb97efb-8e76-4bd2-803b-4f3c60a37da0/out-0.png" ], "started_at": "2022-08-25T16:06:20.907259Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/akmoxgumefghfck6ear3bsfvty", "cancel": "https://api.replicate.com/v1/predictions/akmoxgumefghfck6ear3bsfvty/cancel" }, "version": "b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7" }
Generated inUsing seed: 61373 0it [00:00, ?it/s] 2it [00:00, 11.35it/s] 4it [00:00, 12.03it/s] 6it [00:00, 12.68it/s] 8it [00:00, 12.98it/s] 10it [00:00, 13.12it/s] 12it [00:00, 13.26it/s] 14it [00:01, 12.93it/s] 16it [00:01, 12.77it/s] 18it [00:01, 12.98it/s] 20it [00:01, 13.11it/s] 22it [00:01, 13.19it/s] 24it [00:01, 13.26it/s] 26it [00:01, 13.32it/s] 28it [00:02, 13.27it/s] 30it [00:02, 13.26it/s] 32it [00:02, 13.29it/s] 34it [00:02, 13.31it/s] 36it [00:02, 13.33it/s] 38it [00:02, 13.31it/s] 40it [00:03, 13.18it/s] 42it [00:03, 13.15it/s] 44it [00:03, 13.22it/s] 46it [00:03, 13.20it/s] 48it [00:03, 13.22it/s] 50it [00:03, 13.25it/s] 52it [00:03, 13.29it/s] 54it [00:04, 13.20it/s] 56it [00:04, 13.04it/s] 58it [00:04, 13.08it/s] 59it [00:04, 13.12it/s]
Prediction
andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7IDld5vtwt3xrh5dhh3p7vqawphxeStatusSucceededSourceWebHardware–Total durationCreatedInput
- width
- 512
- height
- 512
- prompt
- a huge battalion of alien spaceships attacking new york city with lasers
- num_outputs
- "4"
- guidance_scale
- 7.5
- prompt_strength
- 0.9
- num_inference_steps
- "100"
{ "mask": "https://replicate.delivery/mgxm/330ecb03-688d-43ad-bd31-fdd4e4e9cf00/nyc-mask.png", "width": 512, "height": 512, "prompt": "a huge battalion of alien spaceships attacking new york city with lasers", "init_image": "https://replicate.delivery/mgxm/b756e4a4-9f63-449a-a457-56b438910efe/nyc-4854718_1280.png", "num_outputs": "4", "guidance_scale": 7.5, "prompt_strength": 0.9, "num_inference_steps": "100" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/stable-diffusion-wip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", { input: { mask: "https://replicate.delivery/mgxm/330ecb03-688d-43ad-bd31-fdd4e4e9cf00/nyc-mask.png", width: 512, height: 512, prompt: "a huge battalion of alien spaceships attacking new york city with lasers", init_image: "https://replicate.delivery/mgxm/b756e4a4-9f63-449a-a457-56b438910efe/nyc-4854718_1280.png", num_outputs: "4", guidance_scale: 7.5, prompt_strength: 0.9, num_inference_steps: "100" } } ); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run andreasjansson/stable-diffusion-wip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", input={ "mask": "https://replicate.delivery/mgxm/330ecb03-688d-43ad-bd31-fdd4e4e9cf00/nyc-mask.png", "width": 512, "height": 512, "prompt": "a huge battalion of alien spaceships attacking new york city with lasers", "init_image": "https://replicate.delivery/mgxm/b756e4a4-9f63-449a-a457-56b438910efe/nyc-4854718_1280.png", "num_outputs": "4", "guidance_scale": 7.5, "prompt_strength": 0.9, "num_inference_steps": "100" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run andreasjansson/stable-diffusion-wip 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": "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", "input": { "mask": "https://replicate.delivery/mgxm/330ecb03-688d-43ad-bd31-fdd4e4e9cf00/nyc-mask.png", "width": 512, "height": 512, "prompt": "a huge battalion of alien spaceships attacking new york city with lasers", "init_image": "https://replicate.delivery/mgxm/b756e4a4-9f63-449a-a457-56b438910efe/nyc-4854718_1280.png", "num_outputs": "4", "guidance_scale": 7.5, "prompt_strength": 0.9, "num_inference_steps": "100" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-08-25T16:26:48.330745Z", "created_at": "2022-08-25T16:26:28.012051Z", "data_removed": false, "error": null, "id": "ld5vtwt3xrh5dhh3p7vqawphxe", "input": { "mask": "https://replicate.delivery/mgxm/330ecb03-688d-43ad-bd31-fdd4e4e9cf00/nyc-mask.png", "width": 512, "height": 512, "prompt": "a huge battalion of alien spaceships attacking new york city with lasers", "init_image": "https://replicate.delivery/mgxm/b756e4a4-9f63-449a-a457-56b438910efe/nyc-4854718_1280.png", "num_outputs": "4", "guidance_scale": 7.5, "prompt_strength": 0.9, "num_inference_steps": "100" }, "logs": "Using seed: 61556\n\n0it [00:00, ?it/s]\n1it [00:00, 5.40it/s]\n2it [00:00, 5.67it/s]\n3it [00:00, 5.75it/s]\n4it [00:00, 5.79it/s]\n5it [00:00, 5.82it/s]\n6it [00:01, 5.83it/s]\n7it [00:01, 5.84it/s]\n8it [00:01, 5.85it/s]\n9it [00:01, 5.85it/s]\n10it [00:01, 5.86it/s]\n11it [00:01, 5.86it/s]\n12it [00:02, 5.86it/s]\n13it [00:02, 5.86it/s]\n14it [00:02, 5.86it/s]\n15it [00:02, 5.86it/s]\n16it [00:02, 5.86it/s]\n17it [00:02, 5.86it/s]\n18it [00:03, 5.86it/s]\n19it [00:03, 5.86it/s]\n20it [00:03, 5.86it/s]\n21it [00:03, 5.86it/s]\n22it [00:03, 5.86it/s]\n23it [00:03, 5.86it/s]\n24it [00:04, 5.86it/s]\n25it [00:04, 5.86it/s]\n26it [00:04, 5.86it/s]\n27it [00:04, 5.86it/s]\n28it [00:04, 5.86it/s]\n29it [00:04, 5.86it/s]\n30it [00:05, 5.86it/s]\n31it [00:05, 5.86it/s]\n32it [00:05, 5.86it/s]\n33it [00:05, 5.86it/s]\n34it [00:05, 5.86it/s]\n35it [00:05, 5.86it/s]\n36it [00:06, 5.86it/s]\n37it [00:06, 5.86it/s]\n38it [00:06, 5.86it/s]\n39it [00:06, 5.86it/s]\n40it [00:06, 5.86it/s]\n41it [00:07, 5.86it/s]\n42it [00:07, 5.85it/s]\n43it [00:07, 5.86it/s]\n44it [00:07, 5.86it/s]\n45it [00:07, 5.86it/s]\n46it [00:07, 5.86it/s]\n47it [00:08, 5.86it/s]\n48it [00:08, 5.86it/s]\n49it [00:08, 5.86it/s]\n50it [00:08, 5.86it/s]\n51it [00:08, 5.86it/s]\n52it [00:08, 5.86it/s]\n53it [00:09, 5.86it/s]\n54it [00:09, 5.86it/s]\n55it [00:09, 5.86it/s]\n56it [00:09, 5.86it/s]\n57it [00:09, 5.86it/s]\n58it [00:09, 5.86it/s]\n59it [00:10, 5.86it/s]\n60it [00:10, 5.86it/s]\n61it [00:10, 5.86it/s]\n62it [00:10, 5.86it/s]\n63it [00:10, 5.86it/s]\n64it [00:10, 5.86it/s]\n65it [00:11, 5.86it/s]\n66it [00:11, 5.86it/s]\n67it [00:11, 5.86it/s]\n68it [00:11, 5.86it/s]\n69it [00:11, 5.86it/s]\n70it [00:11, 5.86it/s]\n71it [00:12, 5.86it/s]\n72it [00:12, 5.86it/s]\n73it [00:12, 5.86it/s]\n74it [00:12, 5.86it/s]\n75it [00:12, 5.86it/s]\n76it [00:12, 5.87it/s]\n77it [00:13, 5.87it/s]\n78it [00:13, 5.86it/s]\n79it [00:13, 5.87it/s]\n80it [00:13, 5.86it/s]\n81it [00:13, 5.86it/s]\n82it [00:14, 5.86it/s]\n83it [00:14, 5.87it/s]\n84it [00:14, 5.87it/s]\n85it [00:14, 5.87it/s]\n86it [00:14, 5.86it/s]\n87it [00:14, 5.86it/s]\n88it [00:15, 5.86it/s]\n89it [00:15, 5.86it/s]\n90it [00:15, 5.86it/s]\n91it [00:15, 5.86it/s]\n92it [00:15, 5.86it/s]\n93it [00:15, 5.86it/s]\n94it [00:16, 5.86it/s]\n95it [00:16, 5.86it/s]\n96it [00:16, 5.86it/s]\n97it [00:16, 5.86it/s]\n98it [00:16, 5.86it/s]\n99it [00:16, 5.86it/s]\n99it [00:16, 5.86it/s]", "metrics": { "predict_time": 20.140175, "total_time": 20.318694 }, "output": [ "https://replicate.delivery/mgxm/99b10f2c-ba37-4a2e-bf08-d590c0bf2fd5/out-0.png", "https://replicate.delivery/mgxm/55a5f2e2-a544-4247-9548-c1ad51fec259/out-1.png", "https://replicate.delivery/mgxm/df403aeb-71e4-47fd-a4e7-134d066e42a6/out-2.png", "https://replicate.delivery/mgxm/b037cf77-87fe-4199-ad30-a4dbbfdff357/out-3.png" ], "started_at": "2022-08-25T16:26:28.190570Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ld5vtwt3xrh5dhh3p7vqawphxe", "cancel": "https://api.replicate.com/v1/predictions/ld5vtwt3xrh5dhh3p7vqawphxe/cancel" }, "version": "b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7" }
Generated inUsing seed: 61556 0it [00:00, ?it/s] 1it [00:00, 5.40it/s] 2it [00:00, 5.67it/s] 3it [00:00, 5.75it/s] 4it [00:00, 5.79it/s] 5it [00:00, 5.82it/s] 6it [00:01, 5.83it/s] 7it [00:01, 5.84it/s] 8it [00:01, 5.85it/s] 9it [00:01, 5.85it/s] 10it [00:01, 5.86it/s] 11it [00:01, 5.86it/s] 12it [00:02, 5.86it/s] 13it [00:02, 5.86it/s] 14it [00:02, 5.86it/s] 15it [00:02, 5.86it/s] 16it [00:02, 5.86it/s] 17it [00:02, 5.86it/s] 18it [00:03, 5.86it/s] 19it [00:03, 5.86it/s] 20it [00:03, 5.86it/s] 21it [00:03, 5.86it/s] 22it [00:03, 5.86it/s] 23it [00:03, 5.86it/s] 24it [00:04, 5.86it/s] 25it [00:04, 5.86it/s] 26it [00:04, 5.86it/s] 27it [00:04, 5.86it/s] 28it [00:04, 5.86it/s] 29it [00:04, 5.86it/s] 30it [00:05, 5.86it/s] 31it [00:05, 5.86it/s] 32it [00:05, 5.86it/s] 33it [00:05, 5.86it/s] 34it [00:05, 5.86it/s] 35it [00:05, 5.86it/s] 36it [00:06, 5.86it/s] 37it [00:06, 5.86it/s] 38it [00:06, 5.86it/s] 39it [00:06, 5.86it/s] 40it [00:06, 5.86it/s] 41it [00:07, 5.86it/s] 42it [00:07, 5.85it/s] 43it [00:07, 5.86it/s] 44it [00:07, 5.86it/s] 45it [00:07, 5.86it/s] 46it [00:07, 5.86it/s] 47it [00:08, 5.86it/s] 48it [00:08, 5.86it/s] 49it [00:08, 5.86it/s] 50it [00:08, 5.86it/s] 51it [00:08, 5.86it/s] 52it [00:08, 5.86it/s] 53it [00:09, 5.86it/s] 54it [00:09, 5.86it/s] 55it [00:09, 5.86it/s] 56it [00:09, 5.86it/s] 57it [00:09, 5.86it/s] 58it [00:09, 5.86it/s] 59it [00:10, 5.86it/s] 60it [00:10, 5.86it/s] 61it [00:10, 5.86it/s] 62it [00:10, 5.86it/s] 63it [00:10, 5.86it/s] 64it [00:10, 5.86it/s] 65it [00:11, 5.86it/s] 66it [00:11, 5.86it/s] 67it [00:11, 5.86it/s] 68it [00:11, 5.86it/s] 69it [00:11, 5.86it/s] 70it [00:11, 5.86it/s] 71it [00:12, 5.86it/s] 72it [00:12, 5.86it/s] 73it [00:12, 5.86it/s] 74it [00:12, 5.86it/s] 75it [00:12, 5.86it/s] 76it [00:12, 5.87it/s] 77it [00:13, 5.87it/s] 78it [00:13, 5.86it/s] 79it [00:13, 5.87it/s] 80it [00:13, 5.86it/s] 81it [00:13, 5.86it/s] 82it [00:14, 5.86it/s] 83it [00:14, 5.87it/s] 84it [00:14, 5.87it/s] 85it [00:14, 5.87it/s] 86it [00:14, 5.86it/s] 87it [00:14, 5.86it/s] 88it [00:15, 5.86it/s] 89it [00:15, 5.86it/s] 90it [00:15, 5.86it/s] 91it [00:15, 5.86it/s] 92it [00:15, 5.86it/s] 93it [00:15, 5.86it/s] 94it [00:16, 5.86it/s] 95it [00:16, 5.86it/s] 96it [00:16, 5.86it/s] 97it [00:16, 5.86it/s] 98it [00:16, 5.86it/s] 99it [00:16, 5.86it/s] 99it [00:16, 5.86it/s]
Prediction
andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7IDr3dfg3du6zg5xl7aee255daomqStatusSucceededSourceWebHardware–Total durationCreatedInput
- width
- 512
- height
- 512
- prompt
- alien space ships
- num_outputs
- "1"
- guidance_scale
- 7.5
- prompt_strength
- 0.7
- num_inference_steps
- "100"
{ "mask": "https://replicate.delivery/mgxm/330ecb03-688d-43ad-bd31-fdd4e4e9cf00/nyc-mask.png", "width": 512, "height": 512, "prompt": "alien space ships", "init_image": "https://replicate.delivery/mgxm/b756e4a4-9f63-449a-a457-56b438910efe/nyc-4854718_1280.png", "num_outputs": "1", "guidance_scale": 7.5, "prompt_strength": 0.7, "num_inference_steps": "100" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/stable-diffusion-wip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", { input: { mask: "https://replicate.delivery/mgxm/330ecb03-688d-43ad-bd31-fdd4e4e9cf00/nyc-mask.png", width: 512, height: 512, prompt: "alien space ships", init_image: "https://replicate.delivery/mgxm/b756e4a4-9f63-449a-a457-56b438910efe/nyc-4854718_1280.png", num_outputs: "1", guidance_scale: 7.5, prompt_strength: 0.7, num_inference_steps: "100" } } ); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run andreasjansson/stable-diffusion-wip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", input={ "mask": "https://replicate.delivery/mgxm/330ecb03-688d-43ad-bd31-fdd4e4e9cf00/nyc-mask.png", "width": 512, "height": 512, "prompt": "alien space ships", "init_image": "https://replicate.delivery/mgxm/b756e4a4-9f63-449a-a457-56b438910efe/nyc-4854718_1280.png", "num_outputs": "1", "guidance_scale": 7.5, "prompt_strength": 0.7, "num_inference_steps": "100" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run andreasjansson/stable-diffusion-wip 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": "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", "input": { "mask": "https://replicate.delivery/mgxm/330ecb03-688d-43ad-bd31-fdd4e4e9cf00/nyc-mask.png", "width": 512, "height": 512, "prompt": "alien space ships", "init_image": "https://replicate.delivery/mgxm/b756e4a4-9f63-449a-a457-56b438910efe/nyc-4854718_1280.png", "num_outputs": "1", "guidance_scale": 7.5, "prompt_strength": 0.7, "num_inference_steps": "100" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-08-25T17:00:48.949533Z", "created_at": "2022-08-25T17:00:41.690768Z", "data_removed": false, "error": null, "id": "r3dfg3du6zg5xl7aee255daomq", "input": { "mask": "https://replicate.delivery/mgxm/330ecb03-688d-43ad-bd31-fdd4e4e9cf00/nyc-mask.png", "width": 512, "height": 512, "prompt": "alien space ships", "init_image": "https://replicate.delivery/mgxm/b756e4a4-9f63-449a-a457-56b438910efe/nyc-4854718_1280.png", "num_outputs": "1", "guidance_scale": 7.5, "prompt_strength": 0.7, "num_inference_steps": "100" }, "logs": "Using seed: 27139\n\n0it [00:00, ?it/s]\n2it [00:00, 12.20it/s]\n4it [00:00, 12.83it/s]\n6it [00:00, 13.06it/s]\n8it [00:00, 12.95it/s]\n10it [00:00, 13.11it/s]\n12it [00:00, 13.20it/s]\n14it [00:01, 13.25it/s]\n16it [00:01, 13.29it/s]\n18it [00:01, 13.18it/s]\n20it [00:01, 13.14it/s]\n22it [00:01, 12.98it/s]\n24it [00:01, 13.14it/s]\n26it [00:01, 13.31it/s]\n28it [00:02, 13.22it/s]\n30it [00:02, 13.14it/s]\n32it [00:02, 13.24it/s]\n34it [00:02, 13.19it/s]\n36it [00:02, 13.19it/s]\n38it [00:02, 13.29it/s]\n40it [00:03, 13.36it/s]\n42it [00:03, 13.29it/s]\n44it [00:03, 13.26it/s]\n46it [00:03, 13.32it/s]\n48it [00:03, 13.36it/s]\n50it [00:03, 13.28it/s]\n52it [00:03, 13.34it/s]\n54it [00:04, 13.35it/s]\n56it [00:04, 13.39it/s]\n58it [00:04, 13.34it/s]\n60it [00:04, 13.39it/s]\n62it [00:04, 13.38it/s]\n64it [00:04, 13.40it/s]\n66it [00:04, 13.42it/s]\n68it [00:05, 13.45it/s]\n70it [00:05, 13.49it/s]\n72it [00:05, 13.56it/s]\n74it [00:05, 13.60it/s]\n76it [00:05, 13.64it/s]\n78it [00:05, 13.65it/s]\n79it [00:05, 13.31it/s]", "metrics": { "predict_time": 7.07501, "total_time": 7.258765 }, "output": [ "https://replicate.delivery/mgxm/d818f5fe-e735-4a3b-874a-be0c2cb35cf7/out-0.png" ], "started_at": "2022-08-25T17:00:41.874523Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/r3dfg3du6zg5xl7aee255daomq", "cancel": "https://api.replicate.com/v1/predictions/r3dfg3du6zg5xl7aee255daomq/cancel" }, "version": "b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7" }
Generated inUsing seed: 27139 0it [00:00, ?it/s] 2it [00:00, 12.20it/s] 4it [00:00, 12.83it/s] 6it [00:00, 13.06it/s] 8it [00:00, 12.95it/s] 10it [00:00, 13.11it/s] 12it [00:00, 13.20it/s] 14it [00:01, 13.25it/s] 16it [00:01, 13.29it/s] 18it [00:01, 13.18it/s] 20it [00:01, 13.14it/s] 22it [00:01, 12.98it/s] 24it [00:01, 13.14it/s] 26it [00:01, 13.31it/s] 28it [00:02, 13.22it/s] 30it [00:02, 13.14it/s] 32it [00:02, 13.24it/s] 34it [00:02, 13.19it/s] 36it [00:02, 13.19it/s] 38it [00:02, 13.29it/s] 40it [00:03, 13.36it/s] 42it [00:03, 13.29it/s] 44it [00:03, 13.26it/s] 46it [00:03, 13.32it/s] 48it [00:03, 13.36it/s] 50it [00:03, 13.28it/s] 52it [00:03, 13.34it/s] 54it [00:04, 13.35it/s] 56it [00:04, 13.39it/s] 58it [00:04, 13.34it/s] 60it [00:04, 13.39it/s] 62it [00:04, 13.38it/s] 64it [00:04, 13.40it/s] 66it [00:04, 13.42it/s] 68it [00:05, 13.45it/s] 70it [00:05, 13.49it/s] 72it [00:05, 13.56it/s] 74it [00:05, 13.60it/s] 76it [00:05, 13.64it/s] 78it [00:05, 13.65it/s] 79it [00:05, 13.31it/s]
Prediction
andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7IDjm6bn4pyoje6rfwhc6sn7saxbyStatusSucceededSourceWebHardware–Total durationCreatedInput
- width
- 512
- height
- 512
- prompt
- angry godzilla
- num_outputs
- "1"
- guidance_scale
- 7.5
- prompt_strength
- 0.7
- num_inference_steps
- "100"
{ "mask": "https://replicate.delivery/mgxm/dc5488e0-d589-480b-825f-c02596700731/nyc-mask.png", "width": 512, "height": 512, "prompt": "angry godzilla", "init_image": "https://replicate.delivery/mgxm/d8f4574e-5c9a-4291-88ac-4eb53095f8d9/nyc-4854718_1280.png", "num_outputs": "1", "guidance_scale": 7.5, "prompt_strength": 0.7, "num_inference_steps": "100" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/stable-diffusion-wip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", { input: { mask: "https://replicate.delivery/mgxm/dc5488e0-d589-480b-825f-c02596700731/nyc-mask.png", width: 512, height: 512, prompt: "angry godzilla", init_image: "https://replicate.delivery/mgxm/d8f4574e-5c9a-4291-88ac-4eb53095f8d9/nyc-4854718_1280.png", num_outputs: "1", guidance_scale: 7.5, prompt_strength: 0.7, num_inference_steps: "100" } } ); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run andreasjansson/stable-diffusion-wip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", input={ "mask": "https://replicate.delivery/mgxm/dc5488e0-d589-480b-825f-c02596700731/nyc-mask.png", "width": 512, "height": 512, "prompt": "angry godzilla", "init_image": "https://replicate.delivery/mgxm/d8f4574e-5c9a-4291-88ac-4eb53095f8d9/nyc-4854718_1280.png", "num_outputs": "1", "guidance_scale": 7.5, "prompt_strength": 0.7, "num_inference_steps": "100" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run andreasjansson/stable-diffusion-wip 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": "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", "input": { "mask": "https://replicate.delivery/mgxm/dc5488e0-d589-480b-825f-c02596700731/nyc-mask.png", "width": 512, "height": 512, "prompt": "angry godzilla", "init_image": "https://replicate.delivery/mgxm/d8f4574e-5c9a-4291-88ac-4eb53095f8d9/nyc-4854718_1280.png", "num_outputs": "1", "guidance_scale": 7.5, "prompt_strength": 0.7, "num_inference_steps": "100" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-08-25T17:03:23.034683Z", "created_at": "2022-08-25T17:03:15.488074Z", "data_removed": false, "error": null, "id": "jm6bn4pyoje6rfwhc6sn7saxby", "input": { "mask": "https://replicate.delivery/mgxm/dc5488e0-d589-480b-825f-c02596700731/nyc-mask.png", "width": 512, "height": 512, "prompt": "angry godzilla", "init_image": "https://replicate.delivery/mgxm/d8f4574e-5c9a-4291-88ac-4eb53095f8d9/nyc-4854718_1280.png", "num_outputs": "1", "guidance_scale": 7.5, "prompt_strength": 0.7, "num_inference_steps": "100" }, "logs": "Using seed: 9846\n\n0it [00:00, ?it/s]\n2it [00:00, 11.86it/s]\n4it [00:00, 12.67it/s]\n6it [00:00, 12.75it/s]\n8it [00:00, 12.92it/s]\n10it [00:00, 13.16it/s]\n12it [00:00, 13.28it/s]\n14it [00:01, 13.40it/s]\n16it [00:01, 13.38it/s]\n18it [00:01, 13.41it/s]\n20it [00:01, 13.43it/s]\n22it [00:01, 13.32it/s]\n24it [00:01, 13.36it/s]\n26it [00:01, 13.34it/s]\n28it [00:02, 13.33it/s]\n30it [00:02, 13.37it/s]\n32it [00:02, 12.93it/s]\n34it [00:02, 12.94it/s]\n36it [00:02, 12.96it/s]\n38it [00:02, 12.90it/s]\n40it [00:03, 12.89it/s]\n42it [00:03, 13.02it/s]\n44it [00:03, 12.95it/s]\n46it [00:03, 12.98it/s]\n48it [00:03, 13.06it/s]\n50it [00:03, 13.05it/s]\n52it [00:03, 13.18it/s]\n54it [00:04, 13.12it/s]\n56it [00:04, 13.11it/s]\n58it [00:04, 12.98it/s]\n60it [00:04, 12.98it/s]\n62it [00:04, 12.99it/s]\n64it [00:04, 13.11it/s]\n66it [00:05, 13.17it/s]\n68it [00:05, 13.20it/s]\n70it [00:05, 13.23it/s]\n72it [00:05, 13.00it/s]\n74it [00:05, 12.93it/s]\n76it [00:05, 13.08it/s]\n78it [00:05, 13.20it/s]\n79it [00:06, 13.11it/s]", "metrics": { "predict_time": 7.305605, "total_time": 7.546609 }, "output": [ "https://replicate.delivery/mgxm/46124a05-918a-46c5-a50e-bbdb843438e9/out-0.png" ], "started_at": "2022-08-25T17:03:15.729078Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/jm6bn4pyoje6rfwhc6sn7saxby", "cancel": "https://api.replicate.com/v1/predictions/jm6bn4pyoje6rfwhc6sn7saxby/cancel" }, "version": "b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7" }
Generated inUsing seed: 9846 0it [00:00, ?it/s] 2it [00:00, 11.86it/s] 4it [00:00, 12.67it/s] 6it [00:00, 12.75it/s] 8it [00:00, 12.92it/s] 10it [00:00, 13.16it/s] 12it [00:00, 13.28it/s] 14it [00:01, 13.40it/s] 16it [00:01, 13.38it/s] 18it [00:01, 13.41it/s] 20it [00:01, 13.43it/s] 22it [00:01, 13.32it/s] 24it [00:01, 13.36it/s] 26it [00:01, 13.34it/s] 28it [00:02, 13.33it/s] 30it [00:02, 13.37it/s] 32it [00:02, 12.93it/s] 34it [00:02, 12.94it/s] 36it [00:02, 12.96it/s] 38it [00:02, 12.90it/s] 40it [00:03, 12.89it/s] 42it [00:03, 13.02it/s] 44it [00:03, 12.95it/s] 46it [00:03, 12.98it/s] 48it [00:03, 13.06it/s] 50it [00:03, 13.05it/s] 52it [00:03, 13.18it/s] 54it [00:04, 13.12it/s] 56it [00:04, 13.11it/s] 58it [00:04, 12.98it/s] 60it [00:04, 12.98it/s] 62it [00:04, 12.99it/s] 64it [00:04, 13.11it/s] 66it [00:05, 13.17it/s] 68it [00:05, 13.20it/s] 70it [00:05, 13.23it/s] 72it [00:05, 13.00it/s] 74it [00:05, 12.93it/s] 76it [00:05, 13.08it/s] 78it [00:05, 13.20it/s] 79it [00:06, 13.11it/s]
Prediction
andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7IDpavovg3zgvforlqdnqebkor2fuStatusSucceededSourceWebHardware–Total durationCreatedInput
- width
- 512
- height
- 512
- prompt
- angry godzilla
- num_outputs
- "1"
- guidance_scale
- 7.5
- prompt_strength
- 0.7
- num_inference_steps
- "100"
{ "mask": "https://replicate.delivery/mgxm/dc5488e0-d589-480b-825f-c02596700731/nyc-mask.png", "width": 512, "height": 512, "prompt": "angry godzilla", "init_image": "https://replicate.delivery/mgxm/d8f4574e-5c9a-4291-88ac-4eb53095f8d9/nyc-4854718_1280.png", "num_outputs": "1", "guidance_scale": 7.5, "prompt_strength": 0.7, "num_inference_steps": "100" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run andreasjansson/stable-diffusion-wip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", { input: { mask: "https://replicate.delivery/mgxm/dc5488e0-d589-480b-825f-c02596700731/nyc-mask.png", width: 512, height: 512, prompt: "angry godzilla", init_image: "https://replicate.delivery/mgxm/d8f4574e-5c9a-4291-88ac-4eb53095f8d9/nyc-4854718_1280.png", num_outputs: "1", guidance_scale: 7.5, prompt_strength: 0.7, num_inference_steps: "100" } } ); // To access the file URL: console.log(output[0].url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run andreasjansson/stable-diffusion-wip using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", input={ "mask": "https://replicate.delivery/mgxm/dc5488e0-d589-480b-825f-c02596700731/nyc-mask.png", "width": 512, "height": 512, "prompt": "angry godzilla", "init_image": "https://replicate.delivery/mgxm/d8f4574e-5c9a-4291-88ac-4eb53095f8d9/nyc-4854718_1280.png", "num_outputs": "1", "guidance_scale": 7.5, "prompt_strength": 0.7, "num_inference_steps": "100" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run andreasjansson/stable-diffusion-wip 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": "andreasjansson/stable-diffusion-wip:b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7", "input": { "mask": "https://replicate.delivery/mgxm/dc5488e0-d589-480b-825f-c02596700731/nyc-mask.png", "width": 512, "height": 512, "prompt": "angry godzilla", "init_image": "https://replicate.delivery/mgxm/d8f4574e-5c9a-4291-88ac-4eb53095f8d9/nyc-4854718_1280.png", "num_outputs": "1", "guidance_scale": 7.5, "prompt_strength": 0.7, "num_inference_steps": "100" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2022-08-25T17:06:58.554703Z", "created_at": "2022-08-25T17:06:50.609076Z", "data_removed": false, "error": null, "id": "pavovg3zgvforlqdnqebkor2fu", "input": { "mask": "https://replicate.delivery/mgxm/dc5488e0-d589-480b-825f-c02596700731/nyc-mask.png", "width": 512, "height": 512, "prompt": "angry godzilla", "init_image": "https://replicate.delivery/mgxm/d8f4574e-5c9a-4291-88ac-4eb53095f8d9/nyc-4854718_1280.png", "num_outputs": "1", "guidance_scale": 7.5, "prompt_strength": 0.7, "num_inference_steps": "100" }, "logs": "Using seed: 7913\n\n0it [00:00, ?it/s]\n1it [00:00, 9.70it/s]\n3it [00:00, 11.43it/s]\n5it [00:00, 11.63it/s]\n7it [00:00, 11.74it/s]\n9it [00:00, 12.19it/s]\n11it [00:00, 12.42it/s]\n13it [00:01, 12.46it/s]\n15it [00:01, 12.71it/s]\n17it [00:01, 12.79it/s]\n19it [00:01, 12.43it/s]\n21it [00:01, 12.03it/s]\n23it [00:01, 12.17it/s]\n25it [00:02, 12.17it/s]\n27it [00:02, 12.34it/s]\n29it [00:02, 12.41it/s]\n31it [00:02, 12.58it/s]\n33it [00:02, 12.28it/s]\n35it [00:02, 12.09it/s]\n37it [00:03, 12.08it/s]\n39it [00:03, 12.16it/s]\n41it [00:03, 11.80it/s]\n43it [00:03, 11.78it/s]\n45it [00:03, 12.09it/s]\n47it [00:03, 12.46it/s]\n49it [00:04, 12.67it/s]\n51it [00:04, 12.24it/s]\n53it [00:04, 12.01it/s]\n55it [00:04, 11.80it/s]\n57it [00:04, 11.93it/s]\n59it [00:04, 11.81it/s]\n61it [00:05, 11.77it/s]\n63it [00:05, 11.70it/s]\n65it [00:05, 11.96it/s]\n67it [00:05, 11.72it/s]\n69it [00:05, 11.95it/s]\n71it [00:05, 12.40it/s]\n73it [00:06, 12.20it/s]\n75it [00:06, 11.99it/s]\n77it [00:06, 11.79it/s]\n79it [00:06, 11.72it/s]\n79it [00:06, 12.07it/s]", "metrics": { "predict_time": 7.737198, "total_time": 7.945627 }, "output": [ "https://replicate.delivery/mgxm/23f303ac-3324-499f-9053-c11243d9ea8e/out-0.png" ], "started_at": "2022-08-25T17:06:50.817505Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/pavovg3zgvforlqdnqebkor2fu", "cancel": "https://api.replicate.com/v1/predictions/pavovg3zgvforlqdnqebkor2fu/cancel" }, "version": "b605bc2c60c7419dd3fdac55a9f3667e9cf802518cd9261c8c3dc61cdd2a64f7" }
Generated inUsing seed: 7913 0it [00:00, ?it/s] 1it [00:00, 9.70it/s] 3it [00:00, 11.43it/s] 5it [00:00, 11.63it/s] 7it [00:00, 11.74it/s] 9it [00:00, 12.19it/s] 11it [00:00, 12.42it/s] 13it [00:01, 12.46it/s] 15it [00:01, 12.71it/s] 17it [00:01, 12.79it/s] 19it [00:01, 12.43it/s] 21it [00:01, 12.03it/s] 23it [00:01, 12.17it/s] 25it [00:02, 12.17it/s] 27it [00:02, 12.34it/s] 29it [00:02, 12.41it/s] 31it [00:02, 12.58it/s] 33it [00:02, 12.28it/s] 35it [00:02, 12.09it/s] 37it [00:03, 12.08it/s] 39it [00:03, 12.16it/s] 41it [00:03, 11.80it/s] 43it [00:03, 11.78it/s] 45it [00:03, 12.09it/s] 47it [00:03, 12.46it/s] 49it [00:04, 12.67it/s] 51it [00:04, 12.24it/s] 53it [00:04, 12.01it/s] 55it [00:04, 11.80it/s] 57it [00:04, 11.93it/s] 59it [00:04, 11.81it/s] 61it [00:05, 11.77it/s] 63it [00:05, 11.70it/s] 65it [00:05, 11.96it/s] 67it [00:05, 11.72it/s] 69it [00:05, 11.95it/s] 71it [00:05, 12.40it/s] 73it [00:06, 12.20it/s] 75it [00:06, 11.99it/s] 77it [00:06, 11.79it/s] 79it [00:06, 11.72it/s] 79it [00:06, 12.07it/s]
Want to make some of these yourself?
Run this model