fermatresearch / instant-paint
Very fast img2img for a collaboration with AI in real time
- Public
- 3.6K runs
-
L40S
Prediction
fermatresearch/instant-paint:aa101bb92b139b85469ec7f65f55eb8e5f7213aa99d2ccfd6ebf0c2c01665f5fIDcc4e4tdbmiymbpmf3hecrhbesqStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- prompt
- shot in the style of sksfer, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background
- scheduler
- LCM
- lora_scale
- 0.9
- num_outputs
- 1
- lora_weights
- https://pbxt.replicate.delivery/lCD5GVbdy17LO5fq9Kf3yOpRmIkJ1UIgU4mHrnfPqm2TkYfGB/trained_model.tar
- batched_prompt
- guidance_scale
- 1
- apply_watermark
- condition_scale
- 0.15
- negative_prompt
- prompt_strength
- 0.85
- num_inference_steps
- 4
{ "image": "https://replicate.delivery/pbxt/Jsg9vlvmQjmDQE0WAt1IveUYVLhith4Rd0qulErDvkW0AEhT/test.png", "prompt": "shot in the style of sksfer, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background", "scheduler": "LCM", "lora_scale": 0.9, "num_outputs": 1, "lora_weights": "https://pbxt.replicate.delivery/lCD5GVbdy17LO5fq9Kf3yOpRmIkJ1UIgU4mHrnfPqm2TkYfGB/trained_model.tar", "batched_prompt": false, "guidance_scale": 1, "apply_watermark": true, "condition_scale": 0.15, "negative_prompt": "", "prompt_strength": 0.85, "num_inference_steps": 4 }
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 fermatresearch/instant-paint using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "fermatresearch/instant-paint:aa101bb92b139b85469ec7f65f55eb8e5f7213aa99d2ccfd6ebf0c2c01665f5f", { input: { image: "https://replicate.delivery/pbxt/Jsg9vlvmQjmDQE0WAt1IveUYVLhith4Rd0qulErDvkW0AEhT/test.png", prompt: "shot in the style of sksfer, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background", scheduler: "LCM", lora_scale: 0.9, num_outputs: 1, lora_weights: "https://pbxt.replicate.delivery/lCD5GVbdy17LO5fq9Kf3yOpRmIkJ1UIgU4mHrnfPqm2TkYfGB/trained_model.tar", batched_prompt: false, guidance_scale: 1, apply_watermark: true, condition_scale: 0.15, negative_prompt: "", prompt_strength: 0.85, num_inference_steps: 4 } } ); // 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 fermatresearch/instant-paint using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "fermatresearch/instant-paint:aa101bb92b139b85469ec7f65f55eb8e5f7213aa99d2ccfd6ebf0c2c01665f5f", input={ "image": "https://replicate.delivery/pbxt/Jsg9vlvmQjmDQE0WAt1IveUYVLhith4Rd0qulErDvkW0AEhT/test.png", "prompt": "shot in the style of sksfer, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background", "scheduler": "LCM", "lora_scale": 0.9, "num_outputs": 1, "lora_weights": "https://pbxt.replicate.delivery/lCD5GVbdy17LO5fq9Kf3yOpRmIkJ1UIgU4mHrnfPqm2TkYfGB/trained_model.tar", "batched_prompt": False, "guidance_scale": 1, "apply_watermark": True, "condition_scale": 0.15, "negative_prompt": "", "prompt_strength": 0.85, "num_inference_steps": 4 } ) # To access the file URL: print(output[0].url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
Run fermatresearch/instant-paint 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": "fermatresearch/instant-paint:aa101bb92b139b85469ec7f65f55eb8e5f7213aa99d2ccfd6ebf0c2c01665f5f", "input": { "image": "https://replicate.delivery/pbxt/Jsg9vlvmQjmDQE0WAt1IveUYVLhith4Rd0qulErDvkW0AEhT/test.png", "prompt": "shot in the style of sksfer, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background", "scheduler": "LCM", "lora_scale": 0.9, "num_outputs": 1, "lora_weights": "https://pbxt.replicate.delivery/lCD5GVbdy17LO5fq9Kf3yOpRmIkJ1UIgU4mHrnfPqm2TkYfGB/trained_model.tar", "batched_prompt": false, "guidance_scale": 1, "apply_watermark": true, "condition_scale": 0.15, "negative_prompt": "", "prompt_strength": 0.85, "num_inference_steps": 4 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-11-15T11:31:15.535677Z", "created_at": "2023-11-15T11:31:08.784205Z", "data_removed": false, "error": null, "id": "cc4e4tdbmiymbpmf3hecrhbesq", "input": { "image": "https://replicate.delivery/pbxt/Jsg9vlvmQjmDQE0WAt1IveUYVLhith4Rd0qulErDvkW0AEhT/test.png", "prompt": "shot in the style of sksfer, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background", "scheduler": "LCM", "lora_scale": 0.9, "num_outputs": 1, "lora_weights": "https://pbxt.replicate.delivery/lCD5GVbdy17LO5fq9Kf3yOpRmIkJ1UIgU4mHrnfPqm2TkYfGB/trained_model.tar", "batched_prompt": false, "guidance_scale": 1, "apply_watermark": true, "condition_scale": 0.15, "negative_prompt": "", "prompt_strength": 0.85, "num_inference_steps": 4 }, "logs": "Using seed: 57192\nEnsuring enough disk space...\nFree disk space: 1448613199872\nDownloading weights: https://pbxt.replicate.delivery/lCD5GVbdy17LO5fq9Kf3yOpRmIkJ1UIgU4mHrnfPqm2TkYfGB/trained_model.tar\nb'Downloaded 186 MB bytes in 1.033s (180 MB/s)\\nExtracted 186 MB in 0.055s (3.4 GB/s)\\n'\nDownloaded weights in 1.3960444927215576 seconds\nLoading fine-tuned model\nDoes not have Unet. assume we are using LoRA\nLoading Unet LoRA\nPrompt: shot in the style of <s0><s1>, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background\nThe config attributes {'skip_prk_steps': True} were passed to LCMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.\n 0%| | 0/3 [00:00<?, ?it/s]/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/diffusers/models/attention_processor.py:1821: FutureWarning: `LoRAAttnProcessor2_0` is deprecated and will be removed in version 0.26.0. Make sure use AttnProcessor2_0 instead by settingLoRA layers to `self.{to_q,to_k,to_v,to_out[0]}.lora_layer` respectively. This will be done automatically when using `LoraLoaderMixin.load_lora_weights`\ndeprecate(\n 33%|███▎ | 1/3 [00:00<00:00, 4.88it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 4.92it/s]\n100%|██████████| 3/3 [00:00<00:00, 4.93it/s]\n100%|██████████| 3/3 [00:00<00:00, 4.92it/s]", "metrics": { "predict_time": 6.71805, "total_time": 6.751472 }, "output": [ "https://replicate.delivery/pbxt/zBzsQSS2w6JhAtX3Mmm5flxl1FBHEpXCQegMek46DpjFwLxjA/out-0.png" ], "started_at": "2023-11-15T11:31:08.817627Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/cc4e4tdbmiymbpmf3hecrhbesq", "cancel": "https://api.replicate.com/v1/predictions/cc4e4tdbmiymbpmf3hecrhbesq/cancel" }, "version": "aa101bb92b139b85469ec7f65f55eb8e5f7213aa99d2ccfd6ebf0c2c01665f5f" }
Generated inUsing seed: 57192 Ensuring enough disk space... Free disk space: 1448613199872 Downloading weights: https://pbxt.replicate.delivery/lCD5GVbdy17LO5fq9Kf3yOpRmIkJ1UIgU4mHrnfPqm2TkYfGB/trained_model.tar b'Downloaded 186 MB bytes in 1.033s (180 MB/s)\nExtracted 186 MB in 0.055s (3.4 GB/s)\n' Downloaded weights in 1.3960444927215576 seconds Loading fine-tuned model Does not have Unet. assume we are using LoRA Loading Unet LoRA Prompt: shot in the style of <s0><s1>, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background The config attributes {'skip_prk_steps': True} were passed to LCMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file. 0%| | 0/3 [00:00<?, ?it/s]/root/.pyenv/versions/3.10.13/lib/python3.10/site-packages/diffusers/models/attention_processor.py:1821: FutureWarning: `LoRAAttnProcessor2_0` is deprecated and will be removed in version 0.26.0. Make sure use AttnProcessor2_0 instead by settingLoRA layers to `self.{to_q,to_k,to_v,to_out[0]}.lora_layer` respectively. This will be done automatically when using `LoraLoaderMixin.load_lora_weights` deprecate( 33%|███▎ | 1/3 [00:00<00:00, 4.88it/s] 67%|██████▋ | 2/3 [00:00<00:00, 4.92it/s] 100%|██████████| 3/3 [00:00<00:00, 4.93it/s] 100%|██████████| 3/3 [00:00<00:00, 4.92it/s]
Prediction
fermatresearch/instant-paint:aa101bb92b139b85469ec7f65f55eb8e5f7213aa99d2ccfd6ebf0c2c01665f5fIDzxhur6tbf7t2655bzsoojccv7iStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- prompt
- shot in the style of sksfer, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background
- scheduler
- LCM
- lora_scale
- 0.9
- num_outputs
- 1
- lora_weights
- https://pbxt.replicate.delivery/N0wjHbJMAfRVZaYG3c80S2JsALy6Hr39oeWQfxcJOqwKIhPjA/trained_model.tar
- batched_prompt
- guidance_scale
- 1
- apply_watermark
- condition_scale
- 0.15
- negative_prompt
- prompt_strength
- 0.85
- num_inference_steps
- 4
{ "image": "https://replicate.delivery/pbxt/Jsg9vlvmQjmDQE0WAt1IveUYVLhith4Rd0qulErDvkW0AEhT/test.png", "prompt": "shot in the style of sksfer, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background", "scheduler": "LCM", "lora_scale": 0.9, "num_outputs": 1, "lora_weights": "https://pbxt.replicate.delivery/N0wjHbJMAfRVZaYG3c80S2JsALy6Hr39oeWQfxcJOqwKIhPjA/trained_model.tar", "batched_prompt": false, "guidance_scale": 1, "apply_watermark": true, "condition_scale": 0.15, "negative_prompt": "", "prompt_strength": 0.85, "num_inference_steps": 4 }
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 fermatresearch/instant-paint using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "fermatresearch/instant-paint:aa101bb92b139b85469ec7f65f55eb8e5f7213aa99d2ccfd6ebf0c2c01665f5f", { input: { image: "https://replicate.delivery/pbxt/Jsg9vlvmQjmDQE0WAt1IveUYVLhith4Rd0qulErDvkW0AEhT/test.png", prompt: "shot in the style of sksfer, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background", scheduler: "LCM", lora_scale: 0.9, num_outputs: 1, lora_weights: "https://pbxt.replicate.delivery/N0wjHbJMAfRVZaYG3c80S2JsALy6Hr39oeWQfxcJOqwKIhPjA/trained_model.tar", batched_prompt: false, guidance_scale: 1, apply_watermark: true, condition_scale: 0.15, negative_prompt: "", prompt_strength: 0.85, num_inference_steps: 4 } } ); // 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 fermatresearch/instant-paint using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "fermatresearch/instant-paint:aa101bb92b139b85469ec7f65f55eb8e5f7213aa99d2ccfd6ebf0c2c01665f5f", input={ "image": "https://replicate.delivery/pbxt/Jsg9vlvmQjmDQE0WAt1IveUYVLhith4Rd0qulErDvkW0AEhT/test.png", "prompt": "shot in the style of sksfer, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background", "scheduler": "LCM", "lora_scale": 0.9, "num_outputs": 1, "lora_weights": "https://pbxt.replicate.delivery/N0wjHbJMAfRVZaYG3c80S2JsALy6Hr39oeWQfxcJOqwKIhPjA/trained_model.tar", "batched_prompt": False, "guidance_scale": 1, "apply_watermark": True, "condition_scale": 0.15, "negative_prompt": "", "prompt_strength": 0.85, "num_inference_steps": 4 } ) # To access the file URL: print(output[0].url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
Run fermatresearch/instant-paint 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": "fermatresearch/instant-paint:aa101bb92b139b85469ec7f65f55eb8e5f7213aa99d2ccfd6ebf0c2c01665f5f", "input": { "image": "https://replicate.delivery/pbxt/Jsg9vlvmQjmDQE0WAt1IveUYVLhith4Rd0qulErDvkW0AEhT/test.png", "prompt": "shot in the style of sksfer, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background", "scheduler": "LCM", "lora_scale": 0.9, "num_outputs": 1, "lora_weights": "https://pbxt.replicate.delivery/N0wjHbJMAfRVZaYG3c80S2JsALy6Hr39oeWQfxcJOqwKIhPjA/trained_model.tar", "batched_prompt": false, "guidance_scale": 1, "apply_watermark": true, "condition_scale": 0.15, "negative_prompt": "", "prompt_strength": 0.85, "num_inference_steps": 4 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2023-11-15T11:27:07.458391Z", "created_at": "2023-11-15T11:27:03.880254Z", "data_removed": false, "error": null, "id": "zxhur6tbf7t2655bzsoojccv7i", "input": { "image": "https://replicate.delivery/pbxt/Jsg9vlvmQjmDQE0WAt1IveUYVLhith4Rd0qulErDvkW0AEhT/test.png", "prompt": "shot in the style of sksfer, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background", "scheduler": "LCM", "lora_scale": 0.9, "num_outputs": 1, "lora_weights": "https://pbxt.replicate.delivery/N0wjHbJMAfRVZaYG3c80S2JsALy6Hr39oeWQfxcJOqwKIhPjA/trained_model.tar", "batched_prompt": false, "guidance_scale": 1, "apply_watermark": true, "condition_scale": 0.15, "negative_prompt": "", "prompt_strength": 0.85, "num_inference_steps": 4 }, "logs": "Using seed: 30764\nskipping loading .. weights already loaded\nPrompt: shot in the style of <s0><s1>, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background\nThe config attributes {'skip_prk_steps': True} were passed to LCMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.\n 0%| | 0/3 [00:00<?, ?it/s]\n 33%|███▎ | 1/3 [00:00<00:00, 4.96it/s]\n 67%|██████▋ | 2/3 [00:00<00:00, 4.95it/s]\n100%|██████████| 3/3 [00:00<00:00, 4.95it/s]\n100%|██████████| 3/3 [00:00<00:00, 4.95it/s]", "metrics": { "predict_time": 3.533655, "total_time": 3.578137 }, "output": [ "https://replicate.delivery/pbxt/TT5XufweOzoTNEQc2PHZoJ5TLfb8vbx9rwAY4ekdfp5WhuEPC/out-0.png" ], "started_at": "2023-11-15T11:27:03.924736Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/zxhur6tbf7t2655bzsoojccv7i", "cancel": "https://api.replicate.com/v1/predictions/zxhur6tbf7t2655bzsoojccv7i/cancel" }, "version": "aa101bb92b139b85469ec7f65f55eb8e5f7213aa99d2ccfd6ebf0c2c01665f5f" }
Generated inUsing seed: 30764 skipping loading .. weights already loaded Prompt: shot in the style of <s0><s1>, a mushroom in a beautiful valley, insane amount of detail, flowers and mountains in the background The config attributes {'skip_prk_steps': True} were passed to LCMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file. 0%| | 0/3 [00:00<?, ?it/s] 33%|███▎ | 1/3 [00:00<00:00, 4.96it/s] 67%|██████▋ | 2/3 [00:00<00:00, 4.95it/s] 100%|██████████| 3/3 [00:00<00:00, 4.95it/s] 100%|██████████| 3/3 [00:00<00:00, 4.95it/s]
Want to make some of these yourself?
Run this model