defaultgrass
typetext
{
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "Mossy Runic Bricks seamless texture, trending on artstation, stone, moss, base color, albedo, 4k",
"refine": "expert_ensemble_refiner",
"scheduler": "DDIM",
"width": 768
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_egC**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run pwntus/material-diffusion-sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"pwntus/material-diffusion-sdxl:ce888cbe17a7c04d4b9c4cbd2b576715d480c55b2ba8f9f3d33f2ad70a26cd99",
{
input: {
apply_watermark: true,
guidance_scale: 7.5,
height: 768,
high_noise_frac: 0.8,
num_inference_steps: 50,
num_outputs: 1,
prompt: "Mossy Runic Bricks seamless texture, trending on artstation, stone, moss, base color, albedo, 4k",
refine: "expert_ensemble_refiner",
scheduler: "DDIM",
width: 768
}
}
);
// 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.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_egC**********************************
This is your API token. Keep it to yourself.
import replicate
Run pwntus/material-diffusion-sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pwntus/material-diffusion-sdxl:ce888cbe17a7c04d4b9c4cbd2b576715d480c55b2ba8f9f3d33f2ad70a26cd99",
input={
"apply_watermark": True,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "Mossy Runic Bricks seamless texture, trending on artstation, stone, moss, base color, albedo, 4k",
"refine": "expert_ensemble_refiner",
"scheduler": "DDIM",
"width": 768
}
)
# 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.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_egC**********************************
This is your API token. Keep it to yourself.
Run pwntus/material-diffusion-sdxl 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": "pwntus/material-diffusion-sdxl:ce888cbe17a7c04d4b9c4cbd2b576715d480c55b2ba8f9f3d33f2ad70a26cd99",
"input": {
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "Mossy Runic Bricks seamless texture, trending on artstation, stone, moss, base color, albedo, 4k",
"refine": "expert_ensemble_refiner",
"scheduler": "DDIM",
"width": 768
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "ryowfydbtgzz3bxsqnpvfjuhli",
"model": "pwntus/material-diffusion-sdxl",
"version": "ce888cbe17a7c04d4b9c4cbd2b576715d480c55b2ba8f9f3d33f2ad70a26cd99",
"input": {
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "Mossy Runic Bricks seamless texture, trending on artstation, stone, moss, base color, albedo, 4k",
"refine": "expert_ensemble_refiner",
"scheduler": "DDIM",
"width": 768
},
"logs": "Using seed: 21776\nPrompt: Mossy Runic Bricks seamless texture, trending on artstation, stone, moss, base color, albedo, 4k\ntxt2img mode\n 0%| | 0/40 [00:00<?, ?it/s]\n 5%|▌ | 2/40 [00:00<00:02, 14.41it/s]\n 10%|█ | 4/40 [00:00<00:02, 14.42it/s]\n 15%|█▌ | 6/40 [00:00<00:02, 14.43it/s]\n 20%|██ | 8/40 [00:00<00:02, 14.42it/s]\n 25%|██▌ | 10/40 [00:00<00:02, 14.41it/s]\n 30%|███ | 12/40 [00:00<00:01, 14.42it/s]\n 35%|███▌ | 14/40 [00:00<00:01, 14.42it/s]\n 40%|████ | 16/40 [00:01<00:01, 14.43it/s]\n 45%|████▌ | 18/40 [00:01<00:01, 14.43it/s]\n 50%|█████ | 20/40 [00:01<00:01, 14.42it/s]\n 55%|█████▌ | 22/40 [00:01<00:01, 14.42it/s]\n 60%|██████ | 24/40 [00:01<00:01, 14.43it/s]\n 65%|██████▌ | 26/40 [00:01<00:00, 14.42it/s]\n 70%|███████ | 28/40 [00:01<00:00, 14.41it/s]\n 75%|███████▌ | 30/40 [00:02<00:00, 14.42it/s]\n 80%|████████ | 32/40 [00:02<00:00, 14.43it/s]\n 85%|████████▌ | 34/40 [00:02<00:00, 14.43it/s]\n 90%|█████████ | 36/40 [00:02<00:00, 14.44it/s]\n 95%|█████████▌| 38/40 [00:02<00:00, 14.43it/s]\n100%|██████████| 40/40 [00:02<00:00, 14.43it/s]\n100%|██████████| 40/40 [00:02<00:00, 14.42it/s]\n 0%| | 0/10 [00:00<?, ?it/s]\n 10%|█ | 1/10 [00:00<00:01, 8.16it/s]\n 30%|███ | 3/10 [00:00<00:00, 12.29it/s]\n 50%|█████ | 5/10 [00:00<00:00, 13.45it/s]\n 70%|███████ | 7/10 [00:00<00:00, 13.99it/s]\n 90%|█████████ | 9/10 [00:00<00:00, 14.28it/s]\n100%|██████████| 10/10 [00:00<00:00, 13.70it/s]",
"output": [
"https://replicate.delivery/pbxt/7gJ7y5PLGEbed6g44CD624HjmMdXDjK0MUloxlT9fKcyYuXRA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-08-07T18:13:02.314225Z",
"started_at": "2023-08-07T18:13:02.292532Z",
"completed_at": "2023-08-07T18:13:07.42949Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/ryowfydbtgzz3bxsqnpvfjuhli/cancel",
"get": "https://api.replicate.com/v1/predictions/ryowfydbtgzz3bxsqnpvfjuhli"
},
"metrics": {
"predict_time": 5.136958,
"total_time": 5.115265
}
}