圖片
MOSS-Image — 文字生圖
橫跨 79 個可堆疊元件的 50 步驟 MOSS-Image 文字生圖。
API 參考
透過 REST 提交
使用您的個人 API 金鑰(msk_…),從您自己的工具為此工作負載建立工作。以這種方式啟動的工作,會在您於 您的裝置 連接的同一批裝置上執行——至少須有一部在線上。
https://cp.meshlabs.cloud/v1/organizations/jobs使用 X-Organization-Api-Key: msk_your_personal_api_key 進行驗證。此標頭名稱與組織金鑰相同;個人金鑰使用同一個端點。
請求內文
{
"workload_type": "moss-image-base",
"job_spec": {
"prompt": "A photorealistic lighthouse at dusk",
"width": 1024,
"height": 1024,
"steps": 50,
"shift": 5,
"compression_method": "auto8",
"compression_error_threshold": 0.01,
"compression_hq8_block": 128
}
}job_spec 欄位
| 欄位 | 必填 | 預設值 | 說明 |
|---|---|---|---|
prompt | 是 | — | 圖片的文字描述。 |
width | 否 | 1024 | 輸出寬度(像素,需為 16 的倍數)。 |
height | 否 | 1024 | 輸出高度(像素,需為 16 的倍數)。 |
steps | 否 | 50 | 去噪步數(MOSS-Image-Base 是 50 步的流匹配取樣器)。 |
seed | 否 | — | 可重現生成結果的隨機種子。 |
shift | 否 | 5 | 流匹配排程偏移。MOSS-Image-Base 以偏移 5 調校;在 512 調校的排程到了 1024 會顯得模糊,因為相同的 sigma 涵蓋了多得多的 token。 |
compression_method | 否 | auto8 | 用於節點間 FP32 DiT 啟動值交接的編解碼器。 |
compression_error_threshold | 否 | 0.01 | 有損傳輸的相對 Frobenius 誤差預算。 |
compression_hq8_block | 否 | 128 | HQ8 與 HQ4 編解碼器的 Hadamard 區塊大小。 |
cURL
curl -X POST https://cp.meshlabs.cloud/v1/organizations/jobs \
-H "X-Organization-Api-Key: msk_your_personal_api_key" \
-H "Content-Type: application/json" \
-d '{
"workload_type": "moss-image-base",
"job_spec": {
"prompt": "A photorealistic lighthouse at dusk",
"width": 1024,
"height": 1024,
"steps": 50,
"shift": 5,
"compression_method": "auto8",
"compression_error_threshold": 0.01,
"compression_hq8_block": 128
}
}'https://cp.meshlabs.cloud/v1/organizations/jobs/{job_id}使用同一個 API 金鑰輪詢,直到 status 進入終止狀態(COMPLETED、FAILED、CANCELED 或 MODERATION_BLOCKED)。啟用內容審核時,工作可能會先處於 MODERATION_PENDING 狀態,之後才進入運算佇列。已完成的工作會在每個輸出上附帶預先簽署的 download_url 值。
建立回應
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workload_type": "moss-image-base",
"status": "PENDING",
"job_spec_json": {
"prompt": "A photorealistic lighthouse at dusk",
"width": 1024,
"height": 1024,
"steps": 50,
"shift": 5,
"compression_method": "auto8",
"compression_error_threshold": 0.01,
"compression_hq8_block": 128
},
"work_units": [],
"outputs": [],
"created_at": "2026-06-08T12:00:00Z",
"updated_at": "2026-06-08T12:00:00Z"
}完成回應
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workload_type": "moss-image-base",
"status": "COMPLETED",
"job_spec_json": {
"prompt": "A photorealistic lighthouse at dusk",
"width": 1024,
"height": 1024,
"steps": 50,
"shift": 5,
"compression_method": "auto8",
"compression_error_threshold": 0.01,
"compression_hq8_block": 128
},
"work_units": [
{
"id": "…",
"index": 0,
"status": "COMPLETED"
}
],
"outputs": [
{
"id": "…",
"output_type": "<output type>",
"filename": "<output filename>",
"size_bytes": 524288,
"download_url": "<presigned output download URL>"
}
],
"created_at": "2026-06-08T12:00:00Z",
"updated_at": "<completion timestamp>"
}MOSS-Image-Base 以 50 個 Euler 流匹配步驟、搭配無分類器引導,從文字生成 1024x1024 圖片。分片刻意切得很細:Qwen3.5 文字編碼器以 token 嵌入表(四個隱藏維度切片)加上 32 個各含一個解碼器層的分片提供(常駐約 460 MB),42 區塊的雙串流 DiT 則每個分片一個區塊(常駐約 242 MB)。單元大小取決於值得接納的最弱裝置,而相連階段打包器則讓效能強大的節點可吸收管線中一長串相鄰的部分;每一對一起配置的相鄰階段,都能在每個去噪步驟省下一次 WebRTC 躍點,而承載全部階段的節點就是單節點的情況。權重以 fp16 提供、啟動值為 fp32;ONNX Runtime 會在建立工作階段時將其還原為 fp32 初始值,因此 fp16 套件能在常駐量相同、像素輸出完全一致的情況下,讓下載量減半。