Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/voxcpm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def from_pretrained(
hf_model_id: str = "openbmb/VoxCPM2",
load_denoiser: bool = True,
zipenhancer_model_id: str = "iic/speech_zipenhancer_ans_multiloss_16k_base",
cache_dir: str = None,
cache_dir: Optional[str] = None,
local_files_only: bool = False,
optimize: bool = True,
lora_config: Optional[LoRAConfig] = None,
Expand Down Expand Up @@ -160,9 +160,9 @@ def generate_streaming(self, *args, **kwargs) -> Generator[np.ndarray, None, Non
def _generate(
self,
text: str,
prompt_wav_path: str = None,
prompt_text: str = None,
reference_wav_path: str = None,
prompt_wav_path: Optional[str] = None,
prompt_text: Optional[str] = None,
reference_wav_path: Optional[str] = None,
cfg_value: float = 2.0,
inference_timesteps: int = 10,
min_len: int = 2,
Expand Down
3 changes: 2 additions & 1 deletion src/voxcpm/modules/locdit/local_dit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import torch
from typing import Optional
from ..minicpm4 import MiniCPMModel, MiniCPM4Config
import torch.nn as nn
import math
Expand Down Expand Up @@ -27,7 +28,7 @@ def __init__(
self,
in_channels: int,
time_embed_dim: int,
out_dim: int = None,
out_dim: Optional[int] = None,
):
super().__init__()

Expand Down
4 changes: 2 additions & 2 deletions src/voxcpm/modules/minicpm4/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pydantic import BaseModel
from typing import List
from typing import List, Optional


class RopeScalingConfig(BaseModel):
Expand All @@ -26,5 +26,5 @@ class MiniCPM4Config(BaseModel):
dim_model_base: int
scale_depth: float
rope_theta: float
kv_channels: int = None
kv_channels: Optional[int] = None
no_rope: bool = False