defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 1,
"negative_prompt": "monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "in the style of TOK, composition of a man with chaos, ",
"prompt_strength": 0.8,
"refine": "base_image_refiner",
"scheduler": "DDIM",
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_bWu**********************************
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 gymdreams8/gdmjp4 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"gymdreams8/gdmjp4:396f5235412e4af69d4a5899ebe5c984dc6729590b461054da05bf57ac9d66c2",
{
input: {
apply_watermark: false,
guidance_scale: 7.5,
height: 1024,
high_noise_frac: 0.8,
lora_scale: 1,
negative_prompt: "monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids",
num_inference_steps: 50,
num_outputs: 1,
prompt: "in the style of TOK, composition of a man with chaos, ",
prompt_strength: 0.8,
refine: "base_image_refiner",
scheduler: "DDIM",
width: 1024
}
}
);
// 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_bWu**********************************
This is your API token. Keep it to yourself.
import replicate
Run gymdreams8/gdmjp4 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"gymdreams8/gdmjp4:396f5235412e4af69d4a5899ebe5c984dc6729590b461054da05bf57ac9d66c2",
input={
"apply_watermark": False,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 1,
"negative_prompt": "monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "in the style of TOK, composition of a man with chaos, ",
"prompt_strength": 0.8,
"refine": "base_image_refiner",
"scheduler": "DDIM",
"width": 1024
}
)
# 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_bWu**********************************
This is your API token. Keep it to yourself.
Run gymdreams8/gdmjp4 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": "gymdreams8/gdmjp4:396f5235412e4af69d4a5899ebe5c984dc6729590b461054da05bf57ac9d66c2",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 1,
"negative_prompt": "monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "in the style of TOK, composition of a man with chaos, ",
"prompt_strength": 0.8,
"refine": "base_image_refiner",
"scheduler": "DDIM",
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "be7bvetbj5ygtmzrmp6yek2aoa",
"model": "gymdreams8/gdmjp4",
"version": "396f5235412e4af69d4a5899ebe5c984dc6729590b461054da05bf57ac9d66c2",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 1,
"negative_prompt": "monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "in the style of TOK, composition of a man with chaos, ",
"prompt_strength": 0.8,
"refine": "base_image_refiner",
"scheduler": "DDIM",
"width": 1024
},
"logs": "",
"output": [
"https://replicate.delivery/pbxt/XfrGl2c8GXxvAqj5rkwt7kjRUf5XbbT4SDBvEdEvO1AgWYnRA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-09-24T06:13:33.514801Z",
"started_at": "2023-09-24T06:13:33.706224Z",
"completed_at": "2023-09-24T06:13:52.921188Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/be7bvetbj5ygtmzrmp6yek2aoa/cancel",
"get": "https://api.replicate.com/v1/predictions/be7bvetbj5ygtmzrmp6yek2aoa"
},
"metrics": {
"predict_time": 19.214964,
"total_time": 19.406387
}
}