typetext
{
"guidance_scale": 4.5,
"height": 1024,
"model": "sd3_medium_incl_clips_t5xxlfp16.safetensors",
"negative_conditioning_end": 0,
"negative_prompt": "",
"number_of_images": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a closeup portrait photo of a man",
"sampler": "dpmpp_2m",
"scheduler": "sgm_uniform",
"shift": 3,
"steps": 10,
"triple_prompt_clip_g": "",
"triple_prompt_clip_l": "",
"triple_prompt_empty_padding": true,
"triple_prompt_t5": "",
"use_triple_prompt": false,
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_J9X**********************************
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 fofr/sd3-explorer using Replicateβs API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"fofr/sd3-explorer:ba3320806125ae93991c899010c998e4ee6a9dc6bdd89aeb6ecbd992815650a9",
{
input: {
guidance_scale: 4.5,
height: 1024,
model: "sd3_medium_incl_clips_t5xxlfp16.safetensors",
negative_conditioning_end: 0,
negative_prompt: "",
number_of_images: 1,
output_format: "webp",
output_quality: 80,
prompt: "a closeup portrait photo of a man",
sampler: "dpmpp_2m",
scheduler: "sgm_uniform",
shift: 3,
steps: 10,
triple_prompt_clip_g: "",
triple_prompt_clip_l: "",
triple_prompt_empty_padding: true,
triple_prompt_t5: "",
use_triple_prompt: false,
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_J9X**********************************
This is your API token. Keep it to yourself.
import replicate
Run fofr/sd3-explorer using Replicateβs API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fofr/sd3-explorer:ba3320806125ae93991c899010c998e4ee6a9dc6bdd89aeb6ecbd992815650a9",
input={
"guidance_scale": 4.5,
"height": 1024,
"model": "sd3_medium_incl_clips_t5xxlfp16.safetensors",
"negative_conditioning_end": 0,
"negative_prompt": "",
"number_of_images": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a closeup portrait photo of a man",
"sampler": "dpmpp_2m",
"scheduler": "sgm_uniform",
"shift": 3,
"steps": 10,
"triple_prompt_clip_g": "",
"triple_prompt_clip_l": "",
"triple_prompt_empty_padding": True,
"triple_prompt_t5": "",
"use_triple_prompt": False,
"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_J9X**********************************
This is your API token. Keep it to yourself.
Run fofr/sd3-explorer 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": "fofr/sd3-explorer:ba3320806125ae93991c899010c998e4ee6a9dc6bdd89aeb6ecbd992815650a9",
"input": {
"guidance_scale": 4.5,
"height": 1024,
"model": "sd3_medium_incl_clips_t5xxlfp16.safetensors",
"negative_conditioning_end": 0,
"negative_prompt": "",
"number_of_images": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a closeup portrait photo of a man",
"sampler": "dpmpp_2m",
"scheduler": "sgm_uniform",
"shift": 3,
"steps": 10,
"triple_prompt_clip_g": "",
"triple_prompt_clip_l": "",
"triple_prompt_empty_padding": true,
"triple_prompt_t5": "",
"use_triple_prompt": false,
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicateβs HTTP API reference docs.
{
"id": "egdx1h72rsrgm0cg5ddttacxa8",
"model": "fofr/sd3-explorer",
"version": "ba3320806125ae93991c899010c998e4ee6a9dc6bdd89aeb6ecbd992815650a9",
"input": {
"guidance_scale": 4.5,
"height": 1024,
"model": "sd3_medium_incl_clips_t5xxlfp16.safetensors",
"negative_conditioning_end": 0,
"negative_prompt": "",
"number_of_images": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a closeup portrait photo of a man",
"sampler": "dpmpp_2m",
"scheduler": "sgm_uniform",
"shift": 3,
"steps": 10,
"triple_prompt_clip_g": "",
"triple_prompt_clip_l": "",
"triple_prompt_empty_padding": true,
"triple_prompt_t5": "",
"use_triple_prompt": false,
"width": 1024
},
"logs": "Random seed set to: 4098552373\nChecking weights\nβ
sd3_medium_incl_clips_t5xxlfp16.safetensors exists in ComfyUI/models/checkpoints\n====================================\nRunning workflow\ngot prompt\nExecuting node 6, title: CLIP Text Encode (Prompt), class type: CLIPTextEncode\nExecuting node 289, title: CLIP Text Encode (Prompt), class type: CLIPTextEncode\nExecuting node 274, title: π§ SD3 Negative Conditioning, class type: SD3NegativeConditioning+\nExecuting node 275, title: Empty SD3 Latent Image, class type: EmptySD3LatentImage\nExecuting node 271, title: KSampler, class type: KSampler\n 0%| | 0/10 [00:00<?, ?it/s]\n 20%|ββ | 2/10 [00:00<00:01, 4.27it/s]\n 30%|βββ | 3/10 [00:00<00:01, 4.25it/s]\n 40%|ββββ | 4/10 [00:00<00:01, 4.22it/s]\n 50%|βββββ | 5/10 [00:01<00:01, 4.23it/s]\n 60%|ββββββ | 6/10 [00:01<00:00, 4.22it/s]\n 70%|βββββββ | 7/10 [00:01<00:00, 4.22it/s]\n 80%|ββββββββ | 8/10 [00:01<00:00, 4.22it/s]\n 90%|βββββββββ | 9/10 [00:02<00:00, 4.22it/s]\n100%|ββββββββββ| 10/10 [00:02<00:00, 4.21it/s]\n100%|ββββββββββ| 10/10 [00:02<00:00, 4.22it/s]\nExecuting node 231, title: VAE Decode, class type: VAEDecode\nExecuting node 273, title: Save Image, class type: SaveImage\nPrompt executed in 3.17 seconds\noutputs: {'273': {'images': [{'filename': 'SD3_00001_.png', 'subfolder': '', 'type': 'output'}]}}\n====================================\nSD3_00001_.png",
"output": [
"https://replicate.delivery/pbxt/Qi94PzAwIwLBH9aAuye9gLbtW020IOPDixd8j7tMeAu7HzflA/SD3_00001_.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-06-18T12:39:20.518Z",
"started_at": "2024-06-18T12:39:20.524809Z",
"completed_at": "2024-06-18T12:39:24.238641Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/egdx1h72rsrgm0cg5ddttacxa8/cancel",
"get": "https://api.replicate.com/v1/predictions/egdx1h72rsrgm0cg5ddttacxa8",
"web": "https://replicate.com/p/egdx1h72rsrgm0cg5ddttacxa8"
},
"metrics": {
"predict_time": 3.713831734,
"total_time": 3.720641
}
}