Open DiffusionDen opened 1 month ago
I can add a method for transpiler to get inputs. But there are still ohter problems: how does one modify them? And after running the workflow, how does one get the outputs? Ideally, this should be a workflow class:
@dataclass
class WorkflowInput:
class_type: str
node_name: str
default_value: Any
@dataclass
class WorkflowOutput:
class_type: str
node_name: str
value: Any
class TranspiledWorkflow:
def inputs(self) -> list[WorkflowInput]:
pass
def run(self, inputs: list[Any]) -> list[WorkflowOutput]:
int, int2, float, ... = inputs
...
However, I'm not sure if transpiling is really needed in your case. If you don't need to edit the workflow, maybe directly using the API format JSON is easier? Parsing the inputs and outputs is not hard for API format.
Hi, I'm wanting to set up my workflows so that they have input nodes like the image attached. The problem is that when the transpiler is naming the varables, they just appear as int, string, float etc.
I wanted to set it up like this so I can run the transpile output through more scripts to set up things like dynamically adding UI elements to the web interface I'm creating to control them.
Here's my workflow:
Which outputs as:
I know I could go through and edit them manually, but I'm planning on adding a large amount of workflows to my site. Do you have any suggestions on how I could get it to work in a more automatic way?