JoyAI Image Edit
Edit images by following natural language instructions with JoyAI-Image-Edit, which leverages multimodal understanding for precise, spatially aware…
تنزيل سير العملجرّبه في Cloud وثائق API
حول
Edit images by following natural language instructions with JoyAI-Image-Edit, which leverages multimodal understanding for precise, spatially aware…
ما تقدّمه
- جارٍ قراءة سير العمل
يعمل في ComfyUI. لا يمكن تشغيل سير العمل هذا على هذه الصفحة. نزّله وافتحه في ComfyUI.
تنزيل سير العمللا توجد مخرجات نموذجية لسير العمل هذا بعد.
داخل سير العمل
معاينة للقراءة فقط لرسم العقد البياني. افتحه في Comfy Cloud أو نزّله لتعديل العقد.
Loading the graph
Open full-size workflow previewالملفات في سير العمل هذا
- Comfy Cloud
- نعم
- المؤلف
- المؤلف غير متاح
يتطلب عُقدًا مخصصة
- جارٍ قراءة سير العمل
استخدم سير العمل هذا من خلال التعليمات البرمجية
يتم إنشاؤه من مخطط سير العمل والمدخلات عندما يكون ذلك ممكنًا؛ وإلا فتُعرض الأمثلة المخزنة. راجع بيانات الاعتماد ونقاط النهاية قبل تشغيل التعليمات البرمجية، إذ قد تترتب عليها رسوم.
1 الحصول على مفتاح API ↗
What you need
- Runs on
- Comfy Cloud
- المفتاح
- COMFY_API_KEY
يتطلب خطة Cloud مدفوعة ورصيدًا.
تنزيل API JSONوثائق API ↗
# 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({
"41": {
"class_type": "LoadImage",
"inputs": {
"image": "perfume_bottle.png.png"
},
"_meta": {
"title": "Reference image"
}
},
"171": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"173",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"173": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"41",
0
],
"megapixels": 1,
"resolution_steps": 16,
"upscale_method": "nearest-exact"
},
"_meta": {
"title": "Scale Image to Total Pixels"
}
},
"181": {
"class_type": "ImageCompare",
"inputs": {
"compare_view": None,
"image_a": [
"173",
0
],
"image_b": [
"182",
0
]
},
"_meta": {
"title": "Compare Images"
}
},
"182": {
"class_type": "SaveImageAdvanced",
"inputs": {
"filename_prefix": "Joy_Image_Edit",
"format": "png",
"format.bit_depth": "8-bit",
"format.input_color_space": "sRGB",
"images": [
"170:11",
0
]
},
"_meta": {
"title": "Save Image (Advanced)"
}
},
"170:10": {
"class_type": "KSampler",
"inputs": {
"cfg": 4,
"denoise": 1,
"latent_image": [
"170:178",
0
],
"model": [
"170:12",
0
],
"negative": [
"170:177",
0
],
"positive": [
"170:174",
0
],
"sampler_name": "euler",
"scheduler": "normal",
"seed": 42,
"steps": 40
},
"_meta": {
"title": "KSampler"
}
},
"170:11": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"170:10",
0
],
"vae": [
"170:5",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"170:12": {
"class_type": "CFGNorm",
"inputs": {
"model": [
"170:3",
0
],
"pre_cfg": True,
"strength": 1
},
"_meta": {
"title": "CFGNorm"
}
},
"170:174": {
"class_type": "TextEncodeJoyImageEdit",
"inputs": {
"clip": [
"170:4",
0
],
"images.image0": [
"173",
0
],
"prompt": "Change the background to a glacial scene.",
"vae": [
"170:5",
0
]
},
"_meta": {
"title": "TextEncodeJoyImageEdit (Positive)"
}
},
"170:177": {
"class_type": "TextEncodeJoyImageEdit",
"inputs": {
"clip": [
"170:4",
0
],
"images.image0": [
"173",
0
],
"prompt": "",
"vae": [
"170:5",
0
]
},
"_meta": {
"title": "TextEncodeJoyImageEdit (Positive)"
}
},
"170:178": {
"class_type": "EmptySD3LatentImage",
"inputs": {
"batch_size": 1,
"height": [
"171",
1
],
"width": [
"171",
0
]
},
"_meta": {
"title": "EmptySD3LatentImage"
}
},
"170:3": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "joyai_image_edit_int8_convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"170:4": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen3vl_8b_joyimage_edit_int8_convrot.safetensors",
"device": "default",
"type": "joyimage"
},
"_meta": {
"title": "Load CLIP"
}
},
"170:5": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "wan_2.1_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)