Capybara: Image Edit
Upload an image or video and input a text instruction. Generate an edited output using the Capybara model for tasks like style changes, object replacement, or time-of-day adjustments.
概要
The Capybara: Image Edit workflow is a powerful tool designed to facilitate advanced image editing tasks using AI. At its core, this workflow leverages the Capybara model, which is adept at interpreting text instructions to modify images or videos. Whether you want to change the style of an image, replace objects, or adjust the time of day depicted, this workflow makes it possible with just a few simple inputs.
The process begins with the LoadImage node, where users upload their desired image or video. Instructions are then processed by a specialized node (4f4ddf39-1508-4d34-a35c-ff10e6ce995b), which applies the specified edits using the Capybara model. The final output is saved using the SaveImage node.
Technically, this workflow is designed to handle various resolutions and aspect ratios, ensuring flexibility and adaptability for different projects. The Capybara model, available in a downloadable format for local users, operates efficiently with a recommended configuration of 50 steps for high-quality results. This workflow is particularly useful for creatives and professionals who require precise and nuanced image edits without the need for extensive manual adjustments.
入力するもの
- ワークフローを読み込み中
ComfyUI で実行できます。 このワークフローはこのページでは実行できません。すべてが読み込まれた状態でComfy Cloudで開くか、ご自身のComfyUI用にダウンロードしてください。
Cloudで試すワークフローの内部
ノードグラフの読み取り専用プレビューです。ノードを編集するには、Comfy Cloudで開くかダウンロードしてください。
Loading the graph
Open full-size workflow preview- 作成者
- ComfyUI
カスタムノードが必要です
- ワークフローを読み込み中
コードからこのワークフローを使用する
可能な場合はワークフローグラフと入力から生成されます。それ以外の場合は保存された例が表示されます。料金が発生する場合があるため、コードを実行する前に認証情報とエンドポイントを確認してください。
What you need
- Runs on
- Comfy Cloud
- キー
- COMFY_API_KEY
有料の Cloud プランとクレジットが必要です。
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"80": {
"class_type": "LoadImage",
"inputs": {
"image": "wind_woman.png"
},
"_meta": {
"title": "Load Image"
}
},
"102": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "Capybara_v0.1",
"images": [
"103:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"103:10": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "hunyuanvideo15_vae_fp16.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"103:105": {
"class_type": "ResizeImageMaskNode",
"inputs": {
"input": [
"80",
0
],
"resize_type": "scale dimensions",
"resize_type.crop": "center",
"resize_type.height": 1024,
"resize_type.width": 1024,
"scale_method": "lanczos"
},
"_meta": {
"title": "Resize Image/Mask"
}
},
"103:11": {
"class_type": "DualCLIPLoader",
"inputs": {
"clip_name1": "qwen_2.5_vl_7b.safetensors",
"clip_name2": "byt5_small_glyphxl_fp16.safetensors",
"device": "default",
"type": "hunyuan_video_15"
},
"_meta": {
"title": "Load CLIP (Dual)"
}
},
"103:12": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "capybara_v0.1.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"103:13": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"103:91",
0
],
"latent_image": [
"103:78",
2
],
"noise": [
"103:25",
0
],
"sampler": [
"103:16",
0
],
"sigmas": [
"103:17",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"103:16": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"103:17": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"103:12",
0
],
"scheduler": "simple",
"steps": 20
},
"_meta": {
"title": "BasicScheduler"
}
},
"103:25": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 1044901887090653
},
"_meta": {
"title": "RandomNoise"
}
},
"103:44": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"103:11",
0
],
"text": "Keep the characters and fluttering costumes unchanged, replace the indoor scene with an outdoor grassland setting"
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"103:67": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"103:12",
0
],
"shift": 7
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"103:78": {
"class_type": "HunyuanVideo15ImageToVideo",
"inputs": {
"batch_size": 1,
"clip_vision_output": [
"103:79",
0
],
"height": [
"103:98",
1
],
"length": [
"103:98",
2
],
"negative": [
"103:93",
0
],
"positive": [
"103:44",
0
],
"start_image": [
"103:105",
0
],
"vae": [
"103:10",
0
],
"width": [
"103:98",
0
]
},
"_meta": {
"title": "HunyuanVideo15ImageToVideo"
}
},
"103:79": {
"class_type": "CLIPVisionEncode",
"inputs": {
"clip_vision": [
"103:81",
0
],
"crop": "none",
"image": [
"103:105",
0
]
},
"_meta": {
"title": "CLIP Vision Encode"
}
},
"103:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"103:13",
0
],
"vae": [
"103:10",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"103:81": {
"class_type": "CLIPVisionLoader",
"inputs": {
"clip_name": "sigclip_vision_patch14_384.safetensors"
},
"_meta": {
"title": "Load CLIP Vision"
}
},
"103:91": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 6,
"model": [
"103:67",
0
],
"negative": [
"103:78",
1
],
"positive": [
"103:78",
0
]
},
"_meta": {
"title": "CFG Guider"
}
},
"103:93": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"103:11",
0
],
"text": "blurry, low quality, distorted, ugly, watermark, text"
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"103:98": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"103:105",
0
]
},
"_meta": {
"title": "Get Image Size"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)よくある質問
The Capybara model can perform style changes, object replacements, and time-of-day adjustments, among other edits.
For better quality, use 50 steps instead of the default 20 steps in ComfyUI, as recommended in the workflow documentation.
Yes, the workflow supports both image and video inputs, allowing for frame-by-frame video editing.
Yes, you can configure the resolution and aspect ratio according to the Capybara Resolution Configuration table provided in the workflow.