Fix conditioning ascent: load value function inside inference_mode(False)
torch.load under inference_mode creates inference tensors; MLP params then can't participate in backward. Same fix as the earlier value function loader in samplers.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
199d4cfee0
commit
ba18fc5747
+3
-1
@@ -11874,7 +11874,9 @@ class FunPackVideoRefinerV2(FunPackVideoRefiner):
|
||||
except ImportError:
|
||||
from value_function import OnlineValueFunction
|
||||
vf_path = refinement_state_path(refinement_key, "value_fn", prefix="refine_v2", extension="pt")
|
||||
vf = OnlineValueFunction.load_or_create(vf_path)
|
||||
import torch as _torch
|
||||
with _torch.inference_mode(False):
|
||||
vf = OnlineValueFunction.load_or_create(vf_path)
|
||||
if vf is None or not vf.is_ready():
|
||||
return conditioning_list
|
||||
ascended = []
|
||||
|
||||
Reference in New Issue
Block a user