Readme
This model doesn't have a readme.
From Sketch to Reality: Transforming Outlines into Lifelike Images
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run qr2ai/outline using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"qr2ai/outline:6f713aeb58eb5034ad353de02d7dd56c9efa79f2214e6b89a790dad8ca67ef49",
{
input: {
seed: 0,
image: "https://replicate.delivery/pbxt/Lcg9dtkX66pSWfULefLA7UMExDQoonK9lmdA9y1R6kbEF9Q6/outline.png",
width: 1024,
height: 1024,
prompt: "Modern skyscraper, glass facade, urban skyline, clear day.",
sampler: "Euler a",
blur_size: 3,
use_canny: false,
lora_input: "",
lora_scale: "",
kernel_size: 3,
num_outputs: 1,
sketch_type: "HedPidNet",
suffix_prompt: "Futuristic Concept, Cutting-Edge Technology, Historical Landmark, Timeless Aesthetics, sharp focus, 8k, uhd, file grain, masterpiece",
guidance_scale: 7.5,
weight_primary: 0.7,
generate_square: false,
negative_prompt: "deformed, animation, anime, cartoon, comic, cropped, out of frame, low res, draft, cgi, low quality render, thumbnail",
weight_secondary: 0.6,
erosion_iterations: 2,
dilation_iterations: 1,
num_inference_steps: 35,
adapter_conditioning_scale: 0.9
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run qr2ai/outline using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"qr2ai/outline:6f713aeb58eb5034ad353de02d7dd56c9efa79f2214e6b89a790dad8ca67ef49",
input={
"seed": 0,
"image": "https://replicate.delivery/pbxt/Lcg9dtkX66pSWfULefLA7UMExDQoonK9lmdA9y1R6kbEF9Q6/outline.png",
"width": 1024,
"height": 1024,
"prompt": "Modern skyscraper, glass facade, urban skyline, clear day.",
"sampler": "Euler a",
"blur_size": 3,
"use_canny": False,
"lora_input": "",
"lora_scale": "",
"kernel_size": 3,
"num_outputs": 1,
"sketch_type": "HedPidNet",
"suffix_prompt": "Futuristic Concept, Cutting-Edge Technology, Historical Landmark, Timeless Aesthetics, sharp focus, 8k, uhd, file grain, masterpiece",
"guidance_scale": 7.5,
"weight_primary": 0.7,
"generate_square": False,
"negative_prompt": "deformed, animation, anime, cartoon, comic, cropped, out of frame, low res, draft, cgi, low quality render, thumbnail",
"weight_secondary": 0.6,
"erosion_iterations": 2,
"dilation_iterations": 1,
"num_inference_steps": 35,
"adapter_conditioning_scale": 0.9
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run qr2ai/outline 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": "6f713aeb58eb5034ad353de02d7dd56c9efa79f2214e6b89a790dad8ca67ef49",
"input": {
"seed": 0,
"image": "https://replicate.delivery/pbxt/Lcg9dtkX66pSWfULefLA7UMExDQoonK9lmdA9y1R6kbEF9Q6/outline.png",
"width": 1024,
"height": 1024,
"prompt": "Modern skyscraper, glass facade, urban skyline, clear day.",
"sampler": "Euler a",
"blur_size": 3,
"use_canny": false,
"lora_input": "",
"lora_scale": "",
"kernel_size": 3,
"num_outputs": 1,
"sketch_type": "HedPidNet",
"suffix_prompt": "Futuristic Concept, Cutting-Edge Technology, Historical Landmark, Timeless Aesthetics, sharp focus, 8k, uhd, file grain, masterpiece",
"guidance_scale": 7.5,
"weight_primary": 0.7,
"generate_square": false,
"negative_prompt": "deformed, animation, anime, cartoon, comic, cropped, out of frame, low res, draft, cgi, low quality render, thumbnail",
"weight_secondary": 0.6,
"erosion_iterations": 2,
"dilation_iterations": 1,
"num_inference_steps": 35,
"adapter_conditioning_scale": 0.9
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/qr2ai/outline@sha256:6f713aeb58eb5034ad353de02d7dd56c9efa79f2214e6b89a790dad8ca67ef49 \
-i 'seed=0' \
-i 'image="https://replicate.delivery/pbxt/Lcg9dtkX66pSWfULefLA7UMExDQoonK9lmdA9y1R6kbEF9Q6/outline.png"' \
-i 'width=1024' \
-i 'height=1024' \
-i 'prompt="Modern skyscraper, glass facade, urban skyline, clear day."' \
-i 'sampler="Euler a"' \
-i 'blur_size=3' \
-i 'use_canny=false' \
-i 'lora_input=""' \
-i 'lora_scale=""' \
-i 'kernel_size=3' \
-i 'num_outputs=1' \
-i 'sketch_type="HedPidNet"' \
-i 'suffix_prompt="Futuristic Concept, Cutting-Edge Technology, Historical Landmark, Timeless Aesthetics, sharp focus, 8k, uhd, file grain, masterpiece"' \
-i 'guidance_scale=7.5' \
-i 'weight_primary=0.7' \
-i 'generate_square=false' \
-i 'negative_prompt="deformed, animation, anime, cartoon, comic, cropped, out of frame, low res, draft, cgi, low quality render, thumbnail"' \
-i 'weight_secondary=0.6' \
-i 'erosion_iterations=2' \
-i 'dilation_iterations=1' \
-i 'num_inference_steps=35' \
-i 'adapter_conditioning_scale=0.9'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/qr2ai/outline@sha256:6f713aeb58eb5034ad353de02d7dd56c9efa79f2214e6b89a790dad8ca67ef49
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": 0, "image": "https://replicate.delivery/pbxt/Lcg9dtkX66pSWfULefLA7UMExDQoonK9lmdA9y1R6kbEF9Q6/outline.png", "width": 1024, "height": 1024, "prompt": "Modern skyscraper, glass facade, urban skyline, clear day.", "sampler": "Euler a", "blur_size": 3, "use_canny": false, "lora_input": "", "lora_scale": "", "kernel_size": 3, "num_outputs": 1, "sketch_type": "HedPidNet", "suffix_prompt": "Futuristic Concept, Cutting-Edge Technology, Historical Landmark, Timeless Aesthetics, sharp focus, 8k, uhd, file grain, masterpiece", "guidance_scale": 7.5, "weight_primary": 0.7, "generate_square": false, "negative_prompt": "deformed, animation, anime, cartoon, comic, cropped, out of frame, low res, draft, cgi, low quality render, thumbnail", "weight_secondary": 0.6, "erosion_iterations": 2, "dilation_iterations": 1, "num_inference_steps": 35, "adapter_conditioning_scale": 0.9 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.059. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
{
"completed_at": "2024-11-08T00:18:12.061381Z",
"created_at": "2024-11-08T00:17:57.145000Z",
"data_removed": false,
"error": null,
"id": "q5c36e43k5rj60ck14hatd9324",
"input": {
"seed": 0,
"image": "https://replicate.delivery/pbxt/Lcg9dtkX66pSWfULefLA7UMExDQoonK9lmdA9y1R6kbEF9Q6/outline.png",
"width": 1024,
"height": 1024,
"prompt": "Modern skyscraper, glass facade, urban skyline, clear day.",
"sampler": "Euler a",
"blur_size": 3,
"use_canny": false,
"lora_input": "",
"lora_scale": "",
"kernel_size": 3,
"num_outputs": 1,
"sketch_type": "HedPidNet",
"suffix_prompt": "Futuristic Concept, Cutting-Edge Technology, Historical Landmark, Timeless Aesthetics, sharp focus, 8k, uhd, file grain, masterpiece",
"guidance_scale": 7.5,
"weight_primary": 0.7,
"generate_square": false,
"negative_prompt": "deformed, animation, anime, cartoon, comic, cropped, out of frame, low res, draft, cgi, low quality render, thumbnail",
"weight_secondary": 0.6,
"erosion_iterations": 2,
"dilation_iterations": 1,
"num_inference_steps": 35,
"adapter_conditioning_scale": 0.9
},
"logs": "INFO:root:Image loaded successfully.\nINFO:root:HED sketch generated successfully.\nINFO:root:PidiNet sketch generated successfully.\nINFO:root:Combined HED and PidiNet sketches with weights 0.5384615384615385/0.46153846153846156.\nINFO:root:Random seed generated: 707529904\n 0%| | 0/35 [00:00<?, ?it/s]\n 3%|▎ | 1/35 [00:00<00:05, 5.67it/s]\n 6%|▌ | 2/35 [00:00<00:04, 7.09it/s]\n 9%|▊ | 3/35 [00:00<00:04, 7.71it/s]\n 11%|█▏ | 4/35 [00:00<00:03, 8.05it/s]\n 14%|█▍ | 5/35 [00:00<00:03, 8.25it/s]\n 17%|█▋ | 6/35 [00:00<00:03, 8.38it/s]\n 20%|██ | 7/35 [00:00<00:03, 8.46it/s]\n 23%|██▎ | 8/35 [00:00<00:03, 8.50it/s]\n 26%|██▌ | 9/35 [00:01<00:03, 8.52it/s]\n 29%|██▊ | 10/35 [00:01<00:02, 8.56it/s]\n 31%|███▏ | 11/35 [00:01<00:02, 8.58it/s]\n 34%|███▍ | 12/35 [00:01<00:02, 8.60it/s]\n 37%|███▋ | 13/35 [00:01<00:02, 8.61it/s]\n 40%|████ | 14/35 [00:01<00:02, 8.62it/s]\n 43%|████▎ | 15/35 [00:01<00:02, 8.62it/s]\n 46%|████▌ | 16/35 [00:01<00:02, 8.63it/s]\n 49%|████▊ | 17/35 [00:02<00:02, 8.63it/s]\n 51%|█████▏ | 18/35 [00:02<00:01, 8.63it/s]\n 54%|█████▍ | 19/35 [00:02<00:01, 8.63it/s]\n 57%|█████▋ | 20/35 [00:02<00:01, 8.63it/s]\n 60%|██████ | 21/35 [00:02<00:01, 8.63it/s]\n 63%|██████▎ | 22/35 [00:02<00:01, 8.64it/s]\n 66%|██████▌ | 23/35 [00:02<00:01, 8.64it/s]\n 69%|██████▊ | 24/35 [00:02<00:01, 8.64it/s]\n 71%|███████▏ | 25/35 [00:02<00:01, 8.64it/s]\n 74%|███████▍ | 26/35 [00:03<00:01, 8.64it/s]\n 77%|███████▋ | 27/35 [00:03<00:00, 8.64it/s]\n 80%|████████ | 28/35 [00:03<00:00, 8.64it/s]\n 83%|████████▎ | 29/35 [00:03<00:00, 8.63it/s]\n 86%|████████▌ | 30/35 [00:03<00:00, 8.63it/s]\n 89%|████████▊ | 31/35 [00:03<00:00, 8.64it/s]\n 91%|█████████▏| 32/35 [00:03<00:00, 8.64it/s]\n 94%|█████████▍| 33/35 [00:03<00:00, 8.54it/s]\n 97%|█████████▋| 34/35 [00:04<00:00, 8.57it/s]\n100%|██████████| 35/35 [00:04<00:00, 8.59it/s]\n100%|██████████| 35/35 [00:04<00:00, 8.49it/s]\nINFO:root:Image generation completed successfully.",
"metrics": {
"predict_time": 9.275241489999999,
"total_time": 14.916381
},
"output": [
"https://replicate.delivery/yhqm/bUwt9mqcX9ZENB2KyEUWxGqEm2HCKNtReiC7tqjTcUeErwuTA/output_0.png"
],
"started_at": "2024-11-08T00:18:02.786140Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/qoxq-46kfyl4iue3l43swtbhbyrmlfblbz235obwiy7tfhfwc3tuwbkwq",
"get": "https://api.replicate.com/v1/predictions/q5c36e43k5rj60ck14hatd9324",
"cancel": "https://api.replicate.com/v1/predictions/q5c36e43k5rj60ck14hatd9324/cancel"
},
"version": "6f713aeb58eb5034ad353de02d7dd56c9efa79f2214e6b89a790dad8ca67ef49"
}
INFO:root:Image loaded successfully.
INFO:root:HED sketch generated successfully.
INFO:root:PidiNet sketch generated successfully.
INFO:root:Combined HED and PidiNet sketches with weights 0.5384615384615385/0.46153846153846156.
INFO:root:Random seed generated: 707529904
0%| | 0/35 [00:00<?, ?it/s]
3%|▎ | 1/35 [00:00<00:05, 5.67it/s]
6%|▌ | 2/35 [00:00<00:04, 7.09it/s]
9%|▊ | 3/35 [00:00<00:04, 7.71it/s]
11%|█▏ | 4/35 [00:00<00:03, 8.05it/s]
14%|█▍ | 5/35 [00:00<00:03, 8.25it/s]
17%|█▋ | 6/35 [00:00<00:03, 8.38it/s]
20%|██ | 7/35 [00:00<00:03, 8.46it/s]
23%|██▎ | 8/35 [00:00<00:03, 8.50it/s]
26%|██▌ | 9/35 [00:01<00:03, 8.52it/s]
29%|██▊ | 10/35 [00:01<00:02, 8.56it/s]
31%|███▏ | 11/35 [00:01<00:02, 8.58it/s]
34%|███▍ | 12/35 [00:01<00:02, 8.60it/s]
37%|███▋ | 13/35 [00:01<00:02, 8.61it/s]
40%|████ | 14/35 [00:01<00:02, 8.62it/s]
43%|████▎ | 15/35 [00:01<00:02, 8.62it/s]
46%|████▌ | 16/35 [00:01<00:02, 8.63it/s]
49%|████▊ | 17/35 [00:02<00:02, 8.63it/s]
51%|█████▏ | 18/35 [00:02<00:01, 8.63it/s]
54%|█████▍ | 19/35 [00:02<00:01, 8.63it/s]
57%|█████▋ | 20/35 [00:02<00:01, 8.63it/s]
60%|██████ | 21/35 [00:02<00:01, 8.63it/s]
63%|██████▎ | 22/35 [00:02<00:01, 8.64it/s]
66%|██████▌ | 23/35 [00:02<00:01, 8.64it/s]
69%|██████▊ | 24/35 [00:02<00:01, 8.64it/s]
71%|███████▏ | 25/35 [00:02<00:01, 8.64it/s]
74%|███████▍ | 26/35 [00:03<00:01, 8.64it/s]
77%|███████▋ | 27/35 [00:03<00:00, 8.64it/s]
80%|████████ | 28/35 [00:03<00:00, 8.64it/s]
83%|████████▎ | 29/35 [00:03<00:00, 8.63it/s]
86%|████████▌ | 30/35 [00:03<00:00, 8.63it/s]
89%|████████▊ | 31/35 [00:03<00:00, 8.64it/s]
91%|█████████▏| 32/35 [00:03<00:00, 8.64it/s]
94%|█████████▍| 33/35 [00:03<00:00, 8.54it/s]
97%|█████████▋| 34/35 [00:04<00:00, 8.57it/s]
100%|██████████| 35/35 [00:04<00:00, 8.59it/s]
100%|██████████| 35/35 [00:04<00:00, 8.49it/s]
INFO:root:Image generation completed successfully.
This model costs approximately $0.059 to run on Replicate, or 16 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.
This model runs on Nvidia A100 (80GB) GPU hardware. Predictions typically complete within 43 seconds. The predict time for this model varies significantly based on the inputs.
This model doesn't have a readme.
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
Choose a file from your machine
Hint: you can also drag files onto the input
INFO:root:Image loaded successfully.
INFO:root:HED sketch generated successfully.
INFO:root:PidiNet sketch generated successfully.
INFO:root:Combined HED and PidiNet sketches with weights 0.5384615384615385/0.46153846153846156.
INFO:root:Random seed generated: 707529904
0%| | 0/35 [00:00<?, ?it/s]
3%|▎ | 1/35 [00:00<00:05, 5.67it/s]
6%|▌ | 2/35 [00:00<00:04, 7.09it/s]
9%|▊ | 3/35 [00:00<00:04, 7.71it/s]
11%|█▏ | 4/35 [00:00<00:03, 8.05it/s]
14%|█▍ | 5/35 [00:00<00:03, 8.25it/s]
17%|█▋ | 6/35 [00:00<00:03, 8.38it/s]
20%|██ | 7/35 [00:00<00:03, 8.46it/s]
23%|██▎ | 8/35 [00:00<00:03, 8.50it/s]
26%|██▌ | 9/35 [00:01<00:03, 8.52it/s]
29%|██▊ | 10/35 [00:01<00:02, 8.56it/s]
31%|███▏ | 11/35 [00:01<00:02, 8.58it/s]
34%|███▍ | 12/35 [00:01<00:02, 8.60it/s]
37%|███▋ | 13/35 [00:01<00:02, 8.61it/s]
40%|████ | 14/35 [00:01<00:02, 8.62it/s]
43%|████▎ | 15/35 [00:01<00:02, 8.62it/s]
46%|████▌ | 16/35 [00:01<00:02, 8.63it/s]
49%|████▊ | 17/35 [00:02<00:02, 8.63it/s]
51%|█████▏ | 18/35 [00:02<00:01, 8.63it/s]
54%|█████▍ | 19/35 [00:02<00:01, 8.63it/s]
57%|█████▋ | 20/35 [00:02<00:01, 8.63it/s]
60%|██████ | 21/35 [00:02<00:01, 8.63it/s]
63%|██████▎ | 22/35 [00:02<00:01, 8.64it/s]
66%|██████▌ | 23/35 [00:02<00:01, 8.64it/s]
69%|██████▊ | 24/35 [00:02<00:01, 8.64it/s]
71%|███████▏ | 25/35 [00:02<00:01, 8.64it/s]
74%|███████▍ | 26/35 [00:03<00:01, 8.64it/s]
77%|███████▋ | 27/35 [00:03<00:00, 8.64it/s]
80%|████████ | 28/35 [00:03<00:00, 8.64it/s]
83%|████████▎ | 29/35 [00:03<00:00, 8.63it/s]
86%|████████▌ | 30/35 [00:03<00:00, 8.63it/s]
89%|████████▊ | 31/35 [00:03<00:00, 8.64it/s]
91%|█████████▏| 32/35 [00:03<00:00, 8.64it/s]
94%|█████████▍| 33/35 [00:03<00:00, 8.54it/s]
97%|█████████▋| 34/35 [00:04<00:00, 8.57it/s]
100%|██████████| 35/35 [00:04<00:00, 8.59it/s]
100%|██████████| 35/35 [00:04<00:00, 8.49it/s]
INFO:root:Image generation completed successfully.