LCOV - code coverage report
Current view: top level - src/scripts - defaultGraph.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 100.0 % 3 3
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : import type { ComfyWorkflowJSON } from '@comfyorg/graph-model/workflowSchema'
       2              : 
       3              : const testDefaultGraph: ComfyWorkflowJSON = {
       4              :   last_node_id: 9,
       5              :   last_link_id: 9,
       6              :   nodes: [
       7              :     {
       8              :       id: 7,
       9              :       type: 'CLIPTextEncode',
      10              :       pos: [413, 389],
      11              :       size: [425.27801513671875, 180.6060791015625],
      12              :       flags: {},
      13              :       order: 3,
      14              :       mode: 0,
      15              :       inputs: [{ name: 'clip', type: 'CLIP', link: 5 }],
      16              :       outputs: [
      17              :         {
      18              :           name: 'CONDITIONING',
      19              :           type: 'CONDITIONING',
      20              :           links: [6],
      21              :           slot_index: 0
      22              :         }
      23              :       ],
      24              :       properties: {},
      25              :       widgets_values: ['text, watermark']
      26              :     },
      27              :     {
      28              :       id: 6,
      29              :       type: 'CLIPTextEncode',
      30              :       pos: [415, 186],
      31              :       size: [422.84503173828125, 164.31304931640625],
      32              :       flags: {},
      33              :       order: 2,
      34              :       mode: 0,
      35              :       inputs: [{ name: 'clip', type: 'CLIP', link: 3 }],
      36              :       outputs: [
      37              :         {
      38              :           name: 'CONDITIONING',
      39              :           type: 'CONDITIONING',
      40              :           links: [4],
      41              :           slot_index: 0
      42              :         }
      43              :       ],
      44              :       properties: {},
      45              :       widgets_values: [
      46              :         'beautiful scenery nature glass bottle landscape, , purple galaxy bottle,'
      47              :       ]
      48              :     },
      49              :     {
      50              :       id: 5,
      51              :       type: 'EmptyLatentImage',
      52              :       pos: [473, 609],
      53              :       size: [315, 106],
      54              :       flags: {},
      55              :       order: 1,
      56              :       mode: 0,
      57              :       outputs: [{ name: 'LATENT', type: 'LATENT', links: [2], slot_index: 0 }],
      58              :       properties: {},
      59              :       widgets_values: [512, 512, 1]
      60              :     },
      61              :     {
      62              :       id: 3,
      63              :       type: 'KSampler',
      64              :       pos: [863, 186],
      65              :       size: [315, 262],
      66              :       flags: {},
      67              :       order: 4,
      68              :       mode: 0,
      69              :       inputs: [
      70              :         { name: 'model', type: 'MODEL', link: 1 },
      71              :         { name: 'positive', type: 'CONDITIONING', link: 4 },
      72              :         { name: 'negative', type: 'CONDITIONING', link: 6 },
      73              :         { name: 'latent_image', type: 'LATENT', link: 2 }
      74              :       ],
      75              :       outputs: [{ name: 'LATENT', type: 'LATENT', links: [7], slot_index: 0 }],
      76              :       properties: {},
      77              :       widgets_values: [156680208700286, true, 20, 8, 'euler', 'normal', 1]
      78              :     },
      79              :     {
      80              :       id: 8,
      81              :       type: 'VAEDecode',
      82              :       pos: [1209, 188],
      83              :       size: [210, 46],
      84              :       flags: {},
      85              :       order: 5,
      86              :       mode: 0,
      87              :       inputs: [
      88              :         { name: 'samples', type: 'LATENT', link: 7 },
      89              :         { name: 'vae', type: 'VAE', link: 8 }
      90              :       ],
      91              :       outputs: [{ name: 'IMAGE', type: 'IMAGE', links: [9], slot_index: 0 }],
      92              :       properties: {}
      93              :     },
      94              :     {
      95              :       id: 9,
      96              :       type: 'SaveImage',
      97              :       pos: [1451, 189],
      98              :       size: [210, 26],
      99              :       flags: {},
     100              :       order: 6,
     101              :       mode: 0,
     102              :       inputs: [{ name: 'images', type: 'IMAGE', link: 9 }],
     103              :       properties: {}
     104              :     },
     105              :     {
     106              :       id: 4,
     107              :       type: 'CheckpointLoaderSimple',
     108              :       pos: [26, 474],
     109              :       size: [315, 98],
     110              :       flags: {},
     111              :       order: 0,
     112              :       mode: 0,
     113              :       outputs: [
     114              :         { name: 'MODEL', type: 'MODEL', links: [1], slot_index: 0 },
     115              :         { name: 'CLIP', type: 'CLIP', links: [3, 5], slot_index: 1 },
     116              :         { name: 'VAE', type: 'VAE', links: [8], slot_index: 2 }
     117              :       ],
     118              :       properties: {
     119              :         models: [
     120              :           {
     121              :             name: 'v1-5-pruned-emaonly-fp16.safetensors',
     122              :             url: 'https://huggingface.co/Comfy-Org/stable-diffusion-v1-5-archive/resolve/main/v1-5-pruned-emaonly-fp16.safetensors',
     123              :             directory: 'checkpoints'
     124              :           }
     125              :         ]
     126              :       },
     127              :       widgets_values: ['v1-5-pruned-emaonly-fp16.safetensors']
     128              :     }
     129              :   ],
     130              :   links: [
     131              :     [1, 4, 0, 3, 0, 'MODEL'],
     132              :     [2, 5, 0, 3, 3, 'LATENT'],
     133              :     [3, 4, 1, 6, 0, 'CLIP'],
     134              :     [4, 6, 0, 3, 1, 'CONDITIONING'],
     135              :     [5, 4, 1, 7, 0, 'CLIP'],
     136              :     [6, 7, 0, 3, 2, 'CONDITIONING'],
     137              :     [7, 3, 0, 8, 0, 'LATENT'],
     138              :     [8, 4, 2, 8, 1, 'VAE'],
     139              :     [9, 8, 0, 9, 0, 'IMAGE']
     140              :   ],
     141              :   groups: [],
     142              :   config: {},
     143              :   extra: {
     144              :     ds: {
     145              :       offset: [0, 0],
     146              :       scale: 1
     147              :     }
     148              :   },
     149              :   version: 0.4
     150              : }
     151              : 
     152              : const prodDefaultGraph: ComfyWorkflowJSON = {
     153              :   last_node_id: 71,
     154              :   last_link_id: 82,
     155              :   nodes: [
     156              :     {
     157              :       id: 9,
     158              :       type: 'SaveImage',
     159              :       pos: [1279.9999726783708, 319.9999392082668],
     160              :       size: [300, 420],
     161              :       flags: {},
     162              :       order: 9,
     163              :       mode: 0,
     164              :       inputs: [
     165              :         {
     166              :           name: 'images',
     167              :           type: 'IMAGE',
     168              :           link: 80
     169              :         }
     170              :       ],
     171              :       outputs: [],
     172              :       properties: {
     173              :         'Node name for S&R': 'SaveImage',
     174              :         cnr_id: 'comfy-core',
     175              :         ver: '0.3.64',
     176              :         enableTabs: false,
     177              :         tabWidth: 65,
     178              :         tabXOffset: 10,
     179              :         hasSecondTab: false,
     180              :         secondTabText: 'Send Back',
     181              :         secondTabOffset: 80,
     182              :         secondTabWidth: 65
     183              :       },
     184              :       widgets_values: ['ComfyUI']
     185              :     },
     186              :     {
     187              :       id: 62,
     188              :       type: 'CLIPLoader',
     189              :       pos: [-239.9999987113997, 420.0000536491848],
     190              :       size: [340, 169.3125],
     191              :       flags: {},
     192              :       order: 0,
     193              :       mode: 0,
     194              :       inputs: [],
     195              :       outputs: [
     196              :         {
     197              :           name: 'CLIP',
     198              :           type: 'CLIP',
     199              :           links: [79, 81]
     200              :         }
     201              :       ],
     202              :       properties: {
     203              :         'Node name for S&R': 'CLIPLoader',
     204              :         cnr_id: 'comfy-core',
     205              :         ver: '0.3.73',
     206              :         models: [
     207              :           {
     208              :             name: 'qwen_3_4b.safetensors',
     209              :             url: 'https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors',
     210              :             directory: 'text_encoders'
     211              :           }
     212              :         ],
     213              :         enableTabs: false,
     214              :         tabWidth: 65,
     215              :         tabXOffset: 10,
     216              :         hasSecondTab: false,
     217              :         secondTabText: 'Send Back',
     218              :         secondTabOffset: 80,
     219              :         secondTabWidth: 65
     220              :       },
     221              :       widgets_values: ['qwen_3_4b.safetensors', 'lumina2', 'default']
     222              :     },
     223              :     {
     224              :       id: 63,
     225              :       type: 'VAELoader',
     226              :       pos: [659.9998200904802, 699.9998629143215],
     227              :       size: [320, 106.65625],
     228              :       flags: {},
     229              :       order: 1,
     230              :       mode: 0,
     231              :       inputs: [],
     232              :       outputs: [
     233              :         {
     234              :           name: 'VAE',
     235              :           type: 'VAE',
     236              :           links: [74]
     237              :         }
     238              :       ],
     239              :       properties: {
     240              :         'Node name for S&R': 'VAELoader',
     241              :         cnr_id: 'comfy-core',
     242              :         ver: '0.3.73',
     243              :         models: [
     244              :           {
     245              :             name: 'ae.safetensors',
     246              :             url: 'https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/vae/ae.safetensors',
     247              :             directory: 'vae'
     248              :           }
     249              :         ],
     250              :         enableTabs: false,
     251              :         tabWidth: 65,
     252              :         tabXOffset: 10,
     253              :         hasSecondTab: false,
     254              :         secondTabText: 'Send Back',
     255              :         secondTabOffset: 80,
     256              :         secondTabWidth: 65
     257              :       },
     258              :       widgets_values: ['ae.safetensors']
     259              :     },
     260              :     {
     261              :       id: 65,
     262              :       type: 'VAEDecode',
     263              :       pos: [1019.9998200904802, 319.9999392082668],
     264              :       size: [225, 96],
     265              :       flags: {},
     266              :       order: 8,
     267              :       mode: 0,
     268              :       inputs: [
     269              :         {
     270              :           name: 'samples',
     271              :           type: 'LATENT',
     272              :           link: 73
     273              :         },
     274              :         {
     275              :           name: 'vae',
     276              :           type: 'VAE',
     277              :           link: 74
     278              :         }
     279              :       ],
     280              :       outputs: [
     281              :         {
     282              :           name: 'IMAGE',
     283              :           type: 'IMAGE',
     284              :           slot_index: 0,
     285              :           links: [80]
     286              :         }
     287              :       ],
     288              :       properties: {
     289              :         'Node name for S&R': 'VAEDecode',
     290              :         cnr_id: 'comfy-core',
     291              :         ver: '0.3.64',
     292              :         enableTabs: false,
     293              :         tabWidth: 65,
     294              :         tabXOffset: 10,
     295              :         hasSecondTab: false,
     296              :         secondTabText: 'Send Back',
     297              :         secondTabOffset: 80,
     298              :         secondTabWidth: 65
     299              :       },
     300              :       widgets_values: []
     301              :     },
     302              :     {
     303              :       id: 66,
     304              :       type: 'UNETLoader',
     305              :       pos: [-239.9999987113997, 110.00000596546897],
     306              :       size: [380, 134.65625],
     307              :       flags: {},
     308              :       order: 2,
     309              :       mode: 0,
     310              :       inputs: [],
     311              :       outputs: [
     312              :         {
     313              :           name: 'MODEL',
     314              :           type: 'MODEL',
     315              :           links: [72]
     316              :         }
     317              :       ],
     318              :       properties: {
     319              :         'Node name for S&R': 'UNETLoader',
     320              :         cnr_id: 'comfy-core',
     321              :         ver: '0.3.73',
     322              :         models: [
     323              :           {
     324              :             name: 'z_image_turbo_bf16.safetensors',
     325              :             url: 'https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/diffusion_models/z_image_turbo_bf16.safetensors',
     326              :             directory: 'diffusion_models'
     327              :           }
     328              :         ],
     329              :         enableTabs: false,
     330              :         tabWidth: 65,
     331              :         tabXOffset: 10,
     332              :         hasSecondTab: false,
     333              :         secondTabText: 'Send Back',
     334              :         secondTabOffset: 80,
     335              :         secondTabWidth: 65
     336              :       },
     337              :       widgets_values: ['z_image_turbo_bf16.safetensors', 'default']
     338              :     },
     339              :     {
     340              :       id: 67,
     341              :       type: 'CLIPTextEncode',
     342              :       pos: [170.00001082534345, 290.0000536491848],
     343              :       size: [410, 160],
     344              :       flags: {},
     345              :       order: 4,
     346              :       mode: 0,
     347              :       inputs: [
     348              :         {
     349              :           name: 'clip',
     350              :           type: 'CLIP',
     351              :           link: 79
     352              :         }
     353              :       ],
     354              :       outputs: [
     355              :         {
     356              :           name: 'CONDITIONING',
     357              :           type: 'CONDITIONING',
     358              :           links: [76]
     359              :         }
     360              :       ],
     361              :       properties: {
     362              :         'Node name for S&R': 'CLIPTextEncode',
     363              :         cnr_id: 'comfy-core',
     364              :         ver: '0.3.73',
     365              :         enableTabs: false,
     366              :         tabWidth: 65,
     367              :         tabXOffset: 10,
     368              :         hasSecondTab: false,
     369              :         secondTabText: 'Send Back',
     370              :         secondTabOffset: 80,
     371              :         secondTabWidth: 65
     372              :       },
     373              :       widgets_values: [
     374              :         'anime RPG game style, cute anime girl with gigantic fennec ears and a big fluffy fox tail with long wavy blonde hair and large blue eyes blonde colored eyelashes wearing a pink sweater a large oversized gold trimmed black winter coat and a long blue maxi skirt and a red scarf, she is sitting beside a campfire in the wilderness at night playing guitar with a milky way galaxy sky'
     375              :       ]
     376              :     },
     377              :     {
     378              :       id: 68,
     379              :       type: 'EmptySD3LatentImage',
     380              :       pos: [310.0000489723161, 700.0000155022121],
     381              :       size: [260, 168],
     382              :       flags: {},
     383              :       order: 3,
     384              :       mode: 0,
     385              :       inputs: [],
     386              :       outputs: [
     387              :         {
     388              :           name: 'LATENT',
     389              :           type: 'LATENT',
     390              :           slot_index: 0,
     391              :           links: [78]
     392              :         }
     393              :       ],
     394              :       properties: {
     395              :         'Node name for S&R': 'EmptySD3LatentImage',
     396              :         cnr_id: 'comfy-core',
     397              :         ver: '0.3.64',
     398              :         enableTabs: false,
     399              :         tabWidth: 65,
     400              :         tabXOffset: 10,
     401              :         hasSecondTab: false,
     402              :         secondTabText: 'Send Back',
     403              :         secondTabOffset: 80,
     404              :         secondTabWidth: 65
     405              :       },
     406              :       widgets_values: [1024, 1024, 1]
     407              :     },
     408              :     {
     409              :       id: 69,
     410              :       type: 'ModelSamplingAuraFlow',
     411              :       pos: [220.00001082534345, 110.00000596546897],
     412              :       size: [310, 104],
     413              :       flags: {},
     414              :       order: 6,
     415              :       mode: 0,
     416              :       inputs: [
     417              :         {
     418              :           name: 'model',
     419              :           type: 'MODEL',
     420              :           link: 72
     421              :         }
     422              :       ],
     423              :       outputs: [
     424              :         {
     425              :           name: 'MODEL',
     426              :           type: 'MODEL',
     427              :           slot_index: 0,
     428              :           links: [75]
     429              :         }
     430              :       ],
     431              :       properties: {
     432              :         'Node name for S&R': 'ModelSamplingAuraFlow',
     433              :         cnr_id: 'comfy-core',
     434              :         ver: '0.3.64',
     435              :         enableTabs: false,
     436              :         tabWidth: 65,
     437              :         tabXOffset: 10,
     438              :         hasSecondTab: false,
     439              :         secondTabText: 'Send Back',
     440              :         secondTabOffset: 80,
     441              :         secondTabWidth: 65
     442              :       },
     443              :       widgets_values: [3]
     444              :     },
     445              :     {
     446              :       id: 70,
     447              :       type: 'KSampler',
     448              :       pos: [659.9998200904802, 319.9999392082668],
     449              :       size: [315, 341.3125],
     450              :       flags: {},
     451              :       order: 7,
     452              :       mode: 0,
     453              :       inputs: [
     454              :         {
     455              :           name: 'model',
     456              :           type: 'MODEL',
     457              :           link: 75
     458              :         },
     459              :         {
     460              :           name: 'positive',
     461              :           type: 'CONDITIONING',
     462              :           link: 76
     463              :         },
     464              :         {
     465              :           name: 'negative',
     466              :           type: 'CONDITIONING',
     467              :           link: 82
     468              :         },
     469              :         {
     470              :           name: 'latent_image',
     471              :           type: 'LATENT',
     472              :           link: 78
     473              :         }
     474              :       ],
     475              :       outputs: [
     476              :         {
     477              :           name: 'LATENT',
     478              :           type: 'LATENT',
     479              :           slot_index: 0,
     480              :           links: [73]
     481              :         }
     482              :       ],
     483              :       properties: {
     484              :         'Node name for S&R': 'KSampler',
     485              :         cnr_id: 'comfy-core',
     486              :         ver: '0.3.64',
     487              :         enableTabs: false,
     488              :         tabWidth: 65,
     489              :         tabXOffset: 10,
     490              :         hasSecondTab: false,
     491              :         secondTabText: 'Send Back',
     492              :         secondTabOffset: 80,
     493              :         secondTabWidth: 65
     494              :       },
     495              :       widgets_values: [42, 'fixed', 8, 1, 'res_multistep', 'simple', 1]
     496              :     },
     497              :     {
     498              :       id: 71,
     499              :       type: 'CLIPTextEncode',
     500              :       pos: [170.00001082534345, 520.0000536491848],
     501              :       size: [405.46875, 140],
     502              :       flags: {},
     503              :       order: 5,
     504              :       mode: 0,
     505              :       inputs: [
     506              :         {
     507              :           name: 'clip',
     508              :           type: 'CLIP',
     509              :           link: 81
     510              :         }
     511              :       ],
     512              :       outputs: [
     513              :         {
     514              :           name: 'CONDITIONING',
     515              :           type: 'CONDITIONING',
     516              :           links: [82]
     517              :         }
     518              :       ],
     519              :       properties: {
     520              :         'Node name for S&R': 'CLIPTextEncode',
     521              :         cnr_id: 'comfy-core',
     522              :         ver: '0.3.73',
     523              :         enableTabs: false,
     524              :         tabWidth: 65,
     525              :         tabXOffset: 10,
     526              :         hasSecondTab: false,
     527              :         secondTabText: 'Send Back',
     528              :         secondTabOffset: 80,
     529              :         secondTabWidth: 65
     530              :       },
     531              :       widgets_values: [
     532              :         'low quality, bad anatomy, extra digits, missing digits, extra limbs, missing limbs'
     533              :       ]
     534              :     }
     535              :   ],
     536              :   links: [
     537              :     [72, 66, 0, 69, 0, 'MODEL'],
     538              :     [73, 70, 0, 65, 0, 'LATENT'],
     539              :     [74, 63, 0, 65, 1, 'VAE'],
     540              :     [75, 69, 0, 70, 0, 'MODEL'],
     541              :     [76, 67, 0, 70, 1, 'CONDITIONING'],
     542              :     [78, 68, 0, 70, 3, 'LATENT'],
     543              :     [79, 62, 0, 67, 0, 'CLIP'],
     544              :     [80, 65, 0, 9, 0, 'IMAGE'],
     545              :     [81, 62, 0, 71, 0, 'CLIP'],
     546              :     [82, 71, 0, 70, 2, 'CONDITIONING']
     547              :   ],
     548              :   groups: [],
     549              :   config: {},
     550              :   extra: {
     551              :     ds: {
     552              :       scale: 0.9,
     553              :       offset: [416, 110]
     554              :     }
     555              :   },
     556              :   version: 0.4
     557              : }
     558              : 
     559         2356 : export const defaultGraph: ComfyWorkflowJSON =
     560              :   import.meta.env.VITE_USE_LEGACY_DEFAULT_GRAPH === 'true'
     561              :     ? testDefaultGraph
     562              :     : prodDefaultGraph
     563              : 
     564         2356 : export const defaultGraphJSON = JSON.stringify(defaultGraph)
     565              : 
     566         2356 : export const blankGraph: ComfyWorkflowJSON = {
     567              :   last_node_id: 0,
     568              :   last_link_id: 0,
     569              :   nodes: [],
     570              :   links: [],
     571              :   groups: [],
     572              :   config: {},
     573              :   extra: {},
     574              :   version: 0.4
     575              : }
        

Generated by: LCOV version 2.0-1