|
| 1 | +{ |
| 2 | + "1": { |
| 3 | + "class_type": "LoadImage", |
| 4 | + "inputs": { |
| 5 | + "image": "example.png" |
| 6 | + } |
| 7 | + }, |
| 8 | + "2": { |
| 9 | + "class_type": "ImageToLlamaCppBase64", |
| 10 | + "inputs": { |
| 11 | + "image": ["1", 0], |
| 12 | + "prompt": "Describe this image in rich detail for use as an image generation prompt. Focus on subject, composition, lighting, colors, style, and mood. Output only the prompt text, no preamble." |
| 13 | + } |
| 14 | + }, |
| 15 | + "3": { |
| 16 | + "class_type": "LlamaCppClient", |
| 17 | + "inputs": { |
| 18 | + "server_url": "http://llama-cpp-service.llama-cpp.svc.cluster.local:8080", |
| 19 | + "endpoint": "chat_completions", |
| 20 | + "prompt": "", |
| 21 | + "system_message": "You are an expert image description assistant. When given an image, produce a detailed, vivid text-to-image prompt that would recreate a similar image. Include subject, setting, lighting, colors, composition, artistic style, and mood. Output ONLY the prompt text with no preamble, labels, or explanation.", |
| 22 | + "user_message": ["2", 1], |
| 23 | + "image_data": ["2", 0], |
| 24 | + "temperature": 0.6, |
| 25 | + "n_predict": 256, |
| 26 | + "max_tokens": 256 |
| 27 | + } |
| 28 | + }, |
| 29 | + "4": { |
| 30 | + "class_type": "CLIPTextEncode", |
| 31 | + "inputs": { |
| 32 | + "text": ["3", 0], |
| 33 | + "clip": ["6", 0] |
| 34 | + } |
| 35 | + }, |
| 36 | + "5": { |
| 37 | + "class_type": "CLIPTextEncode", |
| 38 | + "inputs": { |
| 39 | + "text": "blurry, low quality, distorted, watermark, text, deformed", |
| 40 | + "clip": ["6", 0] |
| 41 | + } |
| 42 | + }, |
| 43 | + "6": { |
| 44 | + "class_type": "DualCLIPLoader", |
| 45 | + "inputs": { |
| 46 | + "clip_name1": "clip_l.safetensors", |
| 47 | + "clip_name2": "t5xxl_fp8_e4m3fn.safetensors", |
| 48 | + "type": "flux" |
| 49 | + } |
| 50 | + }, |
| 51 | + "7": { |
| 52 | + "class_type": "UNETLoader", |
| 53 | + "inputs": { |
| 54 | + "unet_name": "z_image_turbo_bf16.safetensors", |
| 55 | + "weight_dtype": "fp8_e4m3fn" |
| 56 | + } |
| 57 | + }, |
| 58 | + "8": { |
| 59 | + "class_type": "VAELoader", |
| 60 | + "inputs": { |
| 61 | + "vae_name": "ae.safetensors" |
| 62 | + } |
| 63 | + }, |
| 64 | + "9": { |
| 65 | + "class_type": "EmptyLatentImage", |
| 66 | + "inputs": { |
| 67 | + "width": 1024, |
| 68 | + "height": 1024, |
| 69 | + "batch_size": 1 |
| 70 | + } |
| 71 | + }, |
| 72 | + "10": { |
| 73 | + "class_type": "KSampler", |
| 74 | + "inputs": { |
| 75 | + "seed": 0, |
| 76 | + "steps": 9, |
| 77 | + "cfg": 1.0, |
| 78 | + "sampler_name": "euler", |
| 79 | + "scheduler": "normal", |
| 80 | + "denoise": 1.0, |
| 81 | + "model": ["7", 0], |
| 82 | + "positive": ["4", 0], |
| 83 | + "negative": ["5", 0], |
| 84 | + "latent_image": ["9", 0] |
| 85 | + } |
| 86 | + }, |
| 87 | + "11": { |
| 88 | + "class_type": "VAEDecode", |
| 89 | + "inputs": { |
| 90 | + "samples": ["10", 0], |
| 91 | + "vae": ["8", 0] |
| 92 | + } |
| 93 | + }, |
| 94 | + "12": { |
| 95 | + "class_type": "SaveImage", |
| 96 | + "inputs": { |
| 97 | + "filename_prefix": "vision-to-image", |
| 98 | + "images": ["11", 0] |
| 99 | + } |
| 100 | + } |
| 101 | +} |
0 commit comments