File tree Expand file tree Collapse file tree 3 files changed +4
-11
lines changed
Expand file tree Collapse file tree 3 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 1313 <ControlTemplate >
1414 <controls : Card x : Name =" PART_Card" >
1515 <StackPanel Spacing =" 8" >
16- <TextBlock Text =" Enable CUDNN" FontSize =" 14" FontWeight =" Bold" />
17- <ToggleSwitch
18- IsChecked =" {Binding EnableCudnn}"
19- Margin =" 8,0,4,0"
20- HorizontalAlignment =" Stretch" />
21-
2216 <TextBlock Text =" Disable CUDNN" FontSize =" 14" FontWeight =" Bold" />
2317 <ToggleSwitch
2418 IsChecked =" {Binding DisableCudnn}"
Original file line number Diff line number Diff line change @@ -15,7 +15,4 @@ public partial class CfzCudnnToggleCardViewModel : LoadableViewModelBase
1515
1616 [ ObservableProperty ]
1717 private bool disableCudnn = true ;
18-
19- [ ObservableProperty ]
20- private bool cudnnBenchmark = false ;
2118}
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public CfzCudnnToggleModule(IServiceManager<ViewModelBase> vmFactory)
1919 : base ( vmFactory )
2020 {
2121 Title = "CUDNN Toggle (ComfyUI-Zluda)" ;
22+ AddCards ( vmFactory . Get < CfzCudnnToggleCardViewModel > ( ) ) ;
2223 }
2324
2425 /// <summary>
@@ -37,6 +38,7 @@ protected override void OnApplyStep(ModuleApplyStepEventArgs e)
3738 // Check if primary is a latent (from sampler output)
3839 if ( primary . IsT0 ) // T0 is LatentNodeConnection
3940 {
41+ var card = GetCard < CfzCudnnToggleCardViewModel > ( ) ;
4042 var latentConnection = primary . AsT0 ;
4143
4244 // Insert CUDNN toggle node between sampler and VAE decode
@@ -47,8 +49,8 @@ protected override void OnApplyStep(ModuleApplyStepEventArgs e)
4749 Model = null ,
4850 Conditioning = null ,
4951 Latent = latentConnection , // Pass through the latent from sampler
50- EnableCudnn = ! Card . DisableCudnn ,
51- CudnnBenchmark = Card . CudnnBenchmark ,
52+ EnableCudnn = ! card . DisableCudnn ,
53+ CudnnBenchmark = false ,
5254 }
5355 ) ;
5456
You can’t perform that action at this time.
0 commit comments