Skip to content

Commit

Permalink
compile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kijai committed Dec 23, 2024
1 parent 1614fb2 commit 2fe649b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions enhance_a_video/globals.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import torch

NUM_FRAMES = None
FETA_WEIGHT = None
ENABLE_FETA_SINGLE = False
ENABLE_FETA_DOUBLE = False


@torch.compiler.disable()
def set_num_frames(num_frames: int):
global NUM_FRAMES
NUM_FRAMES = num_frames


@torch.compiler.disable()
def get_num_frames() -> int:
return NUM_FRAMES

Expand All @@ -23,16 +25,19 @@ def disable_enhance():
ENABLE_FETA_SINGLE = False
ENABLE_FETA_DOUBLE = False

@torch.compiler.disable()
def is_enhance_enabled_single() -> bool:
return ENABLE_FETA_SINGLE

@torch.compiler.disable()
def is_enhance_enabled_double() -> bool:
return ENABLE_FETA_DOUBLE

@torch.compiler.disable()
def set_enhance_weight(feta_weight: float):
global FETA_WEIGHT
FETA_WEIGHT = feta_weight


@torch.compiler.disable()
def get_enhance_weight() -> float:
return FETA_WEIGHT

0 comments on commit 2fe649b

Please sign in to comment.