Browse Source

Only setting callback if the token can be cancelled.

pull/702/head
Martin Evans 1 year ago
parent
commit
9867b4c85d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      LLama/LLamaWeights.cs

+ 1
- 1
LLama/LLamaWeights.cs View File

@@ -107,7 +107,7 @@ namespace LLama
{
#if !NETSTANDARD2_0
// Overwrite the progress callback with one which polls the cancellation token
//if (token.CanBeCanceled)
if (token.CanBeCanceled)
{
var internalCallback = lparams.progress_callback;
lparams.progress_callback = (progress, ctx) =>


Loading…
Cancel
Save