Prediction
gymdreams8/gdmjp4:396f5235Input
- width
- 1024
- height
- 1024
- prompt
- in the style of TOK, composition of a male figure with chaos
- refine
- base_image_refiner
- scheduler
- KarrasDPM
- lora_scale
- 1
- num_outputs
- 1
- guidance_scale
- 7.5
- apply_watermark
- high_noise_frac
- 0.8
- negative_prompt
- monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids
- prompt_strength
- 0.8
- num_inference_steps
- 50
{
"width": 1024,
"height": 1024,
"prompt": "in the style of TOK, composition of a male figure with chaos",
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"lora_scale": 1,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": false,
"high_noise_frac": 0.8,
"negative_prompt": "monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids",
"prompt_strength": 0.8,
"num_inference_steps": 50
}
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 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: {
width: 1024,
height: 1024,
prompt: "in the style of TOK, composition of a male figure with chaos",
refine: "base_image_refiner",
scheduler: "KarrasDPM",
lora_scale: 1,
num_outputs: 1,
guidance_scale: 7.5,
apply_watermark: false,
high_noise_frac: 0.8,
negative_prompt: "monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids",
prompt_strength: 0.8,
num_inference_steps: 50
}
}
);
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 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={
"width": 1024,
"height": 1024,
"prompt": "in the style of TOK, composition of a male figure with chaos",
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"lora_scale": 1,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": False,
"high_noise_frac": 0.8,
"negative_prompt": "monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids",
"prompt_strength": 0.8,
"num_inference_steps": 50
}
)
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 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": "396f5235412e4af69d4a5899ebe5c984dc6729590b461054da05bf57ac9d66c2",
"input": {
"width": 1024,
"height": 1024,
"prompt": "in the style of TOK, composition of a male figure with chaos",
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"lora_scale": 1,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": false,
"high_noise_frac": 0.8,
"negative_prompt": "monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids",
"prompt_strength": 0.8,
"num_inference_steps": 50
}
}' \
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/gymdreams8/gdmjp4@sha256:396f5235412e4af69d4a5899ebe5c984dc6729590b461054da05bf57ac9d66c2 \
-i 'width=1024' \
-i 'height=1024' \
-i 'prompt="in the style of TOK, composition of a male figure with chaos"' \
-i 'refine="base_image_refiner"' \
-i 'scheduler="KarrasDPM"' \
-i 'lora_scale=1' \
-i 'num_outputs=1' \
-i 'guidance_scale=7.5' \
-i 'apply_watermark=false' \
-i 'high_noise_frac=0.8' \
-i 'negative_prompt="monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids"' \
-i 'prompt_strength=0.8' \
-i 'num_inference_steps=50'
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/gymdreams8/gdmjp4@sha256:396f5235412e4af69d4a5899ebe5c984dc6729590b461054da05bf57ac9d66c2
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "width": 1024, "height": 1024, "prompt": "in the style of TOK, composition of a male figure with chaos", "refine": "base_image_refiner", "scheduler": "KarrasDPM", "lora_scale": 1, "num_outputs": 1, "guidance_scale": 7.5, "apply_watermark": false, "high_noise_frac": 0.8, "negative_prompt": "monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids", "prompt_strength": 0.8, "num_inference_steps": 50 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{
"completed_at": "2023-09-24T05:59:14.355005Z",
"created_at": "2023-09-24T05:58:56.195244Z",
"data_removed": false,
"error": null,
"id": "r6dozcdb3e5qxbuehaigolrbgm",
"input": {
"width": 1024,
"height": 1024,
"prompt": "in the style of TOK, composition of a male figure with chaos",
"refine": "base_image_refiner",
"scheduler": "KarrasDPM",
"lora_scale": 1,
"num_outputs": 1,
"guidance_scale": 7.5,
"apply_watermark": false,
"high_noise_frac": 0.8,
"negative_prompt": "monochrome, black and white, over saturation, nsfw, signature, three men, four men, too many hands, children, kids",
"prompt_strength": 0.8,
"num_inference_steps": 50
},
"logs": null,
"metrics": {
"predict_time": 18.203735,
"total_time": 18.159761
},
"output": [
"https://replicate.delivery/pbxt/aWnt24fmL6WnAyTRzkZ5gD20nGphr6VUNRcqeVnN3unxIYnRA/out-0.png"
],
"started_at": "2023-09-24T05:58:56.151270Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/r6dozcdb3e5qxbuehaigolrbgm",
"cancel": "https://api.replicate.com/v1/predictions/r6dozcdb3e5qxbuehaigolrbgm/cancel"
},
"version": "396f5235412e4af69d4a5899ebe5c984dc6729590b461054da05bf57ac9d66c2"
}