File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed 
packages/app/src/services/settings/workflows Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,18 @@ export function parseWorkflow(
4949      throw  new  Error ( `the workflow data seems invalid` ) 
5050    } 
5151    if  ( maybeWorkflow . engine  ==  ClapWorkflowEngine . COMFYUI_WORKFLOW )  { 
52-       const  {  inputFields,  inputValues }  = 
53-         convertComfyUiWorkflowApiToClapWorkflow ( maybeWorkflow . data ) 
54-       maybeWorkflow . inputFields  =  inputFields 
55-       maybeWorkflow . inputValues  =  inputValues 
52+       // The `data` comfyui workflow doesn't have info about custom 
53+       // inputFields/inputValues, it gets only the default ones based on the nodes 
54+       const  { 
55+         inputFields : defaultInputFields , 
56+         inputValues : defaultInputValues , 
57+       }  =  convertComfyUiWorkflowApiToClapWorkflow ( maybeWorkflow . data ) 
58+       // Use the already existing inputFields/inputValues, otherwise use the default 
59+       // ones based on the raw comfyui workflow data 
60+       maybeWorkflow . inputFields  = 
61+         maybeWorkflow . inputFields  ||  defaultInputFields 
62+       maybeWorkflow . inputValues  = 
63+         maybeWorkflow . inputValues  ||  defaultInputValues 
5664    } 
5765    return  maybeWorkflow 
5866  }  catch  ( err )  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments