Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
asppj /cog-comfyui-img:c493b0bb
Input
Run this model in Node.js with one line of code:
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";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run asppj/cog-comfyui-img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"asppj/cog-comfyui-img:c493b0bb1bb7d8ccbc95ff0a7787a093a018d28976e728742fda6c44f17ccc5e",
{
input: {
output_format: "webp",
workflow_json: "{\"3\": {\"inputs\": {\"seed\": 237514639057514, \"steps\": 20, \"cfg\": 2.5, \"sampler_name\": \"euler\", \"scheduler\": \"karras\", \"denoise\": 1, \"model\": [\"14\", 0], \"positive\": [\"12\", 0], \"negative\": [\"12\", 1], \"latent_image\": [\"12\", 2]}, \"class_type\": \"KSampler\", \"_meta\": {\"title\": \"KSampler\"}}, \"8\": {\"inputs\": {\"samples\": [\"3\", 0], \"vae\": [\"15\", 2]}, \"class_type\": \"VAEDecode\", \"_meta\": {\"title\": \"VAE Decode\"}}, \"10\": {\"inputs\": {\"filename_prefix\": \"ComfyUI\", \"fps\": 10, \"lossless\": false, \"quality\": 85, \"method\": \"default\", \"images\": [\"8\", 0]}, \"class_type\": \"SaveAnimatedWEBP\", \"_meta\": {\"title\": \"SaveAnimatedWEBP\"}}, \"12\": {\"inputs\": {\"width\": 1024, \"height\": 576, \"video_frames\": 25, \"motion_bucket_id\": 127, \"fps\": 6, \"augmentation_level\": 0, \"clip_vision\": [\"15\", 1], \"init_image\": [\"20\", 0], \"vae\": [\"15\", 2]}, \"class_type\": \"SVD_img2vid_Conditioning\", \"_meta\": {\"title\": \"SVD_img2vid_Conditioning\"}}, \"14\": {\"inputs\": {\"min_cfg\": 1, \"model\": [\"15\", 0]}, \"class_type\": \"VideoLinearCFGGuidance\", \"_meta\": {\"title\": \"VideoLinearCFGGuidance\"}}, \"15\": {\"inputs\": {\"ckpt_name\": \"svd_xt.safetensors\"}, \"class_type\": \"ImageOnlyCheckpointLoader\", \"_meta\": {\"title\": \"Image Only Checkpoint Loader (img2vid model)\"}}, \"16\": {\"inputs\": {\"ckpt_name\": \"sd_xl_base_1.0.safetensors\"}, \"class_type\": \"CheckpointLoaderSimple\", \"_meta\": {\"title\": \"Load Checkpoint\"}}, \"17\": {\"inputs\": {\"seed\": 144698910769133, \"steps\": 15, \"cfg\": 8, \"sampler_name\": \"uni_pc_bh2\", \"scheduler\": \"normal\", \"denoise\": 1, \"model\": [\"16\", 0], \"positive\": [\"18\", 0], \"negative\": [\"19\", 0], \"latent_image\": [\"22\", 0]}, \"class_type\": \"KSampler\", \"_meta\": {\"title\": \"KSampler\"}}, \"18\": {\"inputs\": {\"text\": \"A dramatic scene of a rocket launch at dawn with logo ihandy name, with a towering rocket on the launch pad, surrounded by a cloud of smoke and flames. The sky is painted in shades of orange and purple as the sun rises, casting a warm glow on the scene. Ground crew in the foreground, wearing safety gear, are monitoring the launch. The rocket is detailed with futuristic designs and logos, and the launch pad is equipped with various technical equipment. The atmosphere is filled with excitement and anticipation.\", \"clip\": [\"16\", 1]}, \"class_type\": \"CLIPTextEncode\", \"_meta\": {\"title\": \"CLIP Text Encode (Prompt)\"}}, \"19\": {\"inputs\": {\"text\": \"watermark\", \"clip\": [\"16\", 1]}, \"class_type\": \"CLIPTextEncode\", \"_meta\": {\"title\": \"CLIP Text Encode (Prompt)\"}}, \"20\": {\"inputs\": {\"samples\": [\"17\", 0], \"vae\": [\"16\", 2]}, \"class_type\": \"VAEDecode\", \"_meta\": {\"title\": \"VAE Decode\"}}, \"21\": {\"inputs\": {\"images\": [\"20\", 0]}, \"class_type\": \"PreviewImage\", \"_meta\": {\"title\": \"Preview Image\"}}, \"22\": {\"inputs\": {\"width\": 1024, \"height\": 576, \"batch_size\": 1}, \"class_type\": \"EmptyLatentImage\", \"_meta\": {\"title\": \"Empty Latent Image\"}}}",
output_quality: 95,
randomise_seeds: true,
force_reset_cache: false,
return_temp_files: false
}
}
);
// 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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run asppj/cog-comfyui-img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"asppj/cog-comfyui-img:c493b0bb1bb7d8ccbc95ff0a7787a093a018d28976e728742fda6c44f17ccc5e",
input={
"output_format": "webp",
"workflow_json": "{\"3\": {\"inputs\": {\"seed\": 237514639057514, \"steps\": 20, \"cfg\": 2.5, \"sampler_name\": \"euler\", \"scheduler\": \"karras\", \"denoise\": 1, \"model\": [\"14\", 0], \"positive\": [\"12\", 0], \"negative\": [\"12\", 1], \"latent_image\": [\"12\", 2]}, \"class_type\": \"KSampler\", \"_meta\": {\"title\": \"KSampler\"}}, \"8\": {\"inputs\": {\"samples\": [\"3\", 0], \"vae\": [\"15\", 2]}, \"class_type\": \"VAEDecode\", \"_meta\": {\"title\": \"VAE Decode\"}}, \"10\": {\"inputs\": {\"filename_prefix\": \"ComfyUI\", \"fps\": 10, \"lossless\": false, \"quality\": 85, \"method\": \"default\", \"images\": [\"8\", 0]}, \"class_type\": \"SaveAnimatedWEBP\", \"_meta\": {\"title\": \"SaveAnimatedWEBP\"}}, \"12\": {\"inputs\": {\"width\": 1024, \"height\": 576, \"video_frames\": 25, \"motion_bucket_id\": 127, \"fps\": 6, \"augmentation_level\": 0, \"clip_vision\": [\"15\", 1], \"init_image\": [\"20\", 0], \"vae\": [\"15\", 2]}, \"class_type\": \"SVD_img2vid_Conditioning\", \"_meta\": {\"title\": \"SVD_img2vid_Conditioning\"}}, \"14\": {\"inputs\": {\"min_cfg\": 1, \"model\": [\"15\", 0]}, \"class_type\": \"VideoLinearCFGGuidance\", \"_meta\": {\"title\": \"VideoLinearCFGGuidance\"}}, \"15\": {\"inputs\": {\"ckpt_name\": \"svd_xt.safetensors\"}, \"class_type\": \"ImageOnlyCheckpointLoader\", \"_meta\": {\"title\": \"Image Only Checkpoint Loader (img2vid model)\"}}, \"16\": {\"inputs\": {\"ckpt_name\": \"sd_xl_base_1.0.safetensors\"}, \"class_type\": \"CheckpointLoaderSimple\", \"_meta\": {\"title\": \"Load Checkpoint\"}}, \"17\": {\"inputs\": {\"seed\": 144698910769133, \"steps\": 15, \"cfg\": 8, \"sampler_name\": \"uni_pc_bh2\", \"scheduler\": \"normal\", \"denoise\": 1, \"model\": [\"16\", 0], \"positive\": [\"18\", 0], \"negative\": [\"19\", 0], \"latent_image\": [\"22\", 0]}, \"class_type\": \"KSampler\", \"_meta\": {\"title\": \"KSampler\"}}, \"18\": {\"inputs\": {\"text\": \"A dramatic scene of a rocket launch at dawn with logo ihandy name, with a towering rocket on the launch pad, surrounded by a cloud of smoke and flames. The sky is painted in shades of orange and purple as the sun rises, casting a warm glow on the scene. Ground crew in the foreground, wearing safety gear, are monitoring the launch. The rocket is detailed with futuristic designs and logos, and the launch pad is equipped with various technical equipment. The atmosphere is filled with excitement and anticipation.\", \"clip\": [\"16\", 1]}, \"class_type\": \"CLIPTextEncode\", \"_meta\": {\"title\": \"CLIP Text Encode (Prompt)\"}}, \"19\": {\"inputs\": {\"text\": \"watermark\", \"clip\": [\"16\", 1]}, \"class_type\": \"CLIPTextEncode\", \"_meta\": {\"title\": \"CLIP Text Encode (Prompt)\"}}, \"20\": {\"inputs\": {\"samples\": [\"17\", 0], \"vae\": [\"16\", 2]}, \"class_type\": \"VAEDecode\", \"_meta\": {\"title\": \"VAE Decode\"}}, \"21\": {\"inputs\": {\"images\": [\"20\", 0]}, \"class_type\": \"PreviewImage\", \"_meta\": {\"title\": \"Preview Image\"}}, \"22\": {\"inputs\": {\"width\": 1024, \"height\": 576, \"batch_size\": 1}, \"class_type\": \"EmptyLatentImage\", \"_meta\": {\"title\": \"Empty Latent Image\"}}}",
"output_quality": 95,
"randomise_seeds": True,
"force_reset_cache": False,
"return_temp_files": False
}
)
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 asppj/cog-comfyui-img 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": "asppj/cog-comfyui-img:c493b0bb1bb7d8ccbc95ff0a7787a093a018d28976e728742fda6c44f17ccc5e",
"input": {
"output_format": "webp",
"workflow_json": "{\\"3\\": {\\"inputs\\": {\\"seed\\": 237514639057514, \\"steps\\": 20, \\"cfg\\": 2.5, \\"sampler_name\\": \\"euler\\", \\"scheduler\\": \\"karras\\", \\"denoise\\": 1, \\"model\\": [\\"14\\", 0], \\"positive\\": [\\"12\\", 0], \\"negative\\": [\\"12\\", 1], \\"latent_image\\": [\\"12\\", 2]}, \\"class_type\\": \\"KSampler\\", \\"_meta\\": {\\"title\\": \\"KSampler\\"}}, \\"8\\": {\\"inputs\\": {\\"samples\\": [\\"3\\", 0], \\"vae\\": [\\"15\\", 2]}, \\"class_type\\": \\"VAEDecode\\", \\"_meta\\": {\\"title\\": \\"VAE Decode\\"}}, \\"10\\": {\\"inputs\\": {\\"filename_prefix\\": \\"ComfyUI\\", \\"fps\\": 10, \\"lossless\\": false, \\"quality\\": 85, \\"method\\": \\"default\\", \\"images\\": [\\"8\\", 0]}, \\"class_type\\": \\"SaveAnimatedWEBP\\", \\"_meta\\": {\\"title\\": \\"SaveAnimatedWEBP\\"}}, \\"12\\": {\\"inputs\\": {\\"width\\": 1024, \\"height\\": 576, \\"video_frames\\": 25, \\"motion_bucket_id\\": 127, \\"fps\\": 6, \\"augmentation_level\\": 0, \\"clip_vision\\": [\\"15\\", 1], \\"init_image\\": [\\"20\\", 0], \\"vae\\": [\\"15\\", 2]}, \\"class_type\\": \\"SVD_img2vid_Conditioning\\", \\"_meta\\": {\\"title\\": \\"SVD_img2vid_Conditioning\\"}}, \\"14\\": {\\"inputs\\": {\\"min_cfg\\": 1, \\"model\\": [\\"15\\", 0]}, \\"class_type\\": \\"VideoLinearCFGGuidance\\", \\"_meta\\": {\\"title\\": \\"VideoLinearCFGGuidance\\"}}, \\"15\\": {\\"inputs\\": {\\"ckpt_name\\": \\"svd_xt.safetensors\\"}, \\"class_type\\": \\"ImageOnlyCheckpointLoader\\", \\"_meta\\": {\\"title\\": \\"Image Only Checkpoint Loader (img2vid model)\\"}}, \\"16\\": {\\"inputs\\": {\\"ckpt_name\\": \\"sd_xl_base_1.0.safetensors\\"}, \\"class_type\\": \\"CheckpointLoaderSimple\\", \\"_meta\\": {\\"title\\": \\"Load Checkpoint\\"}}, \\"17\\": {\\"inputs\\": {\\"seed\\": 144698910769133, \\"steps\\": 15, \\"cfg\\": 8, \\"sampler_name\\": \\"uni_pc_bh2\\", \\"scheduler\\": \\"normal\\", \\"denoise\\": 1, \\"model\\": [\\"16\\", 0], \\"positive\\": [\\"18\\", 0], \\"negative\\": [\\"19\\", 0], \\"latent_image\\": [\\"22\\", 0]}, \\"class_type\\": \\"KSampler\\", \\"_meta\\": {\\"title\\": \\"KSampler\\"}}, \\"18\\": {\\"inputs\\": {\\"text\\": \\"A dramatic scene of a rocket launch at dawn with logo ihandy name, with a towering rocket on the launch pad, surrounded by a cloud of smoke and flames. The sky is painted in shades of orange and purple as the sun rises, casting a warm glow on the scene. Ground crew in the foreground, wearing safety gear, are monitoring the launch. The rocket is detailed with futuristic designs and logos, and the launch pad is equipped with various technical equipment. The atmosphere is filled with excitement and anticipation.\\", \\"clip\\": [\\"16\\", 1]}, \\"class_type\\": \\"CLIPTextEncode\\", \\"_meta\\": {\\"title\\": \\"CLIP Text Encode (Prompt)\\"}}, \\"19\\": {\\"inputs\\": {\\"text\\": \\"watermark\\", \\"clip\\": [\\"16\\", 1]}, \\"class_type\\": \\"CLIPTextEncode\\", \\"_meta\\": {\\"title\\": \\"CLIP Text Encode (Prompt)\\"}}, \\"20\\": {\\"inputs\\": {\\"samples\\": [\\"17\\", 0], \\"vae\\": [\\"16\\", 2]}, \\"class_type\\": \\"VAEDecode\\", \\"_meta\\": {\\"title\\": \\"VAE Decode\\"}}, \\"21\\": {\\"inputs\\": {\\"images\\": [\\"20\\", 0]}, \\"class_type\\": \\"PreviewImage\\", \\"_meta\\": {\\"title\\": \\"Preview Image\\"}}, \\"22\\": {\\"inputs\\": {\\"width\\": 1024, \\"height\\": 576, \\"batch_size\\": 1}, \\"class_type\\": \\"EmptyLatentImage\\", \\"_meta\\": {\\"title\\": \\"Empty Latent Image\\"}}}",
"output_quality": 95,
"randomise_seeds": true,
"force_reset_cache": false,
"return_temp_files": false
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
No output yet! Press "Submit" to start a prediction.