import novita_gpus
novita_gpus.api_key = "sk_xxxx"
endpoint = novita_gpus.Endpoint("0f43a6867e05fddd")
job = endpoint.run({
"workflow": {
"4": {
"class_type": "CheckpointLoaderSimple",
"inputs": {"ckpt_name": "flux1-dev-fp8.safetensors"},
},
"5": {
"class_type": "EmptyLatentImage",
"inputs": {"width": 512, "height": 512, "batch_size": 1},
},
"6": {
"class_type": "CLIPTextEncode",
"inputs": {"clip": ["4", 1], "text": "a red apple on a table"},
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {"clip": ["4", 1], "text": "blurry, low quality"},
},
"3": {
"class_type": "KSampler",
"inputs": {
"model": ["4", 0],
"positive": ["6", 0],
"negative": ["7", 0],
"latent_image": ["5", 0],
"seed": 42,
"steps": 10,
"cfg": 7,
"sampler_name": "euler",
"scheduler": "normal",
"denoise": 1,
},
},
"8": {
"class_type": "VAEDecode",
"inputs": {"samples": ["3", 0], "vae": ["4", 2]},
},
"9": {
"class_type": "SaveImage",
"inputs": {"filename_prefix": "test", "images": ["8", 0]},
},
},
"output_node_id": "9",
})
print(job.status())
print(job.output(timeout=300))