MOSS-Image: Image Edit LoRA
Edit a photo with a short instruction using MOSS-Image and its edit LoRA: the instruction and the source image are encoded together, so the sampler redraws…
تنزيل سير العملجرّبه في Cloud وثائق API
حول
Edit a photo with a short instruction using MOSS-Image and its edit LoRA: the instruction and the source image are encoded together, so the sampler redraws…
ما تقدّمه
- جارٍ قراءة سير العمل
يعمل في 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({
"8": {
"class_type": "LoadImage",
"inputs": {
"image": "two_women_berets_floral_jackets.png"
},
"_meta": {
"title": "Load Image"
}
},
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "image_moss_image_edit",
"images": [
"38",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"20": {
"class_type": "ImageCompare",
"inputs": {
"compare_view": None,
"image_a": [
"8",
0
],
"image_b": [
"9",
0
]
},
"_meta": {
"title": "Compare Images"
}
},
"27": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"29",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"28": {
"class_type": "EmptyFlux2LatentImage",
"inputs": {
"batch_size": 1,
"height": [
"27",
1
],
"width": [
"27",
0
]
},
"_meta": {
"title": "Empty Flux 2 Latent"
}
},
"29": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"8",
0
],
"megapixels": 1,
"resolution_steps": 16,
"upscale_method": "lanczos"
},
"_meta": {
"title": "Image Scale To Total Pixels (reference)"
}
},
"30": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "moss_image_sft_int8_convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"31": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "moss_image_edit_lora_rank_64_bf16.safetensors",
"model": [
"30",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"32": {
"class_type": "SkipLayerGuidanceDiTSimple",
"inputs": {
"double_layers": "",
"end_percent": 1,
"model": [
"31",
0
],
"single_layers": "22",
"start_percent": 0
},
"_meta": {
"title": "SkipLayerGuidanceDiTSimple"
}
},
"33": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen3.5_9b_w4a8_gptq.safetensors",
"device": "default",
"type": "moss_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"34": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "flux2-vae_small.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"36": {
"class_type": "TextEncodeMOSSImageEdit",
"inputs": {
"clip": [
"33",
0
],
"edit_format": "Moss-Image-Edit",
"image_strength": 1,
"images.image_0": [
"29",
0
],
"prompt": "nsfw, worst quality, bad anatomy, watermark, jpeg artifact",
"vae": [
"34",
0
]
},
"_meta": {
"title": "Text Encode MOSS-Image Edit (negative)"
}
},
"37": {
"class_type": "KSampler",
"inputs": {
"cfg": 4,
"denoise": 1,
"latent_image": [
"28",
0
],
"model": [
"32",
0
],
"negative": [
"36",
0
],
"positive": [
"39",
0
],
"sampler_name": "euler",
"scheduler": "normal",
"seed": 42,
"steps": 30
},
"_meta": {
"title": "KSampler"
}
},
"38": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"37",
0
],
"vae": [
"34",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"39": {
"class_type": "TextEncodeMOSSImageEdit",
"inputs": {
"clip": [
"33",
0
],
"edit_format": "Moss-Image-Edit",
"image_strength": 1,
"images.image_0": [
"29",
0
],
"prompt": "Change only the pink floral blazer to a plain black wool coat. Keep both women, their faces, glasses, berets, poses, the embroidered cardigan and the concrete wall background unchanged.",
"vae": [
"34",
0
]
},
"_meta": {
"title": "Text Encode MOSS-Image Edit (positive)"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)