You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a fork maintained by Anthony Maranto of the original [ComfyUI-To-Python-Extension](https://github.com/pydn/ComfyUI-to-Python-Extension) by Peyton DeNiro. It provides a more robust command-line interface and the ability to export your current workflow as a script directly from the ComfyUI web interface.
8
8
@@ -38,15 +38,36 @@ options:
38
38
Overwrite the output file if it exists
39
39
```
40
40
41
-
### Other Changes
41
+
### Arguments
42
+
43
+
It is now possible to pass command-line arguments to a generated script file. Any time a **required** input variable for*any* nodein your the ComfyUI workflow is left unfilled, SaveAsScript will automatically convert that node into an argument.
42
44
43
-
I also fixed what seemed to be a minor bug with exporting certain Crystools nodes, possibly due to their unusual name.
45
+
For instance, if you have a simple default workflow, but have converted the text widget of the positive prompt into an input and left it unfilled like so:
44
46
45
-
### Improvement TODO
47
+

48
+
49
+
Then the unfilled required variable will be available as an argument:
50
+
```bash
51
+
usage: default-workflow.py [-h] text1
52
+
53
+
A converted ComfyUI workflow. Required inputs listed below. Values passed should be in JSON
54
+
55
+
positional arguments:
56
+
text1 Argument 0, input `text`for node "CLIP Text Encode (Prompt)" id 6 (autogenerated)
57
+
58
+
options:
59
+
-h, --help show this help message and exit
60
+
```
61
+
62
+
Arguments are new. **If you have any suggestions on how to improve them or on how to effectively specify defaults in the workflow and override in the command-line**, feel free to suggest that in an Issue.
63
+
64
+
### Other Changes
46
65
47
-
Disable export of invalid nodes (ones for which required args are not satisfied) and log a warning to the console.
66
+
#### Bugfixes
67
+
- Windows paths are now properly escaped.
68
+
- I also fixed what seemed to be a minor bug with exporting certain Crystools nodes, possibly due to their unusual name.
48
69
49
-
## Description of ComfyUI-to-Python-Extension (usage altered)
70
+
## Old Description of ComfyUI-to-Python-Extension (usage altered)
50
71
51
72
The `ComfyUI-to-Python-Extension` is a powerful tool that translates [ComfyUI](https://github.com/comfyanonymous/ComfyUI) workflows into executable Python code. Designed to bridge the gap between ComfyUI's visual interface and Python's programming environment, this script facilitates the seamless transition from design to code execution. Whether you're a data scientist, a software developer, or an AI enthusiast, this tool streamlines the process of implementing ComfyUI workflows in Python.
0 commit comments