MOSS-Image: Color & Depth Control
Re-pose and re-style a reference photo with MOSS-Image: the graph estimates the reference's geometry with MoGe 3, then generates a new image that keeps the…
تنزيل سير العملجرّبه في Cloud وثائق API
حول
Re-pose and re-style a reference photo with MOSS-Image: the graph estimates the reference's geometry with MoGe 3, then generates a new image that keeps the…
ما تقدّمه
- جارٍ قراءة سير العمل
يعمل في 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({
"1": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "moss_image_sft_int8_convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"2": {
"class_type": "SkipLayerGuidanceDiTSimple",
"inputs": {
"double_layers": "",
"end_percent": 1,
"model": [
"36",
0
],
"single_layers": "24",
"start_percent": 0
},
"_meta": {
"title": "SkipLayerGuidanceDiTSimple (uncond skips block 22)"
}
},
"3": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen3.5_9b_int8_convrot.safetensors",
"device": "default",
"type": "moss_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"4": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "flux2-vae_small.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"5": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"3",
0
],
"text": "a photograph of a woman in the night city"
},
"_meta": {
"title": "Positive Prompt"
}
},
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"3",
0
],
"text": "nsfw, worst quality, bad anatomy, watermark, jpeg artifact"
},
"_meta": {
"title": "Negative Prompt"
}
},
"9": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"20",
0
],
"vae": [
"4",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"16": {
"class_type": "TemporalScoreRescaling",
"inputs": {
"model": [
"49",
0
],
"tsr_k": 0.95,
"tsr_sigma": 1
},
"_meta": {
"title": "TSR - Temporal Score Rescaling"
}
},
"20": {
"class_type": "SamplerCustom",
"inputs": {
"add_noise": True,
"cfg": 3,
"latent_image": [
"54",
0
],
"model": [
"2",
0
],
"negative": [
"53",
1
],
"noise_seed": 1099957152091484,
"positive": [
"53",
0
],
"sampler": [
"21",
0
],
"sigmas": [
"22",
0
]
},
"_meta": {
"title": "SamplerCustom"
}
},
"21": {
"class_type": "SamplerER_SDE",
"inputs": {
"eta": 1,
"max_stage": 3,
"s_noise": 1.05,
"solver_type": "ER-SDE"
},
"_meta": {
"title": "SamplerER_SDE"
}
},
"22": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"2",
0
],
"scheduler": "simple",
"steps": 25
},
"_meta": {
"title": "BasicScheduler"
}
},
"36": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"16",
0
],
"sampling": "flow",
"shift": 5
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"49": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "moss_image_color_depth_control.safetensors",
"model": [
"1",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"53": {
"class_type": "MOSSImageControl",
"inputs": {
"depth_map": [
"79",
0
],
"end_percent": 0.6,
"negative": [
"6",
0
],
"positive": [
"5",
0
],
"start_percent": 0,
"strength": 1,
"vae": [
"4",
0
]
},
"_meta": {
"title": "MOSS-Image Color/Depth Control"
}
},
"54": {
"class_type": "EmptyLatentImage",
"inputs": {
"batch_size": 1,
"height": [
"61",
1
],
"width": [
"61",
0
]
},
"_meta": {
"title": "Empty Latent Image"
}
},
"55": {
"class_type": "LoadImage",
"inputs": {
"image": "fashion_portrait_red_canyon.png"
},
"_meta": {
"title": "Load Image"
}
},
"61": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"77",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"77": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"55",
0
],
"megapixels": 1,
"resolution_steps": 16,
"upscale_method": "lanczos"
},
"_meta": {
"title": "Scale Image to Total Pixels"
}
},
"79": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"76:75",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"80": {
"class_type": "ImageCompare",
"inputs": {
"compare_view": {
"__value__": [
"",
""
]
},
"image_a": [
"79",
0
],
"image_b": [
"85",
0
]
},
"_meta": {
"title": "Compare Images"
}
},
"81": {
"class_type": "Painter",
"inputs": {
"bg_color": "#000000",
"height": 512,
"mask": "",
"width": 512
},
"_meta": {
"title": "Painter"
}
},
"85": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "image_moss_image_color_depth_control",
"images": [
"9",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"76:73": {
"class_type": "LoadMoGeModel",
"inputs": {
"model_name": "moge_3_vitg_fp16.safetensors"
},
"_meta": {
"title": "Load MoGe Model"
}
},
"76:74": {
"class_type": "MoGeInference",
"inputs": {
"apply_mask": True,
"batch_size": 4,
"force_projection": True,
"fov_x_degrees": 0,
"image": [
"77",
0
],
"moge_model": [
"76:73",
0
],
"refine_steps": 3,
"resolution_level": 9
},
"_meta": {
"title": "Run MoGe Inference"
}
},
"76:75": {
"class_type": "MoGeRender",
"inputs": {
"moge_geometry": [
"76:74",
0
],
"output": "depth"
},
"_meta": {
"title": "Render MoGe Geometry"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)