Anima Base v1:文字轉圖像
輸入描述動漫或藝術插畫的文字提示,生成以動漫概念、角色或風格為主的非寫實圖像。
下載工作流程在 Cloud 中試用 API 文件
工作流程內部
來源範本的唯讀預覽。請在 Cloud 中開啟,以探索節點並進行變更。
Loading the graph
Open full-size workflow preview從您的程式碼呼叫此模型
以下請求使用與 Playground 相同的已準備節點圖和設定。每次提交都可能啟動付費執行;若提交結果不明,請勿自動重試提交。
1 取得 API 金鑰 ↗
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 Cloud 方案與點數。
下載 API JSONAPI 文件 ↗
# 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({
"46": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "Anima",
"images": [
"60:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"60:11": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"60:45",
0
],
"text": "An anime illustration from an expansive, distant low-angle perspective. A slender East Asian teenage girl with long braided midnight-black hair stands poised atop the edge of a crumbling skyscraper roof, overlooking an immense neon metropolis at midnight. She wears an oversized iridescent violet windbreaker with glowing amber trims, dark cargo shorts, and fingerless gloves. One hand rests on her hip while she looks out toward the horizon with a calm, resolute smirk. The sprawling urban vista extends outward under a hazy night sky, illuminated by vibrant crimson neon signs, cyan reflections across glass facades, and deep indigo shadows. Crisp cel-shaded character styling combines with sharp ink line art and a lush, richly textured painterly background."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"60:12": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"60:45",
0
],
"text": "worst quality, low quality, score_1, score_2, score_3, blurry, jpeg artifacts, sepia"
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"60:15": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"60:19": {
"class_type": "KSampler",
"inputs": {
"cfg": 4,
"denoise": 1,
"latent_image": [
"60:28",
0
],
"model": [
"60:44",
0
],
"negative": [
"60:12",
0
],
"positive": [
"60:11",
0
],
"sampler_name": "er_sde",
"scheduler": "simple",
"seed": 875817230929465,
"steps": 30
},
"_meta": {
"title": "KSampler"
}
},
"60:28": {
"class_type": "EmptyLatentImage",
"inputs": {
"batch_size": 1,
"height": 768,
"width": 1344
},
"_meta": {
"title": "Empty Latent Image"
}
},
"60:44": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "anima-base-v1.0.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"60:45": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_3_06b_base.safetensors",
"device": "default",
"type": "stable_diffusion"
},
"_meta": {
"title": "Load CLIP"
}
},
"60:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"60:19",
0
],
"vae": [
"60:15",
0
]
},
"_meta": {
"title": "VAE Decode"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)
for output in job.get_outputs("46"):
output.to_file(output.name)