@@ -24,7 +24,6 @@ def save_config(args):
2424 "use_pytorch_cross_attention" : args .use_pytorch_cross_attention ,
2525 "use_sage_attention" : args .use_sage_attention ,
2626 "use_flash_attention" : args .use_flash_attention ,
27- "use_xformers" : args .use_xformers ,
2827 "extra_args" : args .extra_args ,
2928 }
3029 with open (CONFIG_FILE , "w" ) as f :
@@ -48,7 +47,7 @@ def main():
4847 parser = GooeyParser (description = "Customize settings before launching ComfyUI" )
4948
5049 # Environment Variable Configuration Tab
51- env_tab = parser .add_argument_group ('Environment Variable Configuration ' ,
50+ env_tab = parser .add_argument_group ('Environment Variables ' ,
5251 'Configure the environment variables for ComfyUI' ,
5352 gooey_options = {'show_border' : True })
5453 env_tab .add_argument ('--http_proxy' ,
@@ -77,7 +76,7 @@ def main():
7776 default = saved_config .get ("hf_endpoint" , "" ) if saved_config else '' )
7877
7978 # Launch Parameter Configuration Tab
80- launch_tab = parser .add_argument_group ('Launch Parameter Configuration ' ,
79+ launch_tab = parser .add_argument_group ('Launch Parameters ' ,
8180 'Configure the launch parameters for ComfyUI' ,
8281 gooey_options = {'show_border' : True })
8382 launch_tab .add_argument ('--disable_auto_launch' ,
@@ -100,32 +99,30 @@ def main():
10099 action = 'store_true' ,
101100 help = 'More conservative VRAM usage, reduce speed, recommended only when VRAM is insufficient (--lowvram)' ,
102101 default = saved_config .get ("lowvram" , False ) if saved_config else False )
103- # Mutually exclusive Attention Implementation options
104- attention_group = launch_tab .add_mutually_exclusive_group ()
105- attention_group .add_argument ('--use-xformers' ,
106- metavar = 'Use xFormers' ,
107- action = 'store_true' ,
108- help = 'Choose xFormers as the attention implementation. Default option' ,
109- default = saved_config .get ("use_xformers" , True ) if saved_config else True )
110- attention_group .add_argument ('--use-pytorch-cross-attention' ,
111- metavar = 'Use PyTorch native cross-attention' ,
102+ launch_tab .add_argument ('--extra_args' ,
103+ metavar = 'Additional Launch Arguments' ,
104+ help = 'Refer to ComfyUI’s cli_args.py, add extra launch parameters (e.g., " --cpu" for CPU-only mode), mind spaces' ,
105+ default = saved_config .get ("extra_args" , "" ) if saved_config else '' )
106+
107+ # Attention Implementation Configuration Tab
108+ attn_tab = parser .add_argument_group ('Attention Implementation' ,
109+ 'Options are mutually exclusive. If nothing is selected, xFormers will be used by default' ,
110+ gooey_options = {'show_border' : True })
111+ attn_tab .add_argument ('--use-pytorch-cross-attention' ,
112+ metavar = 'Disable xFormers/FlashAttention/SageAttention' ,
112113 action = 'store_true' ,
113- help = 'More stable (not better) image generation (--use-pytorch-cross-attention)' ,
114+ help = 'Use native PyTorch cross-attention. More stable (not better) image generation. Not recommended for videos (--use-pytorch-cross-attention)' ,
114115 default = saved_config .get ("use_pytorch_cross_attention" , False ) if saved_config else False )
115- attention_group .add_argument ('--use-sage-attention' ,
116+ attn_tab .add_argument ('--use-sage-attention' ,
116117 metavar = 'Use SageAttention' ,
117118 action = 'store_true' ,
118119 help = 'Better performance but less compatibility (--use-sage-attention)' ,
119120 default = saved_config .get ("use_sage_attention" , False ) if saved_config else False )
120- attention_group .add_argument ('--use-flash-attention' ,
121+ attn_tab .add_argument ('--use-flash-attention' ,
121122 metavar = 'Use FlashAttention' ,
122123 action = 'store_true' ,
123124 help = 'On par with xFormers (--use-flash-attention)' ,
124125 default = saved_config .get ("use_flash_attention" , False ) if saved_config else False )
125- launch_tab .add_argument ('--extra_args' ,
126- metavar = 'Additional Launch Arguments' ,
127- help = 'Refer to ComfyUI’s cli_args.py, add extra launch parameters (e.g., " --cpu" for CPU-only mode), mind spaces' ,
128- default = saved_config .get ("extra_args" , "" ) if saved_config else '' )
129126
130127 args = parser .parse_args ()
131128
0 commit comments