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…
About
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…
What you provide
- Reading the workflow
Runs in ComfyUI. This workflow can't run on this page. Download it and open it in ComfyUI.
Download WorkflowNo sample outputs for this workflow yet.
Inside the workflow
A read-only preview of the node graph. Open it in Comfy Cloud or download it to edit the nodes.
Loading the graph
Open full-size workflow previewFiles in this workflow
- Comfy Cloud
- Yes
- Output
- Image
- Author
- Author unavailable
Requires custom nodes
- Reading the workflow
Use this workflow from code
Generated from the workflow graph and inputs when possible; stored examples are shown otherwise. Review credentials and endpoints before running code, which may incur charges.
What you need
- Runs on
- Comfy Cloud
- Key
- COMFY_API_KEY
Needs a paid Cloud plan and credits.
# 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)