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, chaos within a man",
"prompt_strength": 0.8,
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_V0T**********************************
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, chaos within a man",
prompt_strength: 0.8,
refine: "base_image_refiner",
scheduler: "KarrasDPM",
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_V0T**********************************
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, chaos within a man",
"prompt_strength": 0.8,
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"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_V0T**********************************
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, chaos within a man",
"prompt_strength": 0.8,
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "k6xc5wtbo333yirlmr73s3bo44",
"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, chaos within a man",
"prompt_strength": 0.8,
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"width": 1024
},
"logs": "",
"output": [
"https://replicate.delivery/pbxt/LV2bPztLofQfOUxkfMac5VFi5NxDhJyhsMdcADRjaIYMTwOjA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-09-24T05:59:48.644261Z",
"started_at": "2023-09-24T05:59:48.612715Z",
"completed_at": "2023-09-24T06:00:06.795288Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/k6xc5wtbo333yirlmr73s3bo44/cancel",
"get": "https://api.replicate.com/v1/predictions/k6xc5wtbo333yirlmr73s3bo44"
},
"metrics": {
"predict_time": 18.182573,
"total_time": 18.151027
}
}