typetext
{
"guidance_scale": 1.5,
"height": 1024,
"model": "sd3_medium_incl_clips.safetensors",
"negative_conditioning_end": 0,
"negative_prompt": "",
"number_of_images": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a closeup photo of a man",
"sampler": "dpmpp_2m",
"scheduler": "sgm_uniform",
"seed": 123,
"shift": 3,
"steps": 28,
"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_cks**********************************
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: 1.5,
height: 1024,
model: "sd3_medium_incl_clips.safetensors",
negative_conditioning_end: 0,
negative_prompt: "",
number_of_images: 1,
output_format: "webp",
output_quality: 80,
prompt: "a closeup photo of a man",
sampler: "dpmpp_2m",
scheduler: "sgm_uniform",
seed: 123,
shift: 3,
steps: 28,
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_cks**********************************
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": 1.5,
"height": 1024,
"model": "sd3_medium_incl_clips.safetensors",
"negative_conditioning_end": 0,
"negative_prompt": "",
"number_of_images": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a closeup photo of a man",
"sampler": "dpmpp_2m",
"scheduler": "sgm_uniform",
"seed": 123,
"shift": 3,
"steps": 28,
"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_cks**********************************
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": 1.5,
"height": 1024,
"model": "sd3_medium_incl_clips.safetensors",
"negative_conditioning_end": 0,
"negative_prompt": "",
"number_of_images": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a closeup photo of a man",
"sampler": "dpmpp_2m",
"scheduler": "sgm_uniform",
"seed": 123,
"shift": 3,
"steps": 28,
"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": "x1j7z7j791rgj0cg5dhrekmh08",
"model": "fofr/sd3-explorer",
"version": "ba3320806125ae93991c899010c998e4ee6a9dc6bdd89aeb6ecbd992815650a9",
"input": {
"guidance_scale": 1.5,
"height": 1024,
"model": "sd3_medium_incl_clips.safetensors",
"negative_conditioning_end": 0,
"negative_prompt": "",
"number_of_images": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "a closeup photo of a man",
"sampler": "dpmpp_2m",
"scheduler": "sgm_uniform",
"seed": 123,
"shift": 3,
"steps": 28,
"triple_prompt_clip_g": "",
"triple_prompt_clip_l": "",
"triple_prompt_empty_padding": true,
"triple_prompt_t5": "",
"use_triple_prompt": false,
"width": 1024
},
"logs": "Seed set to: 123\nChecking weights\nβ³ Downloading sd3_medium_incl_clips.safetensors to ComfyUI/models/checkpoints\nβ
sd3_medium_incl_clips.safetensors downloaded to ComfyUI/models/checkpoints in 4.37s, size: 5696.51MB\n====================================\nRunning workflow\ngot prompt\nExecuting node 252, title: Load Checkpoint, class type: CheckpointLoaderSimple\nmodel_type FLOW\nUsing pytorch attention in VAE\nUsing pytorch attention in VAE\nloaded straight to GPU\nRequested to load SD3\nLoading 1 new model\nExecuting node 13, title: ModelSamplingSD3, class type: ModelSamplingSD3\nExecuting node 6, title: CLIP Text Encode (Prompt), class type: CLIPTextEncode\nRequested to load SD3ClipModel_\nLoading 1 new model\nExecuting node 289, title: CLIP Text Encode (Prompt), class type: CLIPTextEncode\nExecuting node 274, title: π§ SD3 Negative Conditioning, class type: SD3NegativeConditioning+\nExecuting node 271, title: KSampler, class type: KSampler\nRequested to load SD3\nLoading 1 new model\n 0%| | 0/28 [00:00<?, ?it/s]\n 7%|β | 2/28 [00:00<00:05, 4.39it/s]\n 11%|β | 3/28 [00:00<00:05, 4.39it/s]\n 14%|ββ | 4/28 [00:00<00:05, 4.37it/s]\n 18%|ββ | 5/28 [00:01<00:05, 4.37it/s]\n 21%|βββ | 6/28 [00:01<00:05, 4.37it/s]\n 25%|βββ | 7/28 [00:01<00:04, 4.38it/s]\n 29%|βββ | 8/28 [00:01<00:04, 4.37it/s]\n 32%|ββββ | 9/28 [00:02<00:04, 4.37it/s]\n 36%|ββββ | 10/28 [00:02<00:04, 4.36it/s]\n 39%|ββββ | 11/28 [00:02<00:03, 4.37it/s]\n 43%|βββββ | 12/28 [00:02<00:03, 4.36it/s]\n 46%|βββββ | 13/28 [00:02<00:03, 4.36it/s]\n 50%|βββββ | 14/28 [00:03<00:03, 4.36it/s]\n 54%|ββββββ | 15/28 [00:03<00:02, 4.35it/s]\n 57%|ββββββ | 16/28 [00:03<00:02, 4.35it/s]\n 61%|ββββββ | 17/28 [00:03<00:02, 4.36it/s]\n 64%|βββββββ | 18/28 [00:04<00:02, 4.35it/s]\n 68%|βββββββ | 19/28 [00:04<00:02, 4.35it/s]\n 71%|ββββββββ | 20/28 [00:04<00:01, 4.36it/s]\n 75%|ββββββββ | 21/28 [00:04<00:01, 4.35it/s]\n 79%|ββββββββ | 22/28 [00:05<00:01, 4.36it/s]\n 82%|βββββββββ | 23/28 [00:05<00:01, 4.35it/s]\n 86%|βββββββββ | 24/28 [00:05<00:00, 4.35it/s]\n 89%|βββββββββ | 25/28 [00:05<00:00, 4.35it/s]\n 93%|ββββββββββ| 26/28 [00:05<00:00, 4.34it/s]\n 96%|ββββββββββ| 27/28 [00:06<00:00, 4.34it/s]\n100%|ββββββββββ| 28/28 [00:06<00:00, 4.34it/s]\n100%|ββββββββββ| 28/28 [00:06<00:00, 4.36it/s]\nRequested to load AutoencodingEngine\nExecuting node 231, title: VAE Decode, class type: VAEDecode\nLoading 1 new model\nExecuting node 273, title: Save Image, class type: SaveImage\nPrompt executed in 13.26 seconds\noutputs: {'273': {'images': [{'filename': 'SD3_00001_.png', 'subfolder': '', 'type': 'output'}]}}\n====================================\nSD3_00001_.png",
"output": [
"https://replicate.delivery/pbxt/HT6DdV76iRoJPtiHRPCTeWpVfAeNzRZLez5MZvsL8nPLfZevE/SD3_00001_.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-06-18T12:47:25Z",
"started_at": "2024-06-18T12:47:28.564Z",
"completed_at": "2024-06-18T12:47:47.869991Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/x1j7z7j791rgj0cg5dhrekmh08/cancel",
"get": "https://api.replicate.com/v1/predictions/x1j7z7j791rgj0cg5dhrekmh08",
"web": "https://replicate.com/p/x1j7z7j791rgj0cg5dhrekmh08"
},
"metrics": {
"predict_time": 19.305990962,
"total_time": 22.869991
}
}