SYMBOL INDEX (3678 symbols across 512 files) FILE: .claude/skills/acestep-simplemv/scripts/render.mjs function resolveFilePath (line 33) | function resolveFilePath(p) { function findBrowserExecutable (line 58) | function findBrowserExecutable(cliOverride) { function isHeadlessShell (line 146) | function isHeadlessShell(exePath) { function parseLrc (line 151) | function parseLrc(content) { function getAudioDuration (line 176) | function getAudioDuration(filePath) { function parseArgs (line 188) | function parseArgs(argv) { FILE: .claude/skills/acestep-simplemv/scripts/src/parseLrc.ts function parseLrc (line 11) | function parseLrc(lrcContent: string): LyricLine[] { FILE: .claude/skills/acestep-simplemv/scripts/src/types.ts type LyricLine (line 1) | interface LyricLine { type MVInputProps (line 7) | interface MVInputProps extends Record { FILE: acestep/acestep_v15_pipeline.py function create_demo (line 85) | def create_demo(init_params=None, language="en"): function main (line 128) | def main(): FILE: acestep/api/http/audio_route.py function register_audio_route (line 11) | def register_audio_route( FILE: acestep/api/http/audio_route_http_test.py function _verify_api_key (line 14) | async def _verify_api_key(authorization: str | None = Header(None)) -> N... class AudioRouteHttpTests (line 21) | class AudioRouteHttpTests(unittest.TestCase): method test_requires_authentication (line 24) | def test_requires_authentication(self): method test_serves_audio_file_with_authorization (line 34) | def test_serves_audio_file_with_authorization(self): FILE: acestep/api/http/audio_route_test.py function _verify_api_key (line 13) | async def _verify_api_key(_authorization: str | None = None) -> None: function _get_endpoint (line 19) | def _get_endpoint(app: FastAPI, path: str, method: str): class AudioRouteTests (line 28) | class AudioRouteTests(unittest.TestCase): method test_rejects_path_outside_allowed_dir (line 31) | def test_rejects_path_outside_allowed_dir(self): method test_returns_404_when_file_missing (line 46) | def test_returns_404_when_file_missing(self): method test_returns_404_for_directory_target (line 60) | def test_returns_404_for_directory_target(self): FILE: acestep/api/http/auth.py function set_api_key (line 12) | def set_api_key(key: Optional[str]) -> None: function verify_token_from_request (line 23) | def verify_token_from_request( function verify_api_key (line 57) | async def verify_api_key(authorization: Optional[str] = Header(None)) ->... FILE: acestep/api/http/auth_test.py class AuthHelpersTests (line 13) | class AuthHelpersTests(unittest.TestCase): method setUp (line 16) | def setUp(self) -> None: method tearDown (line 21) | def tearDown(self) -> None: method test_verify_token_returns_none_when_auth_is_disabled (line 26) | def test_verify_token_returns_none_when_auth_is_disabled(self) -> None: method test_verify_token_accepts_ai_token_in_body (line 33) | def test_verify_token_accepts_ai_token_in_body(self) -> None: method test_verify_token_rejects_invalid_ai_token (line 40) | def test_verify_token_rejects_invalid_ai_token(self) -> None: method test_verify_token_accepts_bearer_header (line 49) | def test_verify_token_accepts_bearer_header(self) -> None: method test_verify_token_requires_token_when_auth_enabled (line 56) | def test_verify_token_requires_token_when_auth_enabled(self) -> None: method test_verify_api_key_rejects_invalid_or_missing_header (line 65) | def test_verify_api_key_rejects_invalid_or_missing_header(self) -> None: FILE: acestep/api/http/lora_routes.py class LoadLoRARequest (line 16) | class LoadLoRARequest(BaseModel): class SetLoRAScaleRequest (line 23) | class SetLoRAScaleRequest(BaseModel): class ToggleLoRARequest (line 30) | class ToggleLoRARequest(BaseModel): function _require_initialized_handler (line 36) | def _require_initialized_handler(app: FastAPI) -> AceStepHandler: function _is_success_message (line 45) | def _is_success_message(result: str, allow_warning: bool = False) -> bool: function register_lora_routes (line 53) | def register_lora_routes( FILE: acestep/api/http/lora_routes_http_test.py function _wrap_response (line 12) | def _wrap_response(data: Any, code: int = 200, error: str | None = None)... function _verify_api_key (line 18) | async def _verify_api_key(authorization: str | None = Header(None)) -> N... class _FakeHandler (line 25) | class _FakeHandler: method __init__ (line 28) | def __init__(self, model: object | None = None) -> None: method add_lora (line 33) | def add_lora(self, lora_path: str, adapter_name: str | None = None) ->... method load_lora (line 39) | def load_lora(self, lora_path: str) -> str: method unload_lora (line 45) | def unload_lora(self) -> str: method set_use_lora (line 51) | def set_use_lora(self, use_lora: bool) -> str: method set_lora_scale (line 57) | def set_lora_scale(self, *args) -> str: method get_lora_status (line 63) | def get_lora_status(self) -> Dict[str, Any]: class LoraRoutesHttpTests (line 70) | class LoraRoutesHttpTests(unittest.TestCase): method _build_client (line 73) | def _build_client(self, handler: _FakeHandler) -> TestClient: method test_load_lora_post_returns_wrapped_success_payload (line 81) | def test_load_lora_post_returns_wrapped_success_payload(self): method test_toggle_lora_post_preserves_wrapper_400_semantics (line 99) | def test_toggle_lora_post_preserves_wrapper_400_semantics(self): method test_status_get_returns_http_500_when_model_not_initialized (line 117) | def test_status_get_returns_http_500_when_model_not_initialized(self): method test_requests_require_authorization_header (line 128) | def test_requests_require_authorization_header(self): FILE: acestep/api/http/lora_routes_test.py function _wrap_response (line 18) | def _wrap_response(data: Any, code: int = 200, error: str | None = None)... function _verify_api_key (line 24) | async def _verify_api_key(_: str | None = None) -> None: function _get_route_endpoint (line 30) | def _get_route_endpoint(app: FastAPI, path: str, method: str): class _FakeHandler (line 40) | class _FakeHandler: method __init__ (line 43) | def __init__(self, model: object | None = None) -> None: method add_lora (line 52) | def add_lora(self, lora_path: str, adapter_name: str | None = None) ->... method load_lora (line 56) | def load_lora(self, lora_path: str) -> str: method unload_lora (line 60) | def unload_lora(self) -> str: method set_use_lora (line 64) | def set_use_lora(self, use_lora: bool) -> str: method set_lora_scale (line 68) | def set_lora_scale(self, *args) -> str: method get_lora_status (line 72) | def get_lora_status(self) -> Dict[str, Any]: class LoraRoutesTests (line 77) | class LoraRoutesTests(unittest.TestCase): method _build_app (line 80) | def _build_app(self, handler: _FakeHandler) -> FastAPI: method test_load_route_uses_add_lora_when_adapter_name_present (line 88) | def test_load_route_uses_add_lora_when_adapter_name_present(self): method test_status_route_raises_when_model_not_initialized (line 102) | def test_status_route_raises_when_model_not_initialized(self): method test_scale_route_accepts_warning_prefix_as_success (line 115) | def test_scale_route_accepts_warning_prefix_as_success(self): method test_toggle_route_returns_400_wrapper_for_non_success_message (line 129) | def test_toggle_route_returns_400_wrapper_for_non_success_message(self): FILE: acestep/api/http/model_init_service.py function initialize_models_for_request (line 11) | def initialize_models_for_request( FILE: acestep/api/http/model_init_service_test.py class _FakeHandler (line 11) | class _FakeHandler: method initialize_service (line 14) | def initialize_service(self, **_kwargs): class _FakeLlm (line 20) | class _FakeLlm: method initialize (line 23) | def initialize(self, **_kwargs): class _FailingLlm (line 29) | class _FailingLlm: method initialize (line 32) | def initialize(self, **_kwargs): class ModelInitServiceTests (line 38) | class ModelInitServiceTests(unittest.TestCase): method test_raises_when_handler_missing (line 41) | def test_raises_when_handler_missing(self): method test_raises_when_init_llm_requested_but_llm_missing (line 59) | def test_raises_when_init_llm_requested_but_llm_missing(self): method test_returns_loaded_model_when_dit_init_succeeds (line 77) | def test_returns_loaded_model_when_dit_init_succeeds(self): method test_lm_init_failure_sets_state_and_raises (line 101) | def test_lm_init_failure_sets_state_and_raises(self): FILE: acestep/api/http/model_service_routes.py class InitModelRequest (line 17) | class InitModelRequest(BaseModel): function _read_model_supported_tasks (line 25) | def _read_model_supported_tasks(checkpoint_dir: str, model_name: str) ->... function _collect_model_inventory (line 41) | def _collect_model_inventory( function register_model_service_routes (line 120) | def register_model_service_routes( FILE: acestep/api/http/model_service_routes_http_test.py function _wrap_response (line 16) | def _wrap_response(data, code=200, error=None): function _verify_api_key (line 22) | async def _verify_api_key(authorization: str | None = Header(None)) -> N... class _FakeStore (line 29) | class _FakeStore: method get_stats (line 32) | def get_stats(self): class _FakeHandler (line 38) | class _FakeHandler: method initialize_service (line 41) | def initialize_service(self, **_kwargs): class _FakeLlm (line 47) | class _FakeLlm: method initialize (line 52) | def initialize(self, **_kwargs): class _FailingLlm (line 58) | class _FailingLlm: method initialize (line 63) | def initialize(self, **_kwargs): class ModelServiceRoutesHttpTests (line 69) | class ModelServiceRoutesHttpTests(unittest.TestCase): method _build_client (line 72) | def _build_client(self, llm_handler=None) -> TestClient: method test_stats_requires_authentication (line 107) | def test_stats_requires_authentication(self): method test_models_requires_authentication (line 114) | def test_models_requires_authentication(self): method test_model_inventory_requires_authentication (line 121) | def test_model_inventory_requires_authentication(self): method test_init_requires_authentication (line 128) | def test_init_requires_authentication(self): method test_health_returns_wrapped_payload (line 135) | def test_health_returns_wrapped_payload(self): method test_init_route_returns_wrapped_success (line 145) | def test_init_route_returns_wrapped_success(self): method test_init_route_returns_wrapped_error_when_initializer_fails (line 164) | def test_init_route_returns_wrapped_error_when_initializer_fails(self): method test_init_route_returns_wrapped_error_when_llm_init_fails (line 183) | def test_init_route_returns_wrapped_error_when_llm_init_fails(self): FILE: acestep/api/http/model_service_routes_test.py function _wrap_response (line 20) | def _wrap_response(data, code=200, error=None): function _verify_api_key (line 26) | async def _verify_api_key(_: str | None = None) -> None: function _get_endpoint (line 32) | def _get_endpoint(app: FastAPI, path: str, method: str): class _FakeStore (line 41) | class _FakeStore: method get_stats (line 44) | def get_stats(self): class ModelServiceRoutesTests (line 50) | class ModelServiceRoutesTests(unittest.TestCase): method _build_app (line 53) | def _build_app(self) -> FastAPI: method test_collect_model_inventory_merges_loaded_and_available_models (line 87) | def test_collect_model_inventory_merges_loaded_and_available_models(se... method test_init_route_wraps_initializer_exception (line 107) | def test_init_route_wraps_initializer_exception(self): FILE: acestep/api/http/query_result_route.py function register_query_result_route (line 12) | def register_query_result_route( FILE: acestep/api/http/query_result_route_http_test.py function _wrap_response (line 14) | def _wrap_response(data, code=200, error=None): function _verify_token_from_request (line 26) | def _verify_token_from_request(body: dict, authorization: str | None = N... function _map_status (line 36) | def _map_status(status: str) -> int: class _FakeStore (line 42) | class _FakeStore: method __init__ (line 45) | def __init__(self, records: dict[str, object]) -> None: method get (line 50) | def get(self, task_id: str): class QueryResultRouteHttpTests (line 56) | class QueryResultRouteHttpTests(unittest.TestCase): method _build_client (line 59) | def _build_client(self, records: dict[str, object] | None = None, loca... method test_query_result_requires_auth (line 76) | def test_query_result_requires_auth(self): method test_query_result_marks_timed_out_cache_entry_as_failed (line 83) | def test_query_result_marks_timed_out_cache_entry_as_failed(self): method test_query_result_returns_full_analysis_result_directly (line 98) | def test_query_result_returns_full_analysis_result_directly(self): method test_query_result_returns_extract_codes_result_directly (line 119) | def test_query_result_returns_extract_codes_result_directly(self): method test_query_result_accepts_form_encoded_payload (line 157) | def test_query_result_accepts_form_encoded_payload(self): method test_query_result_returns_empty_data_for_missing_task_id_list (line 182) | def test_query_result_returns_empty_data_for_missing_task_id_list(self): method test_query_result_returns_empty_data_for_malformed_task_id_list (line 191) | def test_query_result_returns_empty_data_for_malformed_task_id_list(se... method test_query_result_preserves_non_list_json_task_id_iteration (line 203) | def test_query_result_preserves_non_list_json_task_id_iteration(self): FILE: acestep/api/http/query_result_route_test.py function _wrap_response (line 15) | def _wrap_response(data, code=200, error=None): function _verify_token_from_request (line 27) | def _verify_token_from_request(body: dict, authorization: str | None = N... function _map_status (line 37) | def _map_status(status: str) -> int: function _get_endpoint (line 43) | def _get_endpoint(app: FastAPI, path: str, method: str): class _FakeStore (line 52) | class _FakeStore: method __init__ (line 55) | def __init__(self, records: dict[str, object]) -> None: method get (line 60) | def get(self, task_id: str): class QueryResultRouteTests (line 66) | class QueryResultRouteTests(unittest.TestCase): method _build_app (line 69) | def _build_app(self, records: dict[str, object] | None = None, local_c... method test_query_result_uses_cache_payload_when_present (line 86) | def test_query_result_uses_cache_payload_when_present(self): method test_query_result_uses_store_payload_when_cache_missing (line 106) | def test_query_result_uses_store_payload_when_cache_missing(self): method test_query_result_returns_empty_when_task_missing (line 138) | def test_query_result_returns_empty_when_task_missing(self): method test_query_result_falls_back_when_cache_json_is_non_list (line 154) | def test_query_result_falls_back_when_cache_json_is_non_list(self): FILE: acestep/api/http/query_result_service.py function parse_task_id_list (line 10) | def parse_task_id_list(task_id_list_raw: Any) -> Any: function _build_running_result_payload (line 29) | def _build_running_result_payload( function _build_store_result_payload (line 63) | def _build_store_result_payload( function collect_query_results (line 142) | def collect_query_results( FILE: acestep/api/http/reinitialize_route.py function register_reinitialize_route (line 12) | def register_reinitialize_route( FILE: acestep/api/http/reinitialize_route_http_test.py function _wrap_response (line 16) | def _wrap_response(data, code=200, error=None): function _verify_api_key (line 22) | async def _verify_api_key(authorization: str | None = Header(None)) -> N... class ReinitializeRouteHttpTests (line 29) | class ReinitializeRouteHttpTests(unittest.TestCase): method _build_client (line 32) | def _build_client(self, handler) -> TestClient: method test_missing_handler_returns_raw_http_500_contract (line 47) | def test_missing_handler_returns_raw_http_500_contract(self): method test_requires_authentication (line 67) | def test_requires_authentication(self): method test_returns_wrapped_success_payload (line 75) | def test_returns_wrapped_success_payload(self): FILE: acestep/api/http/reinitialize_route_test.py function _wrap_response (line 14) | def _wrap_response(data, code=200, error=None): function _verify_api_key (line 20) | async def _verify_api_key(_: str | None = None) -> None: function _get_endpoint (line 26) | def _get_endpoint(app: FastAPI, path: str, method: str): class ReinitializeRouteUnitTests (line 35) | class ReinitializeRouteUnitTests(unittest.TestCase): method test_raises_http_500_when_service_not_initialized (line 38) | def test_raises_http_500_when_service_not_initialized(self): method test_missing_llm_handler_returns_wrapped_success (line 58) | def test_missing_llm_handler_returns_wrapped_success(self): method test_returns_wrapped_success_when_no_reload_needed (line 80) | def test_returns_wrapped_success_when_no_reload_needed(self): method test_handler_reload_failure_keeps_wrapped_success_contract (line 107) | def test_handler_reload_failure_keeps_wrapped_success_contract(self): FILE: acestep/api/http/release_task_audio_paths.py function validate_audio_path (line 14) | def validate_audio_path(path: Optional[str]) -> Optional[str]: function save_upload_to_temp (line 49) | async def save_upload_to_temp(upload: StarletteUploadFile, *, prefix: st... FILE: acestep/api/http/release_task_audio_paths_test.py class _FakeUpload (line 14) | class _FakeUpload: method __init__ (line 17) | def __init__(self, payload: bytes, filename: str = "clip.wav") -> None: method read (line 25) | async def read(self, size: int) -> bytes: method close (line 35) | async def close(self) -> None: class ReleaseTaskAudioPathsTests (line 41) | class ReleaseTaskAudioPathsTests(unittest.TestCase): method test_validate_audio_path_rejects_absolute_non_temp_path (line 44) | def test_validate_audio_path_rejects_absolute_non_temp_path(self): method test_validate_audio_path_rejects_traversal_sequences (line 52) | def test_validate_audio_path_rejects_traversal_sequences(self): method test_save_upload_to_temp_cleans_up_on_fd_close_failure (line 60) | def test_save_upload_to_temp_cleans_up_on_fd_close_failure(self): method test_save_upload_to_temp_writes_file_and_closes_upload (line 81) | def test_save_upload_to_temp_writes_file_and_closes_upload(self): FILE: acestep/api/http/release_task_models.py class GenerateMusicRequest (line 12) | class GenerateMusicRequest(BaseModel): class Config (line 127) | class Config: FILE: acestep/api/http/release_task_models_test.py class ReleaseTaskModelsTests (line 9) | class ReleaseTaskModelsTests(unittest.TestCase): method test_generate_music_request_preserves_legacy_defaults (line 12) | def test_generate_music_request_preserves_legacy_defaults(self): method test_new_fields_have_expected_defaults (line 22) | def test_new_fields_have_expected_defaults(self): method test_audio_code_string_and_cover_noise_strength_are_accepted (line 29) | def test_audio_code_string_and_cover_noise_strength_are_accepted(self): FILE: acestep/api/http/release_task_param_parser.py function _to_int (line 48) | def _to_int(value: Any, default: Optional[int] = None) -> Optional[int]: function _to_float (line 64) | def _to_float(value: Any, default: Optional[float] = None) -> Optional[f... function _to_bool (line 80) | def _to_bool(value: Any, default: bool = False) -> bool: class RequestParser (line 93) | class RequestParser: method __init__ (line 96) | def __init__(self, raw: dict): method _parse_json (line 107) | def _parse_json(self, value: Any) -> dict: method _find_metas (line 122) | def _find_metas(self) -> dict: method get (line 131) | def get(self, name: str, default: Any = None): method str (line 142) | def str(self, name: str, default: str = "") -> str: method int (line 148) | def int(self, name: str, default: Optional[int] = None) -> Optional[int]: method float (line 153) | def float(self, name: str, default: Optional[float] = None) -> Optiona... method bool (line 158) | def bool(self, name: str, default: bool = False) -> bool: FILE: acestep/api/http/release_task_param_parser_test.py class ReleaseTaskParamParserTests (line 8) | class ReleaseTaskParamParserTests(unittest.TestCase): method test_get_prefers_primary_raw_payload_values (line 11) | def test_get_prefers_primary_raw_payload_values(self): method test_get_falls_back_to_param_obj_then_metas (line 23) | def test_get_falls_back_to_param_obj_then_metas(self): method test_typed_accessors_apply_legacy_conversion_rules (line 35) | def test_typed_accessors_apply_legacy_conversion_rules(self): method test_cover_noise_strength_and_audio_code_string_aliases_are_resolved (line 43) | def test_cover_noise_strength_and_audio_code_string_aliases_are_resolv... method test_audio_codes_alias_resolves_to_audio_code_string (line 50) | def test_audio_codes_alias_resolves_to_audio_code_string(self): method test_non_dict_param_obj_json_is_ignored (line 56) | def test_non_dict_param_obj_json_is_ignored(self): FILE: acestep/api/http/release_task_request_builder.py function build_generate_music_request (line 8) | def build_generate_music_request( FILE: acestep/api/http/release_task_request_builder_test.py class _FakeParser (line 9) | class _FakeParser: method __init__ (line 12) | def __init__(self, values: dict) -> None: method get (line 17) | def get(self, key: str): method str (line 22) | def str(self, key: str, default: str = "") -> str: method bool (line 28) | def bool(self, key: str, default: bool = False) -> bool: method int (line 36) | def int(self, key: str, default=None): method float (line 42) | def float(self, key: str, default=None): class ReleaseTaskRequestBuilderTests (line 49) | class ReleaseTaskRequestBuilderTests(unittest.TestCase): method test_build_request_converts_track_classes_string_to_list (line 52) | def test_build_request_converts_track_classes_string_to_list(self): method test_build_request_prefers_explicit_audio_path_overrides (line 75) | def test_build_request_prefers_explicit_audio_path_overrides(self): method test_build_request_allows_generic_overrides_without_kwarg_collision (line 98) | def test_build_request_allows_generic_overrides_without_kwarg_collisio... method test_build_request_forwards_audio_code_string_and_cover_noise_strength (line 116) | def test_build_request_forwards_audio_code_string_and_cover_noise_stre... FILE: acestep/api/http/release_task_request_parser.py function _extract_non_file_form_values (line 15) | def _extract_non_file_form_values(form: Any) -> Dict[str, Any]: function parse_release_task_request (line 35) | async def parse_release_task_request( FILE: acestep/api/http/release_task_request_parser_test.py class _FakeParser (line 14) | class _FakeParser: method __init__ (line 17) | def __init__(self, values: dict) -> None: method get (line 22) | def get(self, key: str): method str (line 27) | def str(self, key: str, default: str = "") -> str: method bool (line 33) | def bool(self, key: str, default: bool = False) -> bool: method int (line 41) | def int(self, key: str, default=None): method float (line 47) | def float(self, key: str, default=None): class _FakeRequest (line 54) | class _FakeRequest: method __init__ (line 57) | def __init__( method json (line 74) | async def json(self): method form (line 81) | async def form(self): method body (line 86) | async def body(self): class ReleaseTaskRequestParserTests (line 92) | class ReleaseTaskRequestParserTests(unittest.TestCase): method test_json_payload_must_be_object (line 95) | def test_json_payload_must_be_object(self): method test_missing_content_type_with_urlencoded_body_is_supported (line 121) | def test_missing_content_type_with_urlencoded_body_is_supported(self): method test_application_json_malformed_payload_returns_400 (line 158) | def test_application_json_malformed_payload_returns_400(self): method test_multipart_cleanup_removes_uploaded_temp_files_on_error (line 187) | def test_multipart_cleanup_removes_uploaded_temp_files_on_error(self): FILE: acestep/api/http/release_task_route.py function register_release_task_route (line 14) | def register_release_task_route( FILE: acestep/api/http/release_task_route_http_test.py class _FakeParser (line 14) | class _FakeParser: method __init__ (line 17) | def __init__(self, values: dict) -> None: method get (line 22) | def get(self, key: str): method str (line 27) | def str(self, key: str, default: str = "") -> str: method bool (line 33) | def bool(self, key: str, default: bool = False) -> bool: method int (line 41) | def int(self, key: str, default=None): method float (line 47) | def float(self, key: str, default=None): class _FakeStore (line 54) | class _FakeStore: method __init__ (line 57) | def __init__(self) -> None: method create (line 62) | def create(self): class ReleaseTaskRouteHttpTests (line 69) | class ReleaseTaskRouteHttpTests(unittest.TestCase): method _build_client (line 72) | def _build_client(self, queue_maxsize: int = 8) -> TestClient: method test_release_task_requires_auth (line 120) | def test_release_task_requires_auth(self): method test_release_task_returns_wrapped_queue_response (line 127) | def test_release_task_returns_wrapped_queue_response(self): method test_release_task_returns_429_when_queue_is_full (line 140) | def test_release_task_returns_429_when_queue_is_full(self): method test_release_task_rejects_unsupported_content_type (line 151) | def test_release_task_rejects_unsupported_content_type(self): FILE: acestep/api/http/sample_format_routes.py function register_sample_format_routes (line 13) | def register_sample_format_routes( FILE: acestep/api/http/sample_format_routes_http_test.py function _wrap_response (line 13) | def _wrap_response(data, code=200, error=None): function _verify_token_from_request (line 19) | def _verify_token_from_request(body: dict, authorization: str | None = N... class _FakeLlm (line 29) | class _FakeLlm: method initialize (line 34) | def initialize(self, **_kwargs): class SampleFormatRoutesHttpTests (line 41) | class SampleFormatRoutesHttpTests(unittest.TestCase): method _build_client (line 44) | def _build_client(self) -> TestClient: method test_create_random_sample_requires_auth (line 81) | def test_create_random_sample_requires_auth(self): method test_create_random_sample_returns_wrapped_payload (line 88) | def test_create_random_sample_returns_wrapped_payload(self): method test_format_input_returns_wrapped_payload (line 101) | def test_format_input_returns_wrapped_payload(self): FILE: acestep/api/http/sample_format_routes_test.py function _wrap_response (line 15) | def _wrap_response(data, code=200, error=None): function _verify_token_from_request (line 21) | def _verify_token_from_request(body: dict, authorization: str | None = N... function _get_endpoint (line 32) | def _get_endpoint(app: FastAPI, path: str, method: str): class _FakeLlm (line 41) | class _FakeLlm: method __init__ (line 44) | def __init__(self) -> None: method initialize (line 49) | def initialize(self, **_kwargs): class SampleFormatRoutesTests (line 56) | class SampleFormatRoutesTests(unittest.TestCase): method _build_app (line 59) | def _build_app(self) -> FastAPI: method test_create_random_sample_returns_simple_payload (line 95) | def test_create_random_sample_returns_simple_payload(self): method test_format_input_returns_wrapped_success_payload (line 114) | def test_format_input_returns_wrapped_success_payload(self): method test_format_input_raises_503_when_lazy_load_disabled (line 131) | def test_format_input_raises_503_when_lazy_load_disabled(self): FILE: acestep/api/job_analysis_runtime.py function maybe_handle_analysis_only_modes (line 9) | def maybe_handle_analysis_only_modes( FILE: acestep/api/job_analysis_runtime_test.py class JobAnalysisRuntimeTests (line 13) | class JobAnalysisRuntimeTests(unittest.TestCase): method _base_req (line 16) | def _base_req(self) -> SimpleNamespace: method test_full_analysis_returns_expected_payload (line 27) | def test_full_analysis_returns_expected_payload(self) -> None: method test_analysis_only_uses_lm_and_returns_payload (line 67) | def test_analysis_only_uses_lm_and_returns_payload(self) -> None: method test_extract_codes_only_returns_expected_payload (line 98) | def test_extract_codes_only_returns_expected_payload(self) -> None: method test_extract_codes_only_raises_when_no_src_audio (line 128) | def test_extract_codes_only_raises_when_no_src_audio(self) -> None: method test_extract_codes_only_raises_on_extraction_failure (line 147) | def test_extract_codes_only_raises_on_extraction_failure(self) -> None: method test_returns_none_when_no_analysis_flags (line 169) | def test_returns_none_when_no_analysis_flags(self) -> None: FILE: acestep/api/job_blocking_generation.py function run_blocking_generate (line 20) | def run_blocking_generate( FILE: acestep/api/job_blocking_generation_test.py class JobBlockingGenerationTests (line 12) | class JobBlockingGenerationTests(unittest.TestCase): method _base_req (line 15) | def _base_req(self) -> SimpleNamespace: method test_run_blocking_generate_success_path_updates_progress_and_builds_payload (line 18) | def test_run_blocking_generate_success_path_updates_progress_and_build... method test_run_blocking_generate_returns_analysis_result_without_generation (line 98) | def test_run_blocking_generate_returns_analysis_result_without_generat... FILE: acestep/api/job_execution_runtime.py function run_one_job_runtime (line 11) | async def run_one_job_runtime( FILE: acestep/api/job_execution_runtime_test.py class JobExecutionRuntimeTests (line 15) | class JobExecutionRuntimeTests(unittest.IsolatedAsyncioTestCase): method test_run_one_job_runtime_success_updates_terminal_cache (line 18) | async def test_run_one_job_runtime_success_updates_terminal_cache(self... method test_run_one_job_runtime_failure_marks_failed_and_updates_cache (line 66) | async def test_run_one_job_runtime_failure_marks_failed_and_updates_ca... method test_run_one_job_runtime_integration_uses_real_executor_and_wires_handler (line 114) | async def test_run_one_job_runtime_integration_uses_real_executor_and_... FILE: acestep/api/job_generation_runtime.py function run_generation_with_optional_sequential_cover_mode (line 8) | def run_generation_with_optional_sequential_cover_mode( FILE: acestep/api/job_generation_runtime_test.py class JobGenerationRuntimeTests (line 12) | class JobGenerationRuntimeTests(unittest.TestCase): method test_runs_once_when_not_mps_cover (line 15) | def test_runs_once_when_not_mps_cover(self) -> None: method test_splits_cover_mps_batch_into_sequential_runs (line 42) | def test_splits_cover_mps_batch_into_sequential_runs(self) -> None: method test_raises_when_generation_fails (line 72) | def test_raises_when_generation_fails(self) -> None: FILE: acestep/api/job_generation_setup.py class GenerationSetup (line 17) | class GenerationSetup: function _resolve_instruction (line 24) | def _resolve_instruction( function _resolve_generation_seeds (line 65) | def _resolve_generation_seeds(req: Any) -> Optional[list[int]]: function build_generation_setup (line 94) | def build_generation_setup( FILE: acestep/api/job_generation_setup_test.py function _base_req (line 11) | def _base_req() -> SimpleNamespace: class JobGenerationSetupTests (line 45) | class JobGenerationSetupTests(unittest.TestCase): method test_build_generation_setup_applies_complete_instruction_template (line 48) | def test_build_generation_setup_applies_complete_instruction_template(... method test_build_generation_setup_applies_track_name_template (line 82) | def test_build_generation_setup_applies_track_name_template(self) -> N... method test_build_generation_setup_resolves_seed_list_from_string (line 118) | def test_build_generation_setup_resolves_seed_list_from_string(self) -... method test_build_generation_setup_forwards_audio_codes_and_cover_noise_strength (line 147) | def test_build_generation_setup_forwards_audio_codes_and_cover_noise_s... FILE: acestep/api/job_llm_preparation_test.py class JobLlmPreparationTests (line 16) | class JobLlmPreparationTests(unittest.TestCase): method _base_req (line 19) | def _base_req(self) -> SimpleNamespace: method test_ensure_llm_ready_for_request_respects_disabled_env (line 43) | def test_ensure_llm_ready_for_request_respects_disabled_env(self) -> N... method test_prepare_llm_generation_inputs_updates_values_from_sample_mode (line 71) | def test_prepare_llm_generation_inputs_updates_values_from_sample_mode... method test_prepare_llm_generation_inputs_disables_optional_cot_when_llm_unavailable (line 112) | def test_prepare_llm_generation_inputs_disables_optional_cot_when_llm_... FILE: acestep/api/job_model_selection.py function select_generation_handler (line 8) | def select_generation_handler( FILE: acestep/api/job_model_selection_test.py class JobModelSelectionTests (line 12) | class JobModelSelectionTests(unittest.TestCase): method _app_state (line 15) | def _app_state(self) -> SimpleNamespace: method test_select_generation_handler_defaults_to_primary (line 27) | def test_select_generation_handler_defaults_to_primary(self) -> None: method test_select_generation_handler_uses_second_model_when_requested (line 42) | def test_select_generation_handler_uses_second_model_when_requested(se... method test_select_generation_handler_uses_third_model_when_second_not_matched (line 59) | def test_select_generation_handler_uses_third_model_when_second_not_ma... method test_select_generation_handler_logs_fallback_on_unknown_model (line 76) | def test_select_generation_handler_logs_fallback_on_unknown_model(self... FILE: acestep/api/job_result_payload.py function normalize_metas (line 8) | def normalize_metas(meta: dict[str, Any]) -> dict[str, Any]: function _none_if_na_str (line 25) | def _none_if_na_str(value: Any) -> Optional[str]: function _extract_seed_value (line 34) | def _extract_seed_value(audios: list[dict[str, Any]]) -> str: function build_generation_success_response (line 44) | def build_generation_success_response( FILE: acestep/api/job_result_payload_test.py class JobResultPayloadTests (line 15) | class JobResultPayloadTests(unittest.TestCase): method test_normalize_metas_maps_aliases_and_applies_defaults (line 18) | def test_normalize_metas_maps_aliases_and_applies_defaults(self) -> None: method test_build_generation_success_response_preserves_response_contract (line 34) | def test_build_generation_success_response_preserves_response_contract... FILE: acestep/api/job_runtime_state.py function ensure_models_initialized (line 11) | async def ensure_models_initialized(app_state: Any) -> None: function cleanup_job_temp_files (line 27) | async def cleanup_job_temp_files(app_state: Any, job_id: str) -> None: function update_terminal_job_cache (line 44) | def update_terminal_job_cache( function update_progress_job_cache (line 80) | def update_progress_job_cache( FILE: acestep/api/job_runtime_state_test.py class JobRuntimeStateTests (line 20) | class JobRuntimeStateTests(unittest.IsolatedAsyncioTestCase): method test_ensure_models_initialized_raises_on_error_or_uninitialized (line 23) | async def test_ensure_models_initialized_raises_on_error_or_uninitiali... method test_cleanup_job_temp_files_removes_tracked_paths (line 37) | async def test_cleanup_job_temp_files_removes_tracked_paths(self) -> N... method test_cache_helpers_delegate_to_local_cache_update_functions (line 54) | async def test_cache_helpers_delegate_to_local_cache_update_functions( FILE: acestep/api/jobs/local_cache_updates.py function _get_record_env_and_time (line 9) | def _get_record_env_and_time( function update_local_cache (line 22) | def update_local_cache( function update_local_cache_progress (line 130) | def update_local_cache_progress( FILE: acestep/api/jobs/local_cache_updates_test.py function _map_status (line 12) | def _map_status(status: str) -> int: class _FakeLocalCache (line 18) | class _FakeLocalCache: method __init__ (line 21) | def __init__(self) -> None: method set (line 26) | def set(self, key: str, value, ex: int) -> None: class _FakeStore (line 32) | class _FakeStore: method __init__ (line 35) | def __init__(self, records: dict[str, object] | None = None) -> None: method get (line 40) | def get(self, job_id: str): class LocalCacheUpdatesTests (line 46) | class LocalCacheUpdatesTests(unittest.TestCase): method test_update_local_cache_writes_full_analysis_payload (line 49) | def test_update_local_cache_writes_full_analysis_payload(self): method test_update_local_cache_writes_extract_codes_payload (line 73) | def test_update_local_cache_writes_extract_codes_payload(self): method test_update_local_cache_writes_success_audio_payload (line 109) | def test_update_local_cache_writes_success_audio_payload(self): method test_update_local_cache_writes_failed_payload (line 152) | def test_update_local_cache_writes_failed_payload(self): method test_update_local_cache_progress_writes_running_payload (line 174) | def test_update_local_cache_progress_writes_running_payload(self): method test_update_helpers_are_noop_without_local_cache (line 196) | def test_update_helpers_are_noop_without_local_cache(self): FILE: acestep/api/jobs/models.py class CreateJobResponse (line 12) | class CreateJobResponse(BaseModel): class JobResult (line 21) | class JobResult(BaseModel): class JobResponse (line 40) | class JobResponse(BaseModel): FILE: acestep/api/jobs/store.py class _JobRecord (line 19) | class _JobRecord: function _atomic_write_json (line 38) | def _atomic_write_json(path: str, payload: Dict[str, Any]) -> None: function _append_jsonl (line 59) | def _append_jsonl(path: str, record: Dict[str, Any]) -> None: class _JobStore (line 68) | class _JobStore: method __init__ (line 71) | def __init__(self, max_age_seconds: int = 86400) -> None: method create (line 77) | def create(self) -> _JobRecord: method create_with_id (line 93) | def create_with_id(self, job_id: str, env: str = "development") -> _Jo... method get (line 109) | def get(self, job_id: str) -> Optional[_JobRecord]: method mark_running (line 114) | def mark_running(self, job_id: str) -> None: method mark_succeeded (line 124) | def mark_succeeded(self, job_id: str, result: Dict[str, Any]) -> None: method mark_failed (line 136) | def mark_failed(self, job_id: str, error: str) -> None: method update_progress (line 148) | def update_progress(self, job_id: str, progress: float, stage: Optiona... method cleanup_old_jobs (line 159) | def cleanup_old_jobs(self, max_age_seconds: Optional[int] = None) -> int: method get_stats (line 179) | def get_stats(self) -> Dict[str, int]: method update_status_text (line 194) | def update_status_text(self, job_id: str, text: str) -> None: method update_progress_text (line 200) | def update_progress_text(self, job_id: str, text: str) -> None: FILE: acestep/api/jobs/store_test.py class JobStoreTests (line 16) | class JobStoreTests(unittest.TestCase): method test_create_mark_running_mark_succeeded_updates_state (line 19) | def test_create_mark_running_mark_succeeded_updates_state(self): method test_cleanup_old_jobs_removes_only_completed_jobs (line 46) | def test_cleanup_old_jobs_removes_only_completed_jobs(self): method test_update_progress_clamps_values_and_ignores_missing_jobs (line 63) | def test_update_progress_clamps_values_and_ignores_missing_jobs(self): class JobStorePersistenceTests (line 81) | class JobStorePersistenceTests(unittest.TestCase): method test_atomic_write_json_uses_atomic_replace_flow (line 84) | def test_atomic_write_json_uses_atomic_replace_flow(self): method test_append_jsonl_writes_one_json_line_per_record (line 109) | def test_append_jsonl_writes_one_json_line_per_record(self): FILE: acestep/api/jobs/test_fakes.py class _FakeJobQueue (line 8) | class _FakeJobQueue: method __init__ (line 11) | def __init__(self) -> None: method task_done (line 16) | def task_done(self) -> None: class _FakeStore (line 22) | class _FakeStore: method __init__ (line 25) | def __init__(self, record: Optional[Any] = None) -> None: method get (line 34) | def get(self, _job_id: str) -> Any: method mark_failed (line 39) | def mark_failed(self, job_id: str, error: str) -> None: method cleanup_old_jobs (line 47) | def cleanup_old_jobs(self) -> int: method get_stats (line 57) | def get_stats(self) -> dict[str, int]: class _DoneEvent (line 63) | class _DoneEvent: method __init__ (line 66) | def __init__(self) -> None: method set (line 71) | def set(self) -> None: FILE: acestep/api/jobs/worker_loops.py function process_queue_item (line 9) | async def process_queue_item( function run_job_store_cleanup_loop (line 60) | async def run_job_store_cleanup_loop( FILE: acestep/api/jobs/worker_loops_test.py class WorkerLoopTests (line 16) | class WorkerLoopTests(unittest.TestCase): method test_process_queue_item_success_notifies_result_and_done (line 19) | def test_process_queue_item_success_notifies_result_and_done(self): method test_process_queue_item_failure_marks_failed_and_notifies_error (line 73) | def test_process_queue_item_failure_marks_failed_and_notifies_error(se... method test_run_job_store_cleanup_loop_logs_cleanup_and_stops_on_cancel (line 127) | def test_run_job_store_cleanup_loop_logs_cleanup_and_stops_on_cancel(s... method test_run_job_store_cleanup_loop_logs_errors_and_continues (line 160) | def test_run_job_store_cleanup_loop_logs_errors_and_continues(self): FILE: acestep/api/lifespan_runtime.py class LifespanRuntime (line 16) | class LifespanRuntime: function _initialize_local_cache (line 30) | def _initialize_local_cache(app: Any, cache_root: str) -> None: function initialize_lifespan_runtime (line 42) | def initialize_lifespan_runtime( FILE: acestep/api/lifespan_runtime_test.py class LifespanRuntimeTests (line 13) | class LifespanRuntimeTests(unittest.TestCase): method test_initialize_lifespan_runtime_sets_expected_default_state (line 18) | def test_initialize_lifespan_runtime_sets_expected_default_state( method test_initialize_lifespan_runtime_supports_secondary_and_third_model_handlers (line 59) | def test_initialize_lifespan_runtime_supports_secondary_and_third_mode... FILE: acestep/api/llm_generation_inputs.py class PreparedLlmInputs (line 10) | class PreparedLlmInputs: function prepare_llm_generation_inputs (line 32) | def prepare_llm_generation_inputs( FILE: acestep/api/llm_readiness.py function ensure_llm_ready_for_request (line 9) | def ensure_llm_ready_for_request( FILE: acestep/api/log_capture.py class LogBuffer (line 8) | class LogBuffer: method __init__ (line 11) | def __init__(self): method write (line 16) | def write(self, message: str) -> None: method flush (line 23) | def flush(self) -> None: class StderrLogger (line 29) | class StderrLogger: method __init__ (line 32) | def __init__(self, original_stderr: Any, buffer: LogBuffer): method write (line 38) | def write(self, message: str) -> None: method flush (line 44) | def flush(self) -> None: function install_log_capture (line 50) | def install_log_capture(logger_obj: Any, stderr_obj: Any) -> tuple[LogBu... FILE: acestep/api/log_capture_test.py class _FakeLogger (line 11) | class _FakeLogger: method __init__ (line 14) | def __init__(self): method add (line 17) | def add(self, sink, format): class LogCaptureTests (line 22) | class LogCaptureTests(unittest.TestCase): method test_log_buffer_updates_last_message (line 25) | def test_log_buffer_updates_last_message(self) -> None: method test_stderr_logger_forwards_to_stream_and_buffer (line 35) | def test_stderr_logger_forwards_to_stream_and_buffer(self) -> None: method test_install_log_capture_registers_sink_and_returns_proxy (line 46) | def test_install_log_capture_registers_sink_and_returns_proxy(self) ->... FILE: acestep/api/model_download.py function can_access_google (line 23) | def can_access_google(timeout: float = 3.0) -> bool: function download_from_huggingface (line 39) | def download_from_huggingface(repo_id: str, local_dir: str, model_name: ... function download_from_modelscope (line 63) | def download_from_modelscope(repo_id: str, local_dir: str, model_name: s... function ensure_model_downloaded (line 95) | def ensure_model_downloaded(model_name: str, checkpoint_dir: str) -> str: FILE: acestep/api/model_download_test.py class ModelDownloadTests (line 13) | class ModelDownloadTests(unittest.TestCase): method test_download_from_huggingface_uses_unified_repo_target_dir (line 16) | def test_download_from_huggingface_uses_unified_repo_target_dir(self): method test_download_from_modelscope_retries_with_cache_dir_on_type_error (line 35) | def test_download_from_modelscope_retries_with_cache_dir_on_type_error... method test_ensure_model_downloaded_returns_existing_model_path (line 60) | def test_ensure_model_downloaded_returns_existing_model_path(self): method test_ensure_model_downloaded_uses_huggingface_when_env_prefers_it (line 75) | def test_ensure_model_downloaded_uses_huggingface_when_env_prefers_it(... method test_ensure_model_downloaded_falls_back_to_modelscope_from_huggingface (line 94) | def test_ensure_model_downloaded_falls_back_to_modelscope_from_hugging... method test_ensure_model_downloaded_falls_back_to_huggingface_from_modelscope (line 113) | def test_ensure_model_downloaded_falls_back_to_huggingface_from_models... FILE: acestep/api/route_setup.py function configure_api_routes (line 23) | def configure_api_routes( FILE: acestep/api/route_setup_test.py class RouteSetupTests (line 14) | class RouteSetupTests(unittest.TestCase): method test_configure_api_routes_registers_all_routes_and_middleware (line 26) | def test_configure_api_routes_registers_all_routes_and_middleware( FILE: acestep/api/runtime_helpers.py function stop_tensorboard (line 14) | def stop_tensorboard(app: Any) -> None: function start_tensorboard (line 42) | def start_tensorboard( function temporary_llm_model (line 80) | def temporary_llm_model( function atomic_write_json (line 177) | def atomic_write_json(path: str, payload: Dict[str, Any]) -> None: function append_jsonl (line 199) | def append_jsonl(path: str, record: Dict[str, Any]) -> None: FILE: acestep/api/runtime_helpers_test.py class RuntimeHelpersTests (line 20) | class RuntimeHelpersTests(unittest.TestCase): method test_stop_tensorboard_terminates_and_clears_process (line 23) | def test_stop_tensorboard_terminates_and_clears_process(self): method test_start_tensorboard_starts_process_and_returns_url (line 35) | def test_start_tensorboard_starts_process_and_returns_url(self): method test_start_tensorboard_returns_none_on_failure (line 55) | def test_start_tensorboard_returns_none_on_failure(self): method test_temporary_llm_model_noops_when_path_missing (line 66) | def test_temporary_llm_model_noops_when_path_missing(self): method test_temporary_llm_model_switches_and_restores (line 85) | def test_temporary_llm_model_switches_and_restores(self): method test_temporary_llm_model_does_not_suppress_exception_when_switch_fails (line 130) | def test_temporary_llm_model_does_not_suppress_exception_when_switch_f... method test_atomic_write_json_replaces_target_on_success (line 163) | def test_atomic_write_json_replaces_target_on_success(self): method test_atomic_write_json_cleans_tmp_file_on_error (line 187) | def test_atomic_write_json_cleans_tmp_file_on_error(self): method test_append_jsonl_writes_one_line (line 212) | def test_append_jsonl_writes_one_line(self): FILE: acestep/api/server_cli.py function run_api_server_main (line 12) | def run_api_server_main( FILE: acestep/api/server_cli_test.py class ServerCliTests (line 12) | class ServerCliTests(unittest.TestCase): method test_run_api_server_main_invokes_uvicorn_with_parsed_host_port (line 15) | def test_run_api_server_main_invokes_uvicorn_with_parsed_host_port(sel... method test_run_api_server_main_sets_env_overrides_from_flags (line 29) | def test_run_api_server_main_sets_env_overrides_from_flags(self) -> None: method test_run_api_server_main_uses_env_bool_for_flag_defaults (line 54) | def test_run_api_server_main_uses_env_bool_for_flag_defaults(self) -> ... FILE: acestep/api/server_utils.py function parse_description_hints (line 13) | def parse_description_hints(description: str) -> tuple[Optional[str], bo... function env_bool (line 100) | def env_bool(name: str, default: bool) -> bool: function get_model_name (line 109) | def get_model_name(config_path: str) -> str: function map_status (line 118) | def map_status(status: str) -> int: function parse_timesteps (line 124) | def parse_timesteps(value: Optional[str]) -> Optional[list[float]]: function is_instrumental (line 135) | def is_instrumental(lyrics: str) -> bool: FILE: acestep/api/server_utils_test.py class ServerUtilsTests (line 19) | class ServerUtilsTests(unittest.TestCase): method test_parse_description_hints_detects_language_and_instrumental (line 22) | def test_parse_description_hints_detects_language_and_instrumental(sel... method test_parse_description_hints_empty_input (line 29) | def test_parse_description_hints_empty_input(self) -> None: method test_parse_description_hints_detects_unicode_language_aliases (line 36) | def test_parse_description_hints_detects_unicode_language_aliases(self... method test_env_bool_uses_truthy_values_and_default (line 43) | def test_env_bool_uses_truthy_values_and_default(self) -> None: method test_get_model_name_normalizes_trailing_separators (line 53) | def test_get_model_name_normalizes_trailing_separators(self) -> None: method test_map_status_returns_legacy_integer_codes (line 59) | def test_map_status_returns_legacy_integer_codes(self) -> None: method test_parse_timesteps_parses_valid_and_rejects_invalid (line 68) | def test_parse_timesteps_parses_valid_and_rejects_invalid(self) -> None: method test_is_instrumental_preserves_legacy_markers (line 74) | def test_is_instrumental_preserves_legacy_markers(self) -> None: FILE: acestep/api/startup_llm_init.py function initialize_llm_at_startup (line 11) | def initialize_llm_at_startup( FILE: acestep/api/startup_llm_init_test.py class StartupLlmInitTests (line 13) | class StartupLlmInitTests(unittest.TestCase): method test_initialize_llm_at_startup_skips_when_disabled (line 16) | def test_initialize_llm_at_startup_skips_when_disabled(self) -> None: method test_initialize_llm_at_startup_loads_recommended_model (line 48) | def test_initialize_llm_at_startup_loads_recommended_model( FILE: acestep/api/startup_model_init.py function initialize_models_at_startup (line 16) | def initialize_models_at_startup( FILE: acestep/api/startup_model_init_test.py function _gpu_config (line 13) | def _gpu_config(init_lm_default: bool = True) -> SimpleNamespace: class StartupModelInitTests (line 28) | class StartupModelInitTests(unittest.TestCase): method test_initialize_models_at_startup_skips_model_init_in_no_init_mode (line 34) | def test_initialize_models_at_startup_skips_model_init_in_no_init_mode( method test_initialize_models_at_startup_initializes_primary_and_calls_llm (line 71) | def test_initialize_models_at_startup_initializes_primary_and_calls_llm( method test_initialize_models_at_startup_raises_on_primary_init_failure (line 120) | def test_initialize_models_at_startup_raises_on_primary_init_failure( FILE: acestep/api/train_api_dataset_auto_label_async_route.py function register_training_dataset_auto_label_async_route (line 20) | def register_training_dataset_auto_label_async_route( FILE: acestep/api/train_api_dataset_auto_label_routes.py function register_training_dataset_auto_label_routes (line 21) | def register_training_dataset_auto_label_routes( FILE: acestep/api/train_api_dataset_auto_label_routes_http_test.py function _wrap_response (line 20) | def _wrap_response(data: Any, code: int = 200, error: Optional[str] = No... function _verify_api_key (line 26) | async def _verify_api_key(authorization: str | None = Header(None)) -> N... function _temporary_llm_model (line 34) | def _temporary_llm_model(_app: FastAPI, _llm: Any, _lm_model_path: Optio... class _Sample (line 40) | class _Sample: method __init__ (line 43) | def __init__(self, caption: str = "ready", labeled: bool = True) -> None: method to_dict (line 60) | def to_dict(self) -> dict[str, Any]: class _Metadata (line 80) | class _Metadata: method to_dict (line 83) | def to_dict(self) -> dict[str, Any]: class _Builder (line 89) | class _Builder: method __init__ (line 92) | def __init__(self, samples: list[_Sample]) -> None: method get_labeled_count (line 98) | def get_labeled_count(self) -> int: method label_all_samples (line 103) | def label_all_samples(self, **_kwargs: Any) -> tuple[list[_Sample], str]: class TrainApiDatasetAutoLabelRoutesHttpTests (line 109) | class TrainApiDatasetAutoLabelRoutesHttpTests(unittest.TestCase): method setUp (line 112) | def setUp(self) -> None: method tearDown (line 119) | def tearDown(self) -> None: method _build_client (line 126) | def _build_client(self, samples: list[_Sample]) -> TestClient: method test_auto_label_requires_auth (line 144) | def test_auto_label_requires_auth(self) -> None: method test_auto_label_async_returns_zero_total_for_only_unlabeled_when_all_labeled (line 151) | def test_auto_label_async_returns_zero_total_for_only_unlabeled_when_a... method test_auto_label_status_returns_wrapped_task_payload (line 167) | def test_auto_label_status_returns_wrapped_task_payload(self) -> None: FILE: acestep/api/train_api_dataset_auto_label_status_route.py function register_training_dataset_auto_label_status_route (line 12) | def register_training_dataset_auto_label_status_route( FILE: acestep/api/train_api_dataset_auto_label_sync_route.py function register_training_dataset_auto_label_sync_route (line 18) | def register_training_dataset_auto_label_sync_route( FILE: acestep/api/train_api_dataset_models.py class ScanDirectoryRequest (line 10) | class ScanDirectoryRequest(BaseModel): class LoadDatasetRequest (line 20) | class LoadDatasetRequest(BaseModel): class AutoLabelRequest (line 26) | class AutoLabelRequest(BaseModel): method _backward_compatible_field_names (line 48) | def _backward_compatible_field_names(cls, values: Dict[str, Any]): class SaveDatasetRequest (line 69) | class SaveDatasetRequest(BaseModel): class UpdateSampleRequest (line 80) | class UpdateSampleRequest(BaseModel): class PreprocessDatasetRequest (line 95) | class PreprocessDatasetRequest(BaseModel): function _serialize_samples (line 102) | def _serialize_samples(builder: Any) -> list[Dict[str, Any]]: FILE: acestep/api/train_api_dataset_models_test.py class _Sample (line 12) | class _Sample: method __init__ (line 15) | def __init__( class _Builder (line 48) | class _Builder: method __init__ (line 51) | def __init__(self, samples: list[_Sample]) -> None: class TrainApiDatasetModelsTests (line 57) | class TrainApiDatasetModelsTests(unittest.TestCase): method test_auto_label_request_maps_hunk_size_alias (line 62) | def test_auto_label_request_maps_hunk_size_alias(self) -> None: method test_auto_label_request_maps_hunksize_alias (line 68) | def test_auto_label_request_maps_hunksize_alias(self) -> None: method test_auto_label_request_maps_batchsize_alias (line 74) | def test_auto_label_request_maps_batchsize_alias(self) -> None: method test_auto_label_request_keeps_explicit_values (line 80) | def test_auto_label_request_keeps_explicit_values(self) -> None: method test_serialize_samples_returns_expected_payload_shape (line 87) | def test_serialize_samples_returns_expected_payload_shape(self) -> None: FILE: acestep/api/train_api_dataset_preprocess_routes.py function register_training_dataset_preprocess_routes (line 19) | def register_training_dataset_preprocess_routes( FILE: acestep/api/train_api_dataset_preprocess_routes_http_test.py function _wrap_response (line 16) | def _wrap_response(data: Any, code: int = 200, error: Optional[str] = No... function _verify_api_key (line 22) | async def _verify_api_key(authorization: str | None = Header(None)) -> N... class _Sample (line 29) | class _Sample: method __init__ (line 32) | def __init__(self, labeled: bool) -> None: class _Builder (line 38) | class _Builder: method __init__ (line 41) | def __init__(self, samples: list[_Sample]) -> None: method preprocess_to_tensors (line 46) | def preprocess_to_tensors(self, **_kwargs: Any) -> tuple[list[str], str]: class TrainApiDatasetPreprocessRoutesHttpTests (line 52) | class TrainApiDatasetPreprocessRoutesHttpTests(unittest.TestCase): method setUp (line 55) | def setUp(self) -> None: method tearDown (line 62) | def tearDown(self) -> None: method _build_client (line 69) | def _build_client(self, samples: list[_Sample]) -> TestClient: method test_preprocess_async_returns_zero_total_when_no_labeled_samples (line 83) | def test_preprocess_async_returns_zero_total_when_no_labeled_samples(s... method test_preprocess_status_by_task_returns_wrapped_payload (line 99) | def test_preprocess_status_by_task_returns_wrapped_payload(self) -> None: FILE: acestep/api/train_api_dataset_sample_routes.py function register_training_dataset_sample_routes (line 12) | def register_training_dataset_sample_routes( FILE: acestep/api/train_api_dataset_sample_routes_http_test.py function _wrap_response (line 16) | def _wrap_response(data: Any, code: int = 200, error: Optional[str] = No... function _verify_api_key (line 22) | async def _verify_api_key(authorization: str | None = Header(None)) -> N... class _Sample (line 29) | class _Sample: method __init__ (line 32) | def __init__(self) -> None: method to_dict (line 49) | def to_dict(self) -> dict[str, Any]: class _Metadata (line 69) | class _Metadata: method __init__ (line 72) | def __init__(self) -> None: class _Builder (line 82) | class _Builder: method __init__ (line 85) | def __init__(self) -> None: method get_labeled_count (line 92) | def get_labeled_count(self) -> int: method save_dataset (line 97) | def save_dataset(self, save_path: str, dataset_name: str) -> str: method update_sample (line 103) | def update_sample(self, sample_idx: int, **_kwargs: Any) -> tuple[_Sam... class TrainApiDatasetSampleRoutesHttpTests (line 109) | class TrainApiDatasetSampleRoutesHttpTests(unittest.TestCase): method _build_client (line 112) | def _build_client(self) -> tuple[TestClient, _Builder]: method test_save_dataset_updates_path_on_success (line 125) | def test_save_dataset_updates_path_on_success(self) -> None: method test_get_sample_returns_404_when_index_out_of_range (line 142) | def test_get_sample_returns_404_when_index_out_of_range(self) -> None: FILE: acestep/api/train_api_dataset_scan_load_routes.py function register_training_dataset_scan_load_routes (line 13) | def register_training_dataset_scan_load_routes( FILE: acestep/api/train_api_dataset_scan_load_routes_http_test.py function _wrap_response (line 19) | def _wrap_response(data: Any, code: int = 200, error: Optional[str] = No... function _verify_api_key (line 25) | async def _verify_api_key(authorization: str | None = Header(None)) -> N... class _Sample (line 32) | class _Sample: method __init__ (line 35) | def __init__(self, caption: str = "cap") -> None: class _Metadata (line 53) | class _Metadata: method __init__ (line 56) | def __init__(self) -> None: class _ScanSuccessBuilder (line 65) | class _ScanSuccessBuilder: method __init__ (line 68) | def __init__(self) -> None: method scan_directory (line 76) | def scan_directory(self, _audio_dir: str) -> tuple[list[_Sample], str]: method set_all_instrumental (line 81) | def set_all_instrumental(self, value: bool) -> None: method set_custom_tag (line 86) | def set_custom_tag(self, tag: str, position: str) -> None: class _LoadEmptyBuilder (line 92) | class _LoadEmptyBuilder: method __init__ (line 95) | def __init__(self) -> None: method load_dataset (line 101) | def load_dataset(self, _dataset_path: str) -> tuple[list[_Sample], str]: method get_labeled_count (line 106) | def get_labeled_count(self) -> int: class TrainApiDatasetScanLoadRoutesHttpTests (line 112) | class TrainApiDatasetScanLoadRoutesHttpTests(unittest.TestCase): method _build_client (line 115) | def _build_client(self) -> TestClient: method test_scan_dataset_success_sets_state_and_returns_serialized_samples (line 126) | def test_scan_dataset_success_sets_state_and_returns_serialized_sample... method test_load_dataset_empty_returns_wrapped_400_payload (line 158) | def test_load_dataset_empty_returns_wrapped_400_payload(self) -> None: method test_scan_dataset_requires_auth (line 177) | def test_scan_dataset_requires_auth(self) -> None: FILE: acestep/api/train_api_dataset_service.py function register_training_dataset_routes (line 17) | def register_training_dataset_routes( FILE: acestep/api/train_api_dataset_service_http_test.py function _wrap_response (line 19) | def _wrap_response(data: Any, code: int = 200, error: Optional[str] = No... function _verify_api_key (line 25) | async def _verify_api_key(authorization: str | None = Header(None)) -> N... function _temporary_llm_model (line 33) | def _temporary_llm_model(_app: FastAPI, _llm: Any, _lm_model_path: Optio... class _Sample (line 39) | class _Sample: method __init__ (line 42) | def __init__(self, caption: str = "") -> None: method to_dict (line 59) | def to_dict(self) -> dict[str, Any]: class _Metadata (line 79) | class _Metadata: method __init__ (line 82) | def __init__(self) -> None: method to_dict (line 91) | def to_dict(self) -> dict[str, Any]: class _Builder (line 103) | class _Builder: method __init__ (line 106) | def __init__(self) -> None: method get_labeled_count (line 113) | def get_labeled_count(self) -> int: method label_all_samples (line 118) | def label_all_samples(self, **kwargs: Any) -> tuple[list[Any], str]: class _RuntimeComponentManager (line 125) | class _RuntimeComponentManager: method __init__ (line 128) | def __init__(self, handler: Any, llm: Any, app_state: Any) -> None: method offload_decoder_to_cpu (line 137) | def offload_decoder_to_cpu(self) -> None: method unload_llm (line 140) | def unload_llm(self) -> None: method restore (line 143) | def restore(self) -> None: class TrainApiDatasetServiceHttpTests (line 147) | class TrainApiDatasetServiceHttpTests(unittest.TestCase): method _build_client (line 150) | def _build_client(self) -> tuple[TestClient, _Builder]: method test_auto_label_accepts_legacy_alias_fields (line 174) | def test_auto_label_accepts_legacy_alias_fields(self) -> None: method test_get_samples_returns_wrapped_serialized_payload (line 189) | def test_get_samples_returns_wrapped_serialized_payload(self) -> None: FILE: acestep/api/train_api_dataset_status_routes.py function register_training_dataset_status_routes (line 12) | def register_training_dataset_status_routes( FILE: acestep/api/train_api_dataset_status_routes_http_test.py function _wrap_response (line 16) | def _wrap_response(data: Any, code: int = 200, error: Optional[str] = No... function _verify_api_key (line 22) | async def _verify_api_key(authorization: str | None = Header(None)) -> N... class TrainApiDatasetStatusRoutesHttpTests (line 29) | class TrainApiDatasetStatusRoutesHttpTests(unittest.TestCase): method setUp (line 32) | def setUp(self) -> None: method tearDown (line 42) | def tearDown(self) -> None: method _build_client (line 52) | def _build_client(self) -> TestClient: method test_preprocess_status_latest_returns_idle_when_no_task (line 63) | def test_preprocess_status_latest_returns_idle_when_no_task(self) -> N... method test_auto_label_status_latest_returns_task_payload (line 74) | def test_auto_label_status_latest_returns_task_payload(self) -> None: FILE: acestep/api/train_api_lokr_start_route.py function register_lokr_training_start_route (line 20) | def register_lokr_training_start_route( FILE: acestep/api/train_api_lora_start_route.py function register_lora_training_start_route (line 20) | def register_lora_training_start_route( FILE: acestep/api/train_api_models.py class StartTrainingRequest (line 13) | class StartTrainingRequest(BaseModel): class StartLoKRTrainingRequest (line 32) | class StartLoKRTrainingRequest(BaseModel): class ExportLoRARequest (line 54) | class ExportLoRARequest(BaseModel): class AutoLabelTask (line 62) | class AutoLabelTask: class PreprocessTask (line 80) | class PreprocessTask: function initialize_training_state (line 102) | def initialize_training_state(app: FastAPI) -> None: FILE: acestep/api/train_api_runtime.py function unwrap_module (line 13) | def unwrap_module(module: Any) -> Any: class RuntimeComponentManager (line 28) | class RuntimeComponentManager: method __init__ (line 31) | def __init__(self, handler: AceStepHandler, llm: Optional[LLMHandler],... method _device_of (line 48) | def _device_of(module: Any) -> Optional[str]: method _move_module (line 60) | def _move_module(module: Any, device: str, dtype: Any = None) -> None: method move_decoder_to (line 73) | def move_decoder_to(self, device: str) -> None: method offload_decoder_to_cpu (line 85) | def offload_decoder_to_cpu(self) -> None: method offload_vae_to_cpu (line 98) | def offload_vae_to_cpu(self) -> None: method offload_text_encoder_to_cpu (line 106) | def offload_text_encoder_to_cpu(self) -> None: method offload_model_encoder_to_cpu (line 114) | def offload_model_encoder_to_cpu(self) -> None: method unload_llm (line 123) | def unload_llm(self) -> None: method restore (line 136) | def restore(self) -> None: FILE: acestep/api/train_api_service.py function register_training_api_routes (line 19) | def register_training_api_routes( FILE: acestep/api/train_api_service_http_test.py function _wrap_response (line 16) | def _wrap_response(data: Any, code: int = 200, error: Optional[str] = No... function _verify_api_key (line 22) | async def _verify_api_key(authorization: str | None = Header(None)) -> N... function _temporary_llm_model (line 30) | def _temporary_llm_model(_app: FastAPI, _llm: Any, _lm_model_path: Optio... class TrainingApiServiceHttpTests (line 36) | class TrainingApiServiceHttpTests(unittest.TestCase): method _build_client (line 39) | def _build_client(self) -> tuple[TestClient, dict[str, int], FastAPI]: method test_training_status_requires_auth (line 67) | def test_training_status_requires_auth(self): method test_training_status_returns_wrapped_payload (line 74) | def test_training_status_returns_wrapped_payload(self): method test_training_stop_sets_should_stop_and_calls_tensorboard_stop (line 86) | def test_training_stop_sets_should_stop_and_calls_tensorboard_stop(self): method test_training_stop_returns_idle_message_when_not_training (line 103) | def test_training_stop_returns_idle_message_when_not_training(self): method test_load_tensor_info_returns_400_for_missing_dir (line 118) | def test_load_tensor_info_returns_400_for_missing_dir(self): FILE: acestep/api/worker_runtime.py function _queue_worker_loop (line 12) | async def _queue_worker_loop( function _job_store_cleanup_worker_loop (line 33) | async def _job_store_cleanup_worker_loop(*, store: Any, cleanup_interval... function start_worker_tasks (line 42) | def start_worker_tasks( function stop_worker_tasks (line 76) | def stop_worker_tasks( FILE: acestep/api/worker_runtime_test.py class WorkerRuntimeTests (line 14) | class WorkerRuntimeTests(unittest.IsolatedAsyncioTestCase): method test_start_and_stop_worker_tasks_processes_queue_items (line 19) | async def test_start_and_stop_worker_tasks_processes_queue_items( FILE: acestep/api_server.py function _get_project_root (line 100) | def _get_project_root() -> str: function _wrap_response (line 120) | def _wrap_response(data: Any, code: int = 200, error: Optional[str] = No... function _load_all_examples (line 139) | def _load_all_examples(sample_mode: str = "simple_mode") -> List[Dict[st... function _load_project_env (line 164) | def _load_project_env() -> None: function create_app (line 187) | def create_app() -> FastAPI: function main (line 359) | def main() -> None: FILE: acestep/audio_utils.py function apply_fade (line 24) | def apply_fade( function normalize_audio (line 71) | def normalize_audio(audio_data: Union[torch.Tensor, np.ndarray], target_... class AudioSaver (line 113) | class AudioSaver: method __init__ (line 116) | def __init__(self, default_format: str = "flac"): method save_audio (line 128) | def save_audio( method convert_audio (line 260) | def convert_audio( method save_batch (line 304) | def save_batch( function get_lora_weights_hash (line 354) | def get_lora_weights_hash(dit_handler) -> str: function get_audio_file_hash (line 414) | def get_audio_file_hash(audio_file) -> str: function generate_uuid_from_params (line 440) | def generate_uuid_from_params(params_dict) -> str: function generate_uuid_from_audio_data (line 459) | def generate_uuid_from_audio_data( function save_audio (line 493) | def save_audio( FILE: acestep/audio_utils_test.py class AudioSaverFormatTests (line 14) | class AudioSaverFormatTests(unittest.TestCase): method setUp (line 17) | def setUp(self): method tearDown (line 23) | def tearDown(self): method test_init_accepts_opus_format (line 28) | def test_init_accepts_opus_format(self): method test_init_accepts_aac_format (line 33) | def test_init_accepts_aac_format(self): method test_init_accepts_all_formats (line 38) | def test_init_accepts_all_formats(self): method test_init_rejects_invalid_format (line 44) | def test_init_rejects_invalid_format(self): method test_save_audio_validates_opus_format (line 49) | def test_save_audio_validates_opus_format(self): method test_save_audio_validates_aac_format (line 69) | def test_save_audio_validates_aac_format(self): method test_save_audio_opus_uses_ffmpeg_backend (line 89) | def test_save_audio_opus_uses_ffmpeg_backend(self): method test_save_audio_aac_uses_ffmpeg_backend (line 106) | def test_save_audio_aac_uses_ffmpeg_backend(self): method test_extension_handling_for_opus (line 123) | def test_extension_handling_for_opus(self): method test_extension_handling_for_aac (line 139) | def test_extension_handling_for_aac(self): method test_m4a_extension_accepted_for_aac (line 155) | def test_m4a_extension_accepted_for_aac(self): method test_save_audio_invalid_format_fallback (line 170) | def test_save_audio_invalid_format_fallback(self): method test_numpy_array_input_with_opus (line 186) | def test_numpy_array_input_with_opus(self): method test_convenience_function_supports_opus (line 204) | def test_convenience_function_supports_opus(self): method test_convenience_function_supports_aac (line 218) | def test_convenience_function_supports_aac(self): class ApplyFadeTests (line 233) | class ApplyFadeTests(unittest.TestCase): method setUp (line 236) | def setUp(self): method test_no_fade_returns_unchanged_tensor (line 247) | def test_no_fade_returns_unchanged_tensor(self): method test_no_fade_returns_unchanged_numpy (line 252) | def test_no_fade_returns_unchanged_numpy(self): method test_fade_in_first_sample_is_zero (line 257) | def test_fade_in_first_sample_is_zero(self): method test_fade_in_last_ramp_sample_near_one (line 262) | def test_fade_in_last_ramp_sample_near_one(self): method test_fade_out_last_sample_is_zero (line 269) | def test_fade_out_last_sample_is_zero(self): method test_fade_out_first_ramp_sample_near_one (line 274) | def test_fade_out_first_ramp_sample_near_one(self): method test_both_fades_combined (line 281) | def test_both_fades_combined(self): method test_fade_preserves_type_tensor (line 290) | def test_fade_preserves_type_tensor(self): method test_fade_preserves_type_numpy (line 295) | def test_fade_preserves_type_numpy(self): method test_fade_does_not_modify_input_tensor (line 300) | def test_fade_does_not_modify_input_tensor(self): method test_fade_does_not_modify_input_numpy (line 306) | def test_fade_does_not_modify_input_numpy(self): method test_fade_clamps_to_signal_length (line 316) | def test_fade_clamps_to_signal_length(self): method test_fade_in_numpy_first_sample_is_zero (line 324) | def test_fade_in_numpy_first_sample_is_zero(self): method test_fade_out_numpy_last_sample_is_zero (line 329) | def test_fade_out_numpy_last_sample_is_zero(self): FILE: acestep/audio_utils_uuid_test.py class _FakeLoraService (line 13) | class _FakeLoraService: method __init__ (line 16) | def __init__(self, registry=None): class _FakeHandler (line 20) | class _FakeHandler: method __init__ (line 23) | def __init__(self, lora_loaded=False, use_lora=False, registry=None): class UuidGenerationTest (line 29) | class UuidGenerationTest(unittest.TestCase): method test_different_lora_states_produce_different_uuids (line 32) | def test_different_lora_states_produce_different_uuids(self): method test_different_lora_scale_produces_different_uuids (line 62) | def test_different_lora_scale_produces_different_uuids(self): method test_same_params_produce_same_uuid (line 86) | def test_same_params_produce_same_uuid(self): method test_uuid_format_is_valid (line 102) | def test_uuid_format_is_valid(self): method test_lora_weights_hash_empty_when_no_lora (line 126) | def test_lora_weights_hash_empty_when_no_lora(self): method test_lora_weights_hash_empty_when_use_lora_false (line 131) | def test_lora_weights_hash_empty_when_use_lora_false(self): method test_different_lora_files_produce_different_hashes (line 136) | def test_different_lora_files_produce_different_hashes(self): method test_same_lora_file_produces_same_hash (line 172) | def test_same_lora_file_produces_same_hash(self): method test_lora_weights_hash_differentiates_uuids (line 192) | def test_lora_weights_hash_differentiates_uuids(self): class AudioCodesPreservationTest (line 206) | class AudioCodesPreservationTest(unittest.TestCase): method _build_audio_params (line 215) | def _build_audio_params(base_params, lm_codes_list, idx): method test_user_codes_preserved_when_lm_returns_empty (line 224) | def test_user_codes_preserved_when_lm_returns_empty(self): method test_lm_codes_overwrite_when_non_empty (line 232) | def test_lm_codes_overwrite_when_non_empty(self): method test_user_codes_preserved_when_lm_list_empty (line 239) | def test_user_codes_preserved_when_lm_list_empty(self): FILE: acestep/cli_args.py function parse_quantization_arg (line 15) | def parse_quantization_arg(value: str | None) -> str | None: FILE: acestep/cli_args_test.py class ParseQuantizationArgTests (line 11) | class ParseQuantizationArgTests(unittest.TestCase): method test_returns_none_for_none_aliases (line 14) | def test_returns_none_for_none_aliases(self) -> None: method test_returns_canonical_quantization_values (line 21) | def test_returns_canonical_quantization_values(self) -> None: method test_raises_for_invalid_value (line 30) | def test_raises_for_invalid_value(self) -> None: FILE: acestep/constrained_logits_processor.py class FSMState (line 53) | class FSMState(Enum): class MetadataConstrainedLogitsProcessor (line 81) | class MetadataConstrainedLogitsProcessor(LogitsProcessor): method __init__ (line 102) | def __init__( method _get_next_field_state (line 262) | def _get_next_field_state(self, current_field: str) -> Optional[FSMSta... method _build_state_transitions (line 309) | def _build_state_transitions(self): method set_skip_genres (line 352) | def set_skip_genres(self, skip: bool): method set_skip_caption (line 357) | def set_skip_caption(self, skip: bool): method set_skip_language (line 362) | def set_skip_language(self, skip: bool): method postprocess_caption (line 368) | def postprocess_caption(caption: str) -> str: method set_stop_at_reasoning (line 400) | def set_stop_at_reasoning(self, stop: bool): method set_generation_phase (line 410) | def set_generation_phase(self, phase: str): method set_user_metadata (line 425) | def set_user_metadata(self, metadata: Optional[Dict[str, Optional[str]... method _precompute_tokens (line 461) | def _precompute_tokens(self): method _precompute_audio_code_tokens (line 548) | def _precompute_audio_code_tokens(self): method _extract_code_from_token (line 585) | def _extract_code_from_token(self, token_id: int) -> Optional[int]: method _build_audio_code_mask (line 608) | def _build_audio_code_mask(self): method _apply_whitelist_inplace (line 649) | def _apply_whitelist_inplace(self, scores: torch.Tensor, allowed_token... method _build_keyscale_prefix_tree (line 676) | def _build_keyscale_prefix_tree(self) -> Dict[Tuple[int, ...], Set[int]]: method _build_numeric_prefix_tree (line 788) | def _build_numeric_prefix_tree( method _build_language_prefix_tree (line 851) | def _build_language_prefix_tree(self) -> Dict[Tuple[int, ...], Set[int]]: method diagnose_keyscale_prefix_tree (line 913) | def diagnose_keyscale_prefix_tree(self): method _load_genres_vocab (line 953) | def _load_genres_vocab(self): method _build_genres_trie (line 984) | def _build_genres_trie(self): method _extract_caption_genres (line 1004) | def _extract_caption_genres(self, caption: str): method _collect_complete_genres (line 1060) | def _collect_complete_genres(self, node: Dict, prefix: str, result: se... method _precompute_char_token_mapping (line 1079) | def _precompute_char_token_mapping(self): method _try_reload_genres_vocab (line 1131) | def _try_reload_genres_vocab(self): method _get_genres_trie_node (line 1143) | def _get_genres_trie_node(self, prefix: str) -> Optional[Dict]: method _is_complete_genre (line 1155) | def _is_complete_genre(self, text: str) -> bool: method _get_trie_node_from_trie (line 1160) | def _get_trie_node_from_trie(self, trie: Dict, prefix: str) -> Optiona... method _get_allowed_genres_tokens (line 1169) | def _get_allowed_genres_tokens(self) -> List[int]: method reset (line 1271) | def reset(self): method set_target_duration (line 1285) | def set_target_duration(self, duration: Optional[float]): method set_max_duration (line 1303) | def set_max_duration(self, max_duration: int): method _get_allowed_tokens_for_fixed_string (line 1335) | def _get_allowed_tokens_for_fixed_string(self, fixed_str: str) -> List... method _get_allowed_digit_tokens (line 1407) | def _get_allowed_digit_tokens(self, min_val: int, max_val: int) -> Lis... method _get_allowed_numeric_tokens (line 1444) | def _get_allowed_numeric_tokens(self, prefix_tree: Dict[Tuple[int, ...... method _should_end_numeric_field (line 1465) | def _should_end_numeric_field(self, logits: torch.Tensor, min_val: int... method _should_end_text_field (line 1495) | def _should_end_text_field(self, logits: torch.Tensor) -> bool: method _get_allowed_keyscale_tokens (line 1514) | def _get_allowed_keyscale_tokens(self) -> List[int]: method _is_keyscale_complete (line 1529) | def _is_keyscale_complete(self) -> bool: method _get_allowed_language_tokens (line 1540) | def _get_allowed_language_tokens(self) -> List[int]: method _get_allowed_timesig_tokens (line 1554) | def _get_allowed_timesig_tokens(self) -> List[int]: method __call__ (line 1568) | def __call__( method _input_contains_think_end_tag (line 1641) | def _input_contains_think_end_tag(self, input_ids: torch.LongTensor) -... method _apply_temperature_scaling (line 1666) | def _apply_temperature_scaling(self, scores: torch.FloatTensor) -> tor... method _get_user_provided_field_tokens (line 1697) | def _get_user_provided_field_tokens(self, field_name: str) -> Optional... method _process_single_sequence (line 1743) | def _process_single_sequence( method _transition_to_next_state (line 2109) | def _transition_to_next_state(self): method update_state (line 2139) | def update_state(self, generated_token_id: int): FILE: acestep/core/generation/handler/audio_codes.py class AudioCodesMixin (line 11) | class AudioCodesMixin: method _parse_audio_code_string (line 20) | def _parse_audio_code_string(self, code_str: str) -> List[int]: method _decode_audio_codes_to_latents (line 47) | def _decode_audio_codes_to_latents(self, code_str: str) -> Optional[to... method convert_src_audio_to_codes (line 68) | def convert_src_audio_to_codes(self, audio_file) -> str: FILE: acestep/core/generation/handler/batch_prep.py class BatchPrepMixin (line 10) | class BatchPrepMixin: method _normalize_audio_code_hints (line 19) | def _normalize_audio_code_hints( method _normalize_instructions (line 37) | def _normalize_instructions( method _create_fallback_vocal_languages (line 59) | def _create_fallback_vocal_languages(self, batch_size: int) -> List[str]: method _encode_audio_to_latents (line 63) | def _encode_audio_to_latents(self, audio: torch.Tensor) -> torch.Tensor: method prepare_batch_data (line 78) | def prepare_batch_data( FILE: acestep/core/generation/handler/conditioning_batch.py class ConditioningBatchMixin (line 10) | class ConditioningBatchMixin: method _prepare_batch (line 21) | def _prepare_batch( FILE: acestep/core/generation/handler/conditioning_batch_test.py class _Host (line 11) | class _Host(ConditioningBatchMixin): method __init__ (line 14) | def __init__(self): method _normalize_audio_code_hints (line 19) | def _normalize_audio_code_hints(self, audio_code_hints, batch_size: in... method _create_fallback_vocal_languages (line 24) | def _create_fallback_vocal_languages(self, batch_size: int) -> List[str]: method _get_vae_dtype (line 27) | def _get_vae_dtype(self) -> torch.dtype: method _parse_metas (line 30) | def _parse_metas(self, metas) -> List[str]: method _normalize_instructions (line 35) | def _normalize_instructions(self, instructions, batch_size: int, defau... method _prepare_target_latents_and_wavs (line 40) | def _prepare_target_latents_and_wavs( method _build_chunk_masks_and_src_latents (line 48) | def _build_chunk_masks_and_src_latents( method _prepare_precomputed_lm_hints (line 67) | def _prepare_precomputed_lm_hints( method _prepare_text_conditioning_inputs (line 78) | def _prepare_text_conditioning_inputs( class ConditioningBatchMixinTests (line 100) | class ConditioningBatchMixinTests(unittest.TestCase): method test_prepare_batch_builds_expected_keys_and_tensor_types (line 103) | def test_prepare_batch_builds_expected_keys_and_tensor_types(self): method test_prepare_batch_populates_non_cover_inputs_when_strength_below_one (line 128) | def test_prepare_batch_populates_non_cover_inputs_when_strength_below_... FILE: acestep/core/generation/handler/conditioning_embed.py class ConditioningEmbedMixin (line 9) | class ConditioningEmbedMixin: method infer_refer_latent (line 18) | def infer_refer_latent(self, refer_audioss: List[List[torch.Tensor]]) ... method infer_text_embeddings (line 71) | def infer_text_embeddings(self, text_token_idss): method infer_lyric_embeddings (line 76) | def infer_lyric_embeddings(self, lyric_token_ids): method preprocess_batch (line 81) | def preprocess_batch(self, batch) -> Tuple: FILE: acestep/core/generation/handler/conditioning_embed_test.py class _FakeTextEncoder (line 11) | class _FakeTextEncoder: method __call__ (line 14) | def __call__(self, input_ids, lyric_attention_mask=None): method embed_tokens (line 19) | def embed_tokens(self, token_ids): class _Host (line 24) | class _Host(ConditioningEmbedMixin): method __init__ (line 27) | def __init__(self): method _ensure_silence_latent_on_device (line 34) | def _ensure_silence_latent_on_device(self): method _load_model_context (line 38) | def _load_model_context(self, _name): method tiled_encode (line 41) | def tiled_encode(self, audio, offload_latent_to_cpu=True): class ConditioningEmbedMixinTests (line 48) | class ConditioningEmbedMixinTests(unittest.TestCase): method test_infer_refer_latent_returns_latents_and_order_mask (line 51) | def test_infer_refer_latent_returns_latents_and_order_mask(self): method test_infer_refer_latent_cache_hit_reuses_encoding (line 63) | def test_infer_refer_latent_cache_hit_reuses_encoding(self): method test_infer_refer_latent_uses_silence_fast_path (line 72) | def test_infer_refer_latent_uses_silence_fast_path(self): method test_infer_refer_latent_handles_multiple_references_per_item (line 80) | def test_infer_refer_latent_handles_multiple_references_per_item(self): method test_preprocess_batch_returns_expected_tuple_shape (line 88) | def test_preprocess_batch_returns_expected_tuple_shape(self): FILE: acestep/core/generation/handler/conditioning_masks.py class ConditioningMaskMixin (line 12) | class ConditioningMaskMixin: method _build_chunk_masks_and_src_latents (line 19) | def _build_chunk_masks_and_src_latents( FILE: acestep/core/generation/handler/conditioning_masks_test.py class _Host (line 14) | class _Host(ConditioningMaskMixin): method __init__ (line 17) | def __init__(self): function _make_host (line 22) | def _make_host(): function _build (line 26) | def _build( class ConditioningMaskLegoBehaviorTests (line 61) | class ConditioningMaskLegoBehaviorTests(unittest.TestCase): method test_lego_with_repainting_range_preserves_source_latents (line 69) | def test_lego_with_repainting_range_preserves_source_latents(self): method test_lego_default_instruction_preserves_source_latents (line 92) | def test_lego_default_instruction_preserves_source_latents(self): method test_repaint_full_range_silences_repainting_region (line 109) | def test_repaint_full_range_silences_repainting_region(self): method test_repaint_partial_range_silences_only_masked_region (line 132) | def test_repaint_partial_range_silences_only_masked_region(self): method test_lego_instruction_marker_constant (line 159) | def test_lego_instruction_marker_constant(self): method test_lego_detection_is_case_insensitive (line 173) | def test_lego_detection_is_case_insensitive(self): method test_lego_with_empty_instructions_does_not_raise (line 191) | def test_lego_with_empty_instructions_does_not_raise(self): method test_non_lego_instruction_still_silences_repaint (line 207) | def test_non_lego_instruction_still_silences_repaint(self): method test_no_source_audio_produces_silence_latents (line 225) | def test_no_source_audio_produces_silence_latents(self): FILE: acestep/core/generation/handler/conditioning_target.py class ConditioningTargetMixin (line 9) | class ConditioningTargetMixin: method _get_silence_latent_slice (line 18) | def _get_silence_latent_slice(self, length: int) -> torch.Tensor: method _prepare_target_latents_and_wavs (line 35) | def _prepare_target_latents_and_wavs( FILE: acestep/core/generation/handler/conditioning_text.py class ConditioningTextMixin (line 11) | class ConditioningTextMixin: method _prepare_precomputed_lm_hints (line 20) | def _prepare_precomputed_lm_hints( method _prepare_text_conditioning_inputs (line 57) | def _prepare_text_conditioning_inputs( FILE: acestep/core/generation/handler/cover_noise_strength_forwarding_test.py class CoverNoiseStrengthForwardingTests (line 17) | class CoverNoiseStrengthForwardingTests(unittest.TestCase): method test_service_generate_forwards_cover_noise_strength (line 20) | def test_service_generate_forwards_cover_noise_strength(self) -> None: FILE: acestep/core/generation/handler/diffusion.py class DiffusionMixin (line 9) | class DiffusionMixin: method _mlx_run_diffusion (line 18) | def _mlx_run_diffusion( FILE: acestep/core/generation/handler/diffusion_test.py class _Host (line 10) | class _Host(DiffusionMixin): method __init__ (line 11) | def __init__(self, device: str = "cpu", dtype: torch.dtype = torch.flo... class _IterableTimesteps (line 17) | class _IterableTimesteps: method __init__ (line 18) | def __init__(self, values): method __iter__ (line 21) | def __iter__(self): class DiffusionMixinTests (line 25) | class DiffusionMixinTests(unittest.TestCase): method test_mlx_run_diffusion_converts_inputs_and_outputs_tensor (line 26) | def test_mlx_run_diffusion_converts_inputs_and_outputs_tensor(self): method test_mlx_run_diffusion_handles_optional_and_iterable_timesteps (line 74) | def test_mlx_run_diffusion_handles_optional_and_iterable_timesteps(self): method test_mlx_run_diffusion_rejects_invalid_infer_method (line 101) | def test_mlx_run_diffusion_rejects_invalid_infer_method(self): method test_mlx_run_diffusion_rejects_non_iterable_timesteps (line 114) | def test_mlx_run_diffusion_rejects_non_iterable_timesteps(self): method test_mlx_run_diffusion_rejects_batch_mismatch (line 127) | def test_mlx_run_diffusion_rejects_batch_mismatch(self): method test_mlx_run_diffusion_requires_host_attributes (line 138) | def test_mlx_run_diffusion_requires_host_attributes(self): FILE: acestep/core/generation/handler/generate_music.py function _resolve_repaint_config (line 25) | def _resolve_repaint_config( class GenerateMusicMixin (line 50) | class GenerateMusicMixin: method _vram_preflight_check (line 57) | def _vram_preflight_check( method generate_music (line 123) | def generate_music( FILE: acestep/core/generation/handler/generate_music_decode.py class GenerateMusicDecodeMixin (line 14) | class GenerateMusicDecodeMixin: method _prepare_generate_music_decode_state (line 17) | def _prepare_generate_music_decode_state( method _decode_generate_music_pred_latents (line 99) | def _decode_generate_music_pred_latents( FILE: acestep/core/generation/handler/generate_music_decode_test.py function _load_generate_music_decode_module (line 14) | def _load_generate_music_decode_module(): class _FakeDecodeOutput (line 49) | class _FakeDecodeOutput: method __init__ (line 52) | def __init__(self, sample: torch.Tensor): class _FakeVae (line 57) | class _FakeVae: method __init__ (line 60) | def __init__(self): method decode (line 65) | def decode(self, latents: torch.Tensor): method parameters (line 69) | def parameters(self): method cpu (line 73) | def cpu(self): method to (line 77) | def to(self, *_args, **_kwargs): class _Host (line 82) | class _Host(GenerateMusicDecodeMixin): method __init__ (line 85) | def __init__(self): method _update_progress_estimate (line 97) | def _update_progress_estimate(self, **kwargs): method _load_model_context (line 102) | def _load_model_context(self, _model_name): method _empty_cache (line 106) | def _empty_cache(self): method _memory_allocated (line 110) | def _memory_allocated(self): method _max_memory_allocated (line 114) | def _max_memory_allocated(self): method _mlx_vae_decode (line 118) | def _mlx_vae_decode(self, latents): method tiled_decode (line 123) | def tiled_decode(self, latents): class GenerateMusicDecodeMixinTests (line 129) | class GenerateMusicDecodeMixinTests(unittest.TestCase): method test_prepare_decode_state_updates_progress_estimates (line 132) | def test_prepare_decode_state_updates_progress_estimates(self): method test_prepare_decode_state_raises_for_nan_latents (line 152) | def test_prepare_decode_state_raises_for_nan_latents(self): method test_decode_pred_latents_updates_decode_time_and_returns_cpu_latents (line 169) | def test_decode_pred_latents_updates_decode_time_and_returns_cpu_laten... method test_decode_pred_latents_restores_vae_device_on_decode_error (line 194) | def test_decode_pred_latents_restores_vae_device_on_decode_error(self): method test_decode_pred_latents_does_not_restore_latents_to_gpu_after_successful_cpu_decode (line 254) | def test_decode_pred_latents_does_not_restore_latents_to_gpu_after_suc... FILE: acestep/core/generation/handler/generate_music_execute.py class GenerateMusicExecuteMixin (line 15) | class GenerateMusicExecuteMixin: method _run_generate_music_service_with_progress (line 18) | def _run_generate_music_service_with_progress( FILE: acestep/core/generation/handler/generate_music_execute_test.py class _Host (line 8) | class _Host(GenerateMusicExecuteMixin): method __init__ (line 11) | def __init__(self): method _start_diffusion_progress_estimator (line 17) | def _start_diffusion_progress_estimator(self, **kwargs): method service_generate (line 42) | def service_generate(self, **kwargs): class GenerateMusicExecuteMixinTests (line 49) | class GenerateMusicExecuteMixinTests(unittest.TestCase): method test_run_service_with_progress_invokes_service_and_stops_estimator (line 52) | def test_run_service_with_progress_invokes_service_and_stops_estimator... FILE: acestep/core/generation/handler/generate_music_payload.py class GenerateMusicPayloadMixin (line 8) | class GenerateMusicPayloadMixin: method _build_generate_music_success_payload (line 11) | def _build_generate_music_success_payload( FILE: acestep/core/generation/handler/generate_music_payload_test.py function _load_generate_music_payload_module (line 17) | def _load_generate_music_payload_module(): class _Host (line 58) | class _Host(GenerateMusicPayloadMixin): method __init__ (line 61) | def __init__(self): class GenerateMusicPayloadMixinTests (line 66) | class GenerateMusicPayloadMixinTests(unittest.TestCase): method test_build_success_payload_contains_audio_and_extra_outputs (line 69) | def test_build_success_payload_contains_audio_and_extra_outputs(self): method test_build_success_payload_handles_missing_optional_outputs_without_progress (line 110) | def test_build_success_payload_handles_missing_optional_outputs_withou... method test_build_success_payload_does_not_mutate_outputs_dict (line 138) | def test_build_success_payload_does_not_mutate_outputs_dict(self): method test_build_success_payload_all_extra_outputs_are_cpu_tensors (line 166) | def test_build_success_payload_all_extra_outputs_are_cpu_tensors(self): FILE: acestep/core/generation/handler/generate_music_request.py class GenerateMusicRequestMixin (line 11) | class GenerateMusicRequestMixin: method _resolve_generate_music_progress (line 14) | def _resolve_generate_music_progress( method _validate_generate_music_readiness (line 29) | def _validate_generate_music_readiness(self) -> Optional[Dict[str, Any]]: method _has_non_empty_audio_codes (line 41) | def _has_non_empty_audio_codes(self, value: Union[str, List[str]]) -> ... method _resolve_generate_music_task (line 47) | def _resolve_generate_music_task( method _prepare_generate_music_runtime (line 58) | def _prepare_generate_music_runtime( method _prepare_reference_and_source_audio (line 86) | def _prepare_reference_and_source_audio( method _prepare_generate_music_service_inputs (line 138) | def _prepare_generate_music_service_inputs( FILE: acestep/core/generation/handler/generate_music_request_test.py class _Host (line 11) | class _Host(GenerateMusicRequestMixin): method __init__ (line 14) | def __init__(self): class GenerateMusicRequestMixinTests (line 34) | class GenerateMusicRequestMixinTests(unittest.TestCase): method test_resolve_task_switches_to_cover_when_audio_codes_present (line 37) | def test_resolve_task_switches_to_cover_when_audio_codes_present(self): method test_prepare_runtime_normalizes_batch_and_duration (line 48) | def test_prepare_runtime_normalizes_batch_and_duration(self): method test_prepare_reference_and_source_audio_returns_error_for_invalid_reference (line 62) | def test_prepare_reference_and_source_audio_returns_error_for_invalid_... method test_prepare_reference_and_source_audio_ignores_src_audio_for_text2music (line 77) | def test_prepare_reference_and_source_audio_ignores_src_audio_for_text... method test_prepare_reference_and_source_audio_returns_error_for_invalid_source (line 98) | def test_prepare_reference_and_source_audio_returns_error_for_invalid_... method test_should_return_intermediate_always_true (line 115) | def test_should_return_intermediate_always_true(self): FILE: acestep/core/generation/handler/generate_music_test.py function _load_generate_music_module (line 19) | def _load_generate_music_module(): class _Host (line 60) | class _Host(GenerateMusicMixin): method __init__ (line 67) | def __init__(self, offload_to_cpu: bool = False): method _resolve_generate_music_progress (line 85) | def _resolve_generate_music_progress(self, progress): method _validate_generate_music_readiness (line 97) | def _validate_generate_music_readiness(self): method _resolve_generate_music_task (line 102) | def _resolve_generate_music_task(self, **kwargs): method _prepare_generate_music_runtime (line 107) | def _prepare_generate_music_runtime(self, **kwargs): method _prepare_reference_and_source_audio (line 118) | def _prepare_reference_and_source_audio(self, **kwargs): method _prepare_generate_music_service_inputs (line 123) | def _prepare_generate_music_service_inputs(self, **kwargs): method _run_generate_music_service_with_progress (line 128) | def _run_generate_music_service_with_progress(self, **kwargs): method _prepare_generate_music_decode_state (line 139) | def _prepare_generate_music_decode_state(self, **kwargs): method _decode_generate_music_pred_latents (line 144) | def _decode_generate_music_pred_latents(self, **kwargs): method _build_generate_music_success_payload (line 149) | def _build_generate_music_success_payload(self, **kwargs): method _empty_cache (line 154) | def _empty_cache(self): class GenerateMusicMixinTests (line 158) | class GenerateMusicMixinTests(unittest.TestCase): method test_generate_music_returns_success_payload_from_builder (line 161) | def test_generate_music_returns_success_payload_from_builder(self): method test_generate_music_returns_readiness_error_when_components_missing (line 178) | def test_generate_music_returns_readiness_error_when_components_missin... method test_generate_music_returns_error_payload_on_exception (line 187) | def test_generate_music_returns_error_payload_on_exception(self): class VramPreflightCheckTests (line 202) | class VramPreflightCheckTests(unittest.TestCase): method test_preflight_skips_when_offload_to_cpu_enabled (line 208) | def test_preflight_skips_when_offload_to_cpu_enabled(self, mock_torch): method test_preflight_blocks_when_offload_disabled_and_vram_low (line 221) | def test_preflight_blocks_when_offload_disabled_and_vram_low( method test_preflight_passes_when_offload_disabled_and_vram_sufficient (line 238) | def test_preflight_passes_when_offload_disabled_and_vram_sufficient( method test_preflight_passes_on_non_cuda_device (line 252) | def test_preflight_passes_on_non_cuda_device(self, mock_torch): FILE: acestep/core/generation/handler/init_service.py class InitServiceMixin (line 13) | class InitServiceMixin( FILE: acestep/core/generation/handler/init_service_catalog.py class InitServiceCatalogMixin (line 10) | class InitServiceCatalogMixin: method _device_type (line 13) | def _device_type(self) -> str: method get_available_checkpoints (line 19) | def get_available_checkpoints(self) -> List[str]: method get_available_acestep_v15_models (line 27) | def get_available_acestep_v15_models(self) -> List[str]: method is_flash_attention_available (line 42) | def is_flash_attention_available(self, device: Optional[str] = None) -... method is_turbo_model (line 69) | def is_turbo_model(self) -> bool: FILE: acestep/core/generation/handler/init_service_downloads.py class InitServiceDownloadsMixin (line 16) | class InitServiceDownloadsMixin: method _ensure_models_present (line 19) | def _ensure_models_present( method _sync_model_code_if_needed (line 49) | def _sync_model_code_if_needed(config_path: str, checkpoint_path: Path... FILE: acestep/core/generation/handler/init_service_loader.py class InitServiceLoaderMixin (line 13) | class InitServiceLoaderMixin(InitServiceLoaderComponentsMixin): method _cuda_supports_bool_argsort (line 16) | def _cuda_supports_bool_argsort(self) -> bool: method _apply_cuda_bool_argsort_workaround (line 34) | def _apply_cuda_bool_argsort_workaround(self) -> None: method _build_quantization_config (line 78) | def _build_quantization_config(quantization: str): method _apply_dit_quantization (line 91) | def _apply_dit_quantization(self, quantization: Optional[str]) -> None: method _load_main_model_from_checkpoint (line 114) | def _load_main_model_from_checkpoint( FILE: acestep/core/generation/handler/init_service_loader_components.py class InitServiceLoaderComponentsMixin (line 8) | class InitServiceLoaderComponentsMixin: method _load_vae_model (line 18) | def _load_vae_model(self, *, checkpoint_dir: str, device: str, compile... method _load_text_encoder_and_tokenizer (line 59) | def _load_text_encoder_and_tokenizer(self, *, checkpoint_dir: str, dev... FILE: acestep/core/generation/handler/init_service_memory_basic.py class InitServiceMemoryBasicMixin (line 7) | class InitServiceMemoryBasicMixin: method _empty_cache (line 10) | def _empty_cache(self): method _synchronize (line 20) | def _synchronize(self): method _memory_allocated (line 30) | def _memory_allocated(self): method _max_memory_allocated (line 37) | def _max_memory_allocated(self): method _is_on_target_device (line 44) | def _is_on_target_device(self, tensor, target_device): method _get_affine_quantized_tensor_class (line 64) | def _get_affine_quantized_tensor_class(): method _is_quantized_tensor (line 84) | def _is_quantized_tensor(self, t): method _has_quantized_params (line 93) | def _has_quantized_params(self, module): method _ensure_silence_latent_on_device (line 103) | def _ensure_silence_latent_on_device(self): FILE: acestep/core/generation/handler/init_service_memory_transfer.py class InitServiceMemoryTransferMixin (line 7) | class InitServiceMemoryTransferMixin: method _move_module_recursive (line 10) | def _move_module_recursive(self, module, target_device, dtype=None, vi... method _move_quantized_param (line 59) | def _move_quantized_param(self, param, target_device): method _recursive_to_device (line 69) | def _recursive_to_device(self, model, device, dtype=None): FILE: acestep/core/generation/handler/init_service_offload_context.py class InitServiceOffloadContextMixin (line 10) | class InitServiceOffloadContextMixin: method _load_model_context (line 14) | def _load_model_context(self, model_name: str): FILE: acestep/core/generation/handler/init_service_orchestrator.py function _cuda_supports_bfloat16 (line 20) | def _cuda_supports_bfloat16() -> bool: function _resolve_rocm_dtype (line 25) | def _resolve_rocm_dtype() -> torch.dtype: class InitServiceOrchestratorMixin (line 45) | class InitServiceOrchestratorMixin: method initialize_service (line 48) | def initialize_service( FILE: acestep/core/generation/handler/init_service_setup.py class InitServiceSetupMixin (line 11) | class InitServiceSetupMixin: method _resolve_initialize_device (line 14) | def _resolve_initialize_device(self, requested_device: str) -> str: method _configure_initialize_runtime (line 58) | def _configure_initialize_runtime( method _ensure_len_for_compile (line 85) | def _ensure_len_for_compile(model: Any, method_name: str) -> None: method _validate_quantization_setup (line 102) | def _validate_quantization_setup(self, *, quantization: Optional[str],... method _initialize_mlx_backends (line 114) | def _initialize_mlx_backends( method _build_initialize_status_message (line 149) | def _build_initialize_status_message( FILE: acestep/core/generation/handler/init_service_test.py function _load_init_service_module (line 17) | def _load_init_service_module(): class _Host (line 52) | class _Host(InitServiceMixin): method __init__ (line 55) | def __init__(self, project_root: str, device: str = "cpu", config=None): method _get_project_root (line 76) | def _get_project_root(self): method _get_vae_dtype (line 80) | def _get_vae_dtype(self, _device: str = "cpu"): method _init_mlx_dit (line 84) | def _init_mlx_dit(self, compile_model: bool = False) -> bool: method _init_mlx_vae (line 89) | def _init_mlx_vae(self) -> bool: class InitServiceMixinTests (line 94) | class InitServiceMixinTests(unittest.TestCase): method test_device_type_normalizes_device (line 97) | def test_device_type_normalizes_device(self): method test_is_on_target_device_handles_device_alias (line 102) | def test_is_on_target_device_handles_device_alias(self): method test_is_on_target_device_fallback_does_not_assume_cuda (line 109) | def test_is_on_target_device_fallback_does_not_assume_cuda(self): method test_is_on_target_device_malformed_target_logs_and_returns_false (line 115) | def test_is_on_target_device_malformed_target_logs_and_returns_false(s... method test_get_auto_decode_chunk_size_uses_cuda_device_index (line 124) | def test_get_auto_decode_chunk_size_uses_cuda_device_index(self): method test_vram_guard_reduce_batch_uses_cuda_device_index (line 142) | def test_vram_guard_reduce_batch_uses_cuda_device_index(self): method test_move_module_recursive_preserves_parameter_type (line 167) | def test_move_module_recursive_preserves_parameter_type(self): method test_move_quantized_param_fallback_wraps_parameter (line 176) | def test_move_quantized_param_fallback_wraps_parameter(self): method test_get_available_checkpoints_returns_expected_list (line 184) | def test_get_available_checkpoints_returns_expected_list(self): method test_get_available_acestep_v15_models_filters_and_sorts (line 193) | def test_get_available_acestep_v15_models_filters_and_sorts(self): method test_is_turbo_model_uses_config_flag (line 210) | def test_is_turbo_model_uses_config_flag(self): method test_is_flash_attention_available_rejects_non_cuda (line 218) | def test_is_flash_attention_available_rejects_non_cuda(self): method test_is_flash_attention_available_true_when_cuda_and_module_present (line 224) | def test_is_flash_attention_available_true_when_cuda_and_module_presen... method test_is_flash_attention_available_false_when_pre_ampere_gpu (line 232) | def test_is_flash_attention_available_false_when_pre_ampere_gpu(self): method test_is_flash_attention_available_false_when_module_missing (line 240) | def test_is_flash_attention_available_false_when_module_missing(self): method test_resolve_initialize_device_auto_prefers_cuda (line 256) | def test_resolve_initialize_device_auto_prefers_cuda(self): method test_configure_initialize_runtime_redirects_compile_on_mps (line 264) | def test_configure_initialize_runtime_redirects_compile_on_mps(self): method test_configure_initialize_runtime_keeps_settings_on_cuda (line 276) | def test_configure_initialize_runtime_keeps_settings_on_cuda(self): method test_resolve_initialize_device_requested_cuda_falls_back_to_cpu (line 288) | def test_resolve_initialize_device_requested_cuda_falls_back_to_cpu(se... method test_resolve_initialize_device_requested_cuda_falls_back_to_mps (line 296) | def test_resolve_initialize_device_requested_cuda_falls_back_to_mps(se... method test_validate_quantization_setup_allows_quantization_without_compile_model (line 304) | def test_validate_quantization_setup_allows_quantization_without_compi... method test_ensure_models_present_returns_download_error_when_main_model_fails (line 318) | def test_ensure_models_present_returns_download_error_when_main_model_... method test_build_initialize_status_message_reports_mlx_compile_label (line 330) | def test_build_initialize_status_message_reports_mlx_compile_label(self): method test_initialize_mlx_backends_disables_dit_when_requested (line 350) | def test_initialize_mlx_backends_disables_dit_when_requested(self): method test_initialize_service_returns_model_precheck_failure (line 365) | def test_initialize_service_returns_model_precheck_failure(self): method test_initialize_service_clears_stale_state_on_model_precheck_failure (line 377) | def test_initialize_service_clears_stale_state_on_model_precheck_failu... method test_initialize_service_uses_provided_project_root_for_checkpoints (line 403) | def test_initialize_service_uses_provided_project_root_for_checkpoints... method test_initialize_service_success_uses_decomposed_helpers (line 433) | def test_initialize_service_success_uses_decomposed_helpers(self): method test_initialize_service_returns_error_payload_when_loader_raises (line 481) | def test_initialize_service_returns_error_payload_when_loader_raises(s... method test_load_main_model_ignores_cuda_sync_cleanup_error (line 498) | def test_load_main_model_ignores_cuda_sync_cleanup_error(self): method test_apply_cuda_bool_argsort_workaround_patches_pack_sequences (line 538) | def test_apply_cuda_bool_argsort_workaround_patches_pack_sequences(self): method test_cuda_supports_bool_argsort_returns_false_for_unexpected_runtime_error (line 561) | def test_cuda_supports_bool_argsort_returns_false_for_unexpected_runti... method test_apply_dit_quantization_filters_to_decoder_linear_layers (line 576) | def test_apply_dit_quantization_filters_to_decoder_linear_layers(self): method test_validate_quantization_setup_raises_import_error_when_torchao_missing (line 614) | def test_validate_quantization_setup_raises_import_error_when_torchao_... method test_initialize_service_disables_quantization_when_torchao_is_incompatible (line 633) | def test_initialize_service_disables_quantization_when_torchao_is_inco... method test_get_affine_quantized_tensor_class_returns_none_on_torchao_attr_error (line 658) | def test_get_affine_quantized_tensor_class_returns_none_on_torchao_att... method test_load_model_context_yields_immediately_when_offload_disabled (line 676) | def test_load_model_context_yields_immediately_when_offload_disabled(s... method test_load_model_context_loads_and_offloads_when_enabled_for_vae (line 686) | def test_load_model_context_loads_and_offloads_when_enabled_for_vae(se... method test_recursive_to_device_uses_quantized_move_fallback (line 698) | def test_recursive_to_device_uses_quantized_move_fallback(self): method test_empty_cache_routes_to_cuda (line 718) | def test_empty_cache_routes_to_cuda(self): method test_empty_cache_routes_to_xpu (line 725) | def test_empty_cache_routes_to_xpu(self): method test_empty_cache_routes_to_mps (line 734) | def test_empty_cache_routes_to_mps(self): method test_synchronize_routes_to_cuda (line 741) | def test_synchronize_routes_to_cuda(self): method test_synchronize_routes_to_xpu (line 748) | def test_synchronize_routes_to_xpu(self): method test_synchronize_routes_to_mps (line 757) | def test_synchronize_routes_to_mps(self): method test_memory_queries_use_cuda_only (line 764) | def test_memory_queries_use_cuda_only(self): class _VaeHost (line 788) | class _VaeHost(_Host): class RocmDtypeTests (line 798) | class RocmDtypeTests(unittest.TestCase): method _make_rocm_host (line 801) | def _make_rocm_host(self, device: str = "cuda") -> _Host: method test_resolve_rocm_dtype_defaults_to_float32 (line 807) | def test_resolve_rocm_dtype_defaults_to_float32(self): method test_resolve_rocm_dtype_respects_float16_override (line 814) | def test_resolve_rocm_dtype_respects_float16_override(self): method test_resolve_rocm_dtype_respects_bfloat16_override (line 820) | def test_resolve_rocm_dtype_respects_bfloat16_override(self): method test_resolve_rocm_dtype_unknown_value_falls_back_to_float32 (line 826) | def test_resolve_rocm_dtype_unknown_value_falls_back_to_float32(self): method test_initialize_service_uses_float32_on_rocm (line 832) | def test_initialize_service_uses_float32_on_rocm(self): method test_initialize_service_uses_bfloat16_on_non_rocm_cuda (line 870) | def test_initialize_service_uses_bfloat16_on_non_rocm_cuda(self): method test_initialize_service_uses_float16_on_pre_ampere_cuda (line 907) | def test_initialize_service_uses_float16_on_pre_ampere_cuda(self): method test_get_vae_dtype_returns_self_dtype_on_rocm (line 944) | def test_get_vae_dtype_returns_self_dtype_on_rocm(self): method test_get_vae_dtype_rocm_override_propagates_float16 (line 952) | def test_get_vae_dtype_rocm_override_propagates_float16(self): method test_get_vae_dtype_returns_bfloat16_on_non_rocm_cuda (line 960) | def test_get_vae_dtype_returns_bfloat16_on_non_rocm_cuda(self): method test_get_vae_dtype_returns_float16_on_pre_ampere_cuda (line 969) | def test_get_vae_dtype_returns_float16_on_pre_ampere_cuda(self): method test_get_vae_dtype_treats_cuda_index_device_as_cuda (line 978) | def test_get_vae_dtype_treats_cuda_index_device_as_cuda(self): method test_load_text_encoder_uses_cpu_safe_dtype_when_offloaded (line 988) | def test_load_text_encoder_uses_cpu_safe_dtype_when_offloaded(self): FILE: acestep/core/generation/handler/io_audio.py class IoAudioMixin (line 13) | class IoAudioMixin: method _normalize_audio_to_stereo_48k (line 20) | def _normalize_audio_to_stereo_48k( method process_target_audio (line 44) | def process_target_audio(self, audio_file: Optional[str]) -> Optional[... method process_reference_audio (line 69) | def process_reference_audio( method process_src_audio (line 134) | def process_src_audio(self, audio_file: Optional[str]) -> Optional[tor... FILE: acestep/core/generation/handler/io_audio_test.py class _Host (line 14) | class _Host(IoAudioMixin): method is_silence (line 17) | def is_silence(self, audio: torch.Tensor) -> bool: function _fake_torchaudio_module (line 22) | def _fake_torchaudio_module(load_fn): class IoAudioMixinTests (line 30) | class IoAudioMixinTests(unittest.TestCase): method test_normalize_audio_to_stereo_48k_duplicates_mono_and_clamps (line 33) | def test_normalize_audio_to_stereo_48k_duplicates_mono_and_clamps(self): method test_process_target_audio_loads_and_normalizes (line 43) | def test_process_target_audio_loads_and_normalizes(self): method test_process_src_audio_handles_load_error (line 57) | def test_process_src_audio_handles_load_error(self): method test_process_reference_audio_returns_none_for_silence (line 65) | def test_process_reference_audio_returns_none_for_silence(self): method test_process_reference_audio_samples_expected_segments (line 74) | def test_process_reference_audio_samples_expected_segments(self): method test_process_reference_audio_returns_none_on_load_error (line 97) | def test_process_reference_audio_returns_none_on_load_error(self): FILE: acestep/core/generation/handler/lora/adapter_discovery.py function collect_adapter_names (line 4) | def collect_adapter_names(self) -> list[str]: FILE: acestep/core/generation/handler/lora/controls.py function _toggle_lokr (line 12) | def _toggle_lokr(decoder, enable: bool, scale: float = 1.0) -> bool: function set_use_lora (line 35) | def set_use_lora(self, use_lora: bool) -> str: function set_lora_scale (line 83) | def set_lora_scale(self, adapter_name_or_scale: str | float, scale: floa... function set_active_lora_adapter (line 193) | def set_active_lora_adapter(self, adapter_name: str) -> str: function get_lora_status (line 208) | def get_lora_status(self) -> dict[str, Any]: FILE: acestep/core/generation/handler/lora/controls_test.py class _DummyHandler (line 14) | class _DummyHandler: method __init__ (line 17) | def __init__(self, adapter_type=None) -> None: method _ensure_lora_registry (line 33) | def _ensure_lora_registry(self): method _rebuild_lora_registry (line 36) | def _rebuild_lora_registry(self, lora_path=None): method _sync_lora_state_from_service (line 39) | def _sync_lora_state_from_service(self): method _apply_scale_to_adapter (line 42) | def _apply_scale_to_adapter(self, name, scale): method set_lora_scale (line 45) | def set_lora_scale(self, adapter_name_or_scale, scale=None): class ToggleLokrTests (line 49) | class ToggleLokrTests(unittest.TestCase): method test_disable_sets_multiplier_to_zero (line 52) | def test_disable_sets_multiplier_to_zero(self): method test_enable_sets_multiplier_to_scale (line 60) | def test_enable_sets_multiplier_to_scale(self): method test_returns_false_when_no_lycoris_net (line 68) | def test_returns_false_when_no_lycoris_net(self): method test_returns_false_when_no_set_multiplier (line 74) | def test_returns_false_when_no_set_multiplier(self): class SetUseLokrTests (line 81) | class SetUseLokrTests(unittest.TestCase): method test_disable_lokr_zeros_multiplier (line 84) | def test_disable_lokr_zeros_multiplier(self): method test_enable_lokr_restores_multiplier (line 97) | def test_enable_lokr_restores_multiplier(self): method test_enable_lokr_uses_lora_scale_fallback (line 112) | def test_enable_lokr_uses_lora_scale_fallback(self): class SetUsePeftLoraTests (line 126) | class SetUsePeftLoraTests(unittest.TestCase): method test_disable_peft_lora_calls_disable_adapter_layers (line 129) | def test_disable_peft_lora_calls_disable_adapter_layers(self): method test_enable_peft_lora_calls_enable_adapter_layers (line 141) | def test_enable_peft_lora_calls_enable_adapter_layers(self): method test_no_adapter_loaded_returns_error (line 156) | def test_no_adapter_loaded_returns_error(self): class SetLokrScaleTests (line 166) | class SetLokrScaleTests(unittest.TestCase): method test_scale_lokr_sets_multiplier (line 169) | def test_scale_lokr_sets_multiplier(self): method test_scale_lokr_when_disabled_stores_but_does_not_apply (line 182) | def test_scale_lokr_when_disabled_stores_but_does_not_apply(self): FILE: acestep/core/generation/handler/lora/lifecycle.py function _is_lokr_safetensors (line 17) | def _is_lokr_safetensors(weights_path: str) -> bool: function _resolve_lokr_weights_path (line 39) | def _resolve_lokr_weights_path(adapter_path: str) -> str | None: function _validate_peft_adapter_config (line 61) | def _validate_peft_adapter_config(config_file: str) -> str | None: function _load_lokr_config (line 87) | def _load_lokr_config(weights_path: str) -> LoKRConfig: function _load_lokr_adapter (line 128) | def _load_lokr_adapter(decoder: Any, weights_path: str) -> Any: function _default_adapter_name_from_path (line 185) | def _default_adapter_name_from_path(lora_path: str) -> str: function add_lora (line 191) | def add_lora(self, lora_path: str, adapter_name: str | None = None) -> str: function load_lora (line 319) | def load_lora(self, lora_path: str) -> str: function add_voice_lora (line 328) | def add_voice_lora(self, lora_path: str, scale: float = 1.0) -> str: function remove_lora (line 336) | def remove_lora(self, adapter_name: str) -> str: function unload_lora (line 437) | def unload_lora(self) -> str: FILE: acestep/core/generation/handler/lora/lifecycle_test.py class _DummyDecoder (line 14) | class _DummyDecoder: method __init__ (line 17) | def __init__(self) -> None: method state_dict (line 20) | def state_dict(self): method load_state_dict (line 24) | def load_state_dict(self, state_dict, strict=False): method to (line 29) | def to(self, *_args, **_kwargs): method eval (line 33) | def eval(self): class _DummyHandler (line 38) | class _DummyHandler: method __init__ (line 41) | def __init__(self) -> None: method _ensure_lora_registry (line 58) | def _ensure_lora_registry(self): method _rebuild_lora_registry (line 62) | def _rebuild_lora_registry(self, lora_path=None): method _debug_lora_registry_snapshot (line 67) | def _debug_lora_registry_snapshot(self): method add_lora (line 71) | def add_lora(self, lora_path, adapter_name=None): class LifecycleTests (line 76) | class LifecycleTests(unittest.TestCase): method test_resolve_lokr_weights_from_directory (line 79) | def test_resolve_lokr_weights_from_directory(self): method test_resolve_lokr_weights_from_file (line 87) | def test_resolve_lokr_weights_from_file(self): method test_resolve_lokr_weights_from_custom_safetensors_name (line 95) | def test_resolve_lokr_weights_from_custom_safetensors_name(self): method test_load_lora_accepts_lokr_directory_without_adapter_config (line 110) | def test_load_lora_accepts_lokr_directory_without_adapter_config(self): method test_load_lora_invalid_adapter_message_mentions_lokr (line 124) | def test_load_lora_invalid_adapter_message_mentions_lokr(self): method test_validate_peft_adapter_config_missing_peft_type (line 132) | def test_validate_peft_adapter_config_missing_peft_type(self): method test_validate_peft_adapter_config_valid (line 142) | def test_validate_peft_adapter_config_valid(self): method test_validate_peft_adapter_config_invalid_json (line 150) | def test_validate_peft_adapter_config_invalid_json(self): method test_validate_peft_adapter_config_not_a_dict (line 159) | def test_validate_peft_adapter_config_not_a_dict(self): method test_add_lora_returns_clear_error_when_peft_type_missing (line 167) | def test_add_lora_returns_clear_error_when_peft_type_missing(self): method test_load_lokr_adapter_recreates_with_dora_when_weight_decompose_enabled (line 177) | def test_load_lokr_adapter_recreates_with_dora_when_weight_decompose_e... method test_load_lokr_adapter_uses_base_net_when_dora_not_supported (line 201) | def test_load_lokr_adapter_uses_base_net_when_dora_not_supported(self): method test_unload_lora_restores_lokr_adapter_before_state_restore (line 224) | def test_unload_lora_restores_lokr_adapter_before_state_restore(self): method test_unload_lora_fails_when_lokr_restore_raises (line 247) | def test_unload_lora_fails_when_lokr_restore_raises(self): FILE: acestep/core/generation/handler/lora/registry_builder.py function rebuild_lora_registry (line 9) | def rebuild_lora_registry(self, lora_path: str | None = None) -> tuple[i... FILE: acestep/core/generation/handler/lora/registry_state.py function _decoder_from_host (line 8) | def _decoder_from_host(self): function _copy_registry (line 13) | def _copy_registry(registry: dict[str, dict[str, Any]]) -> dict[str, dic... function sync_lora_state_from_service (line 30) | def sync_lora_state_from_service(self) -> None: function ensure_lora_registry (line 38) | def ensure_lora_registry(self) -> None: function debug_lora_registry_snapshot (line 59) | def debug_lora_registry_snapshot(self, max_targets_per_adapter: int = 20... FILE: acestep/core/generation/handler/lora/scale_apply.py function apply_scale_to_adapter (line 9) | def apply_scale_to_adapter(self, adapter_name: str, scale: float) -> int: FILE: acestep/core/generation/handler/lora_integration_test.py class FakeDecoder (line 6) | class FakeDecoder: method __init__ (line 7) | def __init__(self, modules, adapter_names): method named_modules (line 11) | def named_modules(self): method get_adapter_names (line 14) | def get_adapter_names(self): class FakeModel (line 18) | class FakeModel: method __init__ (line 19) | def __init__(self, decoder): class FakeSetScaleModule (line 23) | class FakeSetScaleModule: method __init__ (line 24) | def __init__(self): method set_scale (line 29) | def set_scale(self, adapter_name, factor): class MinimalHandler (line 33) | class MinimalHandler(LoraManagerMixin): method __init__ (line 34) | def __init__(self, decoder): class LoraHandlerIntegrationTests (line 45) | class LoraHandlerIntegrationTests(unittest.TestCase): method test_handler_state_snapshot_does_not_mutate_service (line 46) | def test_handler_state_snapshot_does_not_mutate_service(self): method test_set_lora_scale_reports_skipped_targets (line 60) | def test_set_lora_scale_reports_skipped_targets(self): method test_set_lora_scale_reports_no_modules_found (line 70) | def test_set_lora_scale_reports_no_modules_found(self): method test_get_lora_status_exposes_synthetic_default_mode (line 79) | def test_get_lora_status_exposes_synthetic_default_mode(self): method test_set_lora_scale_rejects_non_numeric_input (line 89) | def test_set_lora_scale_rejects_non_numeric_input(self): method test_set_use_lora_handles_missing_model_decoder (line 97) | def test_set_use_lora_handles_missing_model_decoder(self): FILE: acestep/core/generation/handler/lora_manager.py class LoraManagerMixin (line 11) | class LoraManagerMixin: FILE: acestep/core/generation/handler/lyric_alignment_common.py class LyricAlignmentCommonMixin (line 8) | class LyricAlignmentCommonMixin: method _resolve_custom_layers_config (line 11) | def _resolve_custom_layers_config( method _move_alignment_inputs_to_runtime (line 19) | def _move_alignment_inputs_to_runtime( method _sample_noise_like (line 36) | def _sample_noise_like(self, reference: torch.Tensor, seed: Optional[i... method _extract_lyric_segment (line 50) | def _extract_lyric_segment( method _lyric_timestamp_error (line 73) | def _lyric_timestamp_error(self, message: str) -> Dict[str, Any]: method _lyric_score_error (line 83) | def _lyric_score_error(self, message: str) -> Dict[str, Any]: FILE: acestep/core/generation/handler/lyric_alignment_test.py class _Tokenizer (line 14) | class _Tokenizer: method encode (line 17) | def encode(self, _text, add_special_tokens=False): class _Decoder (line 23) | class _Decoder: method __init__ (line 26) | def __init__(self, cross_attns): method eval (line 30) | def eval(self): method __call__ (line 33) | def __call__(self, **kwargs): class _Model (line 39) | class _Model: method __init__ (line 42) | def __init__(self, decoder): class _Host (line 47) | class _Host(LyricTimestampMixin, LyricScoreMixin): method __init__ (line 50) | def __init__(self, decoder): method _load_model_context (line 58) | def _load_model_context(self, _name): class LyricAlignmentMixinTests (line 63) | class LyricAlignmentMixinTests(unittest.TestCase): method _sample_inputs (line 66) | def _sample_inputs(self): method test_get_lyric_timestamp_success (line 75) | def test_get_lyric_timestamp_success(self): method test_get_lyric_score_success (line 117) | def test_get_lyric_score_success(self): method test_get_lyric_timestamp_returns_error_when_attentions_missing (line 159) | def test_get_lyric_timestamp_returns_error_when_attentions_missing(self): method test_get_lyric_score_returns_error_when_attentions_missing (line 177) | def test_get_lyric_score_returns_error_when_attentions_missing(self): FILE: acestep/core/generation/handler/lyric_score.py class LyricScoreMixin (line 11) | class LyricScoreMixin(LyricAlignmentCommonMixin): method get_lyric_score (line 15) | def get_lyric_score( method _calculate_single_lyric_score (line 168) | def _calculate_single_lyric_score( FILE: acestep/core/generation/handler/lyric_timestamp.py class LyricTimestampMixin (line 11) | class LyricTimestampMixin(LyricAlignmentCommonMixin): method get_lyric_timestamp (line 15) | def get_lyric_timestamp( FILE: acestep/core/generation/handler/memory_utils.py function _is_cuda_device (line 17) | def _is_cuda_device(device: object) -> bool: function _cuda_device_index (line 26) | def _cuda_device_index(device: object) -> int: class MemoryUtilsMixin (line 44) | class MemoryUtilsMixin: method is_silence (line 51) | def is_silence(self, audio: torch.Tensor) -> bool: method _get_system_memory_gb (line 55) | def _get_system_memory_gb(self) -> Optional[float]: method _get_effective_mps_memory_gb (line 66) | def _get_effective_mps_memory_gb(self) -> Optional[float]: method _get_auto_decode_chunk_size (line 80) | def _get_auto_decode_chunk_size(self) -> int: method _should_offload_wav_to_cpu (line 117) | def _should_offload_wav_to_cpu(self) -> bool: method _vram_guard_reduce_batch (line 137) | def _vram_guard_reduce_batch( method _get_vae_dtype (line 191) | def _get_vae_dtype(self, device: Optional[str] = None) -> torch.dtype: FILE: acestep/core/generation/handler/metadata_utils.py class MetadataMixin (line 6) | class MetadataMixin: method _create_default_meta (line 13) | def _create_default_meta(self) -> str: method _dict_to_meta_string (line 22) | def _dict_to_meta_string(self, meta_dict: Dict[str, Any]) -> str: method _parse_metas (line 41) | def _parse_metas(self, metas: List[Union[str, Dict[str, Any]]]) -> Lis... method prepare_metadata (line 56) | def prepare_metadata( method _build_metadata_dict (line 62) | def _build_metadata_dict( FILE: acestep/core/generation/handler/mlx_dit_init.py class MlxDitInitMixin (line 6) | class MlxDitInitMixin: method _init_mlx_dit (line 9) | def _init_mlx_dit(self, compile_model: bool = False) -> bool: FILE: acestep/core/generation/handler/mlx_dit_init_test.py function _load_handler_module (line 11) | def _load_handler_module(filename: str, module_name: str): class _DitHost (line 43) | class _DitHost(MlxDitInitMixin): method __init__ (line 46) | def __init__(self): class MlxDitInitMixinTests (line 55) | class MlxDitInitMixinTests(unittest.TestCase): method test_init_mlx_dit_unavailable_returns_false (line 58) | def test_init_mlx_dit_unavailable_returns_false(self): method test_init_mlx_dit_success_sets_decoder (line 68) | def test_init_mlx_dit_success_sets_decoder(self): FILE: acestep/core/generation/handler/mlx_vae_decode_native.py class MlxVaeDecodeNativeMixin (line 12) | class MlxVaeDecodeNativeMixin: method _resolve_mlx_decode_fn (line 15) | def _resolve_mlx_decode_fn(self): method _mlx_vae_decode (line 31) | def _mlx_vae_decode(self, latents_torch): method _mlx_decode_single (line 74) | def _mlx_decode_single(self, z_nlc, decode_fn=None): FILE: acestep/core/generation/handler/mlx_vae_encode_native.py class MlxVaeEncodeNativeMixin (line 12) | class MlxVaeEncodeNativeMixin: method _resolve_mlx_encode_fn (line 15) | def _resolve_mlx_encode_fn(self): method _mlx_vae_encode_sample (line 31) | def _mlx_vae_encode_sample(self, audio_torch): method _mlx_encode_single (line 89) | def _mlx_encode_single(self, audio_nlc, pbar=None, encode_fn=None): FILE: acestep/core/generation/handler/mlx_vae_init.py class MlxVaeInitMixin (line 9) | class MlxVaeInitMixin: method _init_mlx_vae (line 12) | def _init_mlx_vae(self) -> bool: FILE: acestep/core/generation/handler/mlx_vae_init_test.py function _load_handler_module (line 9) | def _load_handler_module(filename: str, module_name: str) -> types.Modul... class _VaeHost (line 55) | class _VaeHost(MlxVaeInitMixin): method __init__ (line 58) | def __init__(self): class _FakeMlxVae (line 64) | class _FakeMlxVae: method decode (line 67) | def decode(self, value): method encode_and_sample (line 71) | def encode_and_sample(self, value): method from_pytorch_config (line 76) | def from_pytorch_config(cls, _vae): method update (line 80) | def update(self, _params): method parameters (line 84) | def parameters(self): function _build_fake_mx_core (line 87) | def _build_fake_mx_core(raise_compile: bool) -> tuple[types.ModuleType, ... class MlxVaeInitMixinTests (line 118) | class MlxVaeInitMixinTests(unittest.TestCase): method test_init_mlx_vae_unavailable_returns_false (line 121) | def test_init_mlx_vae_unavailable_returns_false(self): method test_init_mlx_vae_success_sets_compiled_callables (line 131) | def test_init_mlx_vae_success_sets_compiled_callables(self): method test_init_mlx_vae_compile_failure_falls_back (line 162) | def test_init_mlx_vae_compile_failure_falls_back(self): FILE: acestep/core/generation/handler/mlx_vae_native_test.py function _load_handler_module (line 11) | def _load_handler_module(module_filename: str, module_name: str): class _Progress (line 46) | class _Progress: method __init__ (line 49) | def __init__(self, *_args, **_kwargs): method update (line 53) | def update(self, amount): method close (line 57) | def close(self): class _Host (line 62) | class _Host(MlxVaeDecodeNativeMixin, MlxVaeEncodeNativeMixin): method __init__ (line 65) | def __init__(self): function _fake_mx_core_module (line 77) | def _fake_mx_core_module(): class MlxVaeNativeMixinTests (line 89) | class MlxVaeNativeMixinTests(unittest.TestCase): method test_mlx_decode_single_without_tiling_uses_decode_fn (line 92) | def test_mlx_decode_single_without_tiling_uses_decode_fn(self): method test_mlx_decode_single_with_tiling_concatenates_trimmed_chunks (line 106) | def test_mlx_decode_single_with_tiling_concatenates_trimmed_chunks(self): method test_mlx_vae_decode_returns_torch_tensor_with_expected_shape (line 120) | def test_mlx_vae_decode_returns_torch_tensor_with_expected_shape(self): method test_mlx_encode_single_without_tiling_updates_progress (line 132) | def test_mlx_encode_single_without_tiling_updates_progress(self): method test_mlx_encode_single_with_tiling_updates_progress_per_chunk (line 145) | def test_mlx_encode_single_with_tiling_updates_progress_per_chunk(self): method test_mlx_vae_encode_sample_returns_torch_tensor (line 158) | def test_mlx_vae_encode_sample_returns_torch_tensor(self): method test_mlx_decode_single_raises_when_mlx_vae_missing (line 171) | def test_mlx_decode_single_raises_when_mlx_vae_missing(self): method test_mlx_encode_single_raises_when_mlx_vae_missing (line 184) | def test_mlx_encode_single_raises_when_mlx_vae_missing(self): FILE: acestep/core/generation/handler/padding_utils.py class PaddingMixin (line 7) | class PaddingMixin: method prepare_padding_info (line 14) | def prepare_padding_info( FILE: acestep/core/generation/handler/progress.py class ProgressMixin (line 19) | class ProgressMixin: method _get_project_root (line 20) | def _get_project_root(self) -> str: method _load_progress_estimates (line 35) | def _load_progress_estimates(self) -> None: method _save_progress_estimates (line 47) | def _save_progress_estimates(self) -> None: method _duration_bucket (line 56) | def _duration_bucket(self, duration_sec: Optional[float]) -> str: method _update_progress_estimate (line 67) | def _update_progress_estimate( method _estimate_diffusion_per_step (line 94) | def _estimate_diffusion_per_step( method _start_diffusion_progress_estimator (line 150) | def _start_diffusion_progress_estimator( FILE: acestep/core/generation/handler/progress_project_root_test.py function _load_progress_mixin (line 12) | def _load_progress_mixin(): class TestProgressMixinGetProjectRoot (line 23) | class TestProgressMixinGetProjectRoot(unittest.TestCase): method _make_host (line 26) | def _make_host(self): method test_returns_cwd_by_default (line 40) | def test_returns_cwd_by_default(self): method test_returns_env_var_when_set (line 48) | def test_returns_env_var_when_set(self): method test_env_var_takes_precedence_over_cwd (line 56) | def test_env_var_takes_precedence_over_cwd(self): method test_does_not_use_file_location (line 65) | def test_does_not_use_file_location(self): FILE: acestep/core/generation/handler/prompt_utils.py class PromptMixin (line 12) | class PromptMixin: method _format_instruction (line 21) | def _format_instruction(self, instruction: str) -> str: method _format_lyrics (line 27) | def _format_lyrics(self, lyrics: str, language: str) -> str: method _pad_sequences (line 31) | def _pad_sequences( method extract_caption_from_sft_format (line 42) | def extract_caption_from_sft_format(self, caption: str) -> str: method build_dit_inputs (line 55) | def build_dit_inputs( method _get_text_hidden_states (line 103) | def _get_text_hidden_states(self, text_prompt: str) -> Tuple[torch.Ten... method _extract_caption_and_language (line 135) | def _extract_caption_and_language( FILE: acestep/core/generation/handler/reference_audio_validation_test.py class ReferenceAudioValidationTests (line 13) | class ReferenceAudioValidationTests(unittest.TestCase): method test_generate_music_returns_error_for_invalid_reference_audio (line 16) | def test_generate_music_returns_error_for_invalid_reference_audio(self... FILE: acestep/core/generation/handler/repaint_step_injection.py function apply_repaint_step_injection (line 6) | def apply_repaint_step_injection( function build_soft_repaint_mask (line 33) | def build_soft_repaint_mask( function apply_repaint_boundary_blend (line 84) | def apply_repaint_boundary_blend( FILE: acestep/core/generation/handler/repaint_step_injection_test.py class TestApplyRepaintStepInjection (line 14) | class TestApplyRepaintStepInjection(unittest.TestCase): method setUp (line 17) | def setUp(self): method test_non_repaint_regions_match_noised_source (line 28) | def test_non_repaint_regions_match_noised_source(self): method test_repaint_regions_unchanged (line 37) | def test_repaint_regions_unchanged(self): method test_all_true_mask_is_noop (line 44) | def test_all_true_mask_is_noop(self): method test_t_zero_returns_clean_source_in_preserved (line 51) | def test_t_zero_returns_clean_source_in_preserved(self): method test_t_one_returns_pure_noise_in_preserved (line 57) | def test_t_one_returns_pure_noise_in_preserved(self): class TestBuildSoftRepaintMask (line 64) | class TestBuildSoftRepaintMask(unittest.TestCase): method test_core_region_is_one (line 67) | def test_core_region_is_one(self): method test_far_preserved_is_zero (line 73) | def test_far_preserved_is_zero(self): method test_crossfade_zone_is_monotonic (line 80) | def test_crossfade_zone_is_monotonic(self): method test_all_true_mask_returns_ones (line 91) | def test_all_true_mask_returns_ones(self): method test_all_false_mask_returns_zeros (line 96) | def test_all_false_mask_returns_zeros(self): method test_zero_crossfade_is_hard_mask (line 101) | def test_zero_crossfade_is_hard_mask(self): method test_crossfade_clamped_at_boundaries (line 107) | def test_crossfade_clamped_at_boundaries(self): class TestApplyRepaintBoundaryBlend (line 116) | class TestApplyRepaintBoundaryBlend(unittest.TestCase): method test_preserved_region_uses_source (line 119) | def test_preserved_region_uses_source(self): method test_core_repaint_uses_generated (line 129) | def test_core_repaint_uses_generated(self): method test_full_repaint_mask_returns_generated (line 138) | def test_full_repaint_mask_returns_generated(self): method test_blending_zone_is_interpolated (line 146) | def test_blending_zone_is_interpolated(self): FILE: acestep/core/generation/handler/repaint_waveform_splice.py function _build_waveform_crossfade_mask (line 14) | def _build_waveform_crossfade_mask( function apply_repaint_waveform_splice (line 54) | def apply_repaint_waveform_splice( FILE: acestep/core/generation/handler/repaint_waveform_splice_test.py class TestBuildWaveformCrossfadeMask (line 13) | class TestBuildWaveformCrossfadeMask(unittest.TestCase): method test_mask_ones_inside_repaint_region (line 16) | def test_mask_ones_inside_repaint_region(self): method test_crossfade_ramp_at_left_boundary (line 22) | def test_crossfade_ramp_at_left_boundary(self): method test_crossfade_ramp_at_right_boundary (line 31) | def test_crossfade_ramp_at_right_boundary(self): method test_crossfade_clamps_to_boundaries (line 40) | def test_crossfade_clamps_to_boundaries(self): method test_zero_crossfade_is_hard_step (line 46) | def test_zero_crossfade_is_hard_step(self): class TestApplyRepaintWaveformSplice (line 53) | class TestApplyRepaintWaveformSplice(unittest.TestCase): method _make_tensors (line 56) | def _make_tensors(self, B=1, C=2, samples=4800): method test_non_repaint_regions_match_src (line 61) | def test_non_repaint_regions_match_src(self): method test_repaint_region_uses_pred (line 71) | def test_repaint_region_uses_pred(self): method test_crossfade_produces_intermediate_values (line 80) | def test_crossfade_produces_intermediate_values(self): method test_full_repaint_returns_pred_unchanged (line 91) | def test_full_repaint_returns_pred_unchanged(self): method test_length_mismatch_pred_longer (line 98) | def test_length_mismatch_pred_longer(self): method test_length_mismatch_src_longer (line 107) | def test_length_mismatch_src_longer(self): method test_batch_independent_splice (line 115) | def test_batch_independent_splice(self): method test_zero_crossfade_duration (line 129) | def test_zero_crossfade_duration(self): FILE: acestep/core/generation/handler/resolve_repaint_config_test.py class TestResolveRepaintConfig (line 8) | class TestResolveRepaintConfig(unittest.TestCase): method test_aggressive_returns_zeros (line 14) | def test_aggressive_returns_zeros(self): method test_conservative_returns_max (line 20) | def test_conservative_returns_max(self): method test_balanced_half (line 26) | def test_balanced_half(self): method test_balanced_zero_equals_conservative (line 32) | def test_balanced_zero_equals_conservative(self): method test_balanced_one_equals_aggressive (line 39) | def test_balanced_one_equals_aggressive(self): method test_strength_clamped_above_one (line 46) | def test_strength_clamped_above_one(self): method test_strength_clamped_below_zero (line 50) | def test_strength_clamped_below_zero(self): method test_default_args (line 54) | def test_default_args(self): FILE: acestep/core/generation/handler/service_generate.py class ServiceGenerateMixin (line 13) | class ServiceGenerateMixin: method service_generate (line 21) | def service_generate( FILE: acestep/core/generation/handler/service_generate_execute.py class ServiceGenerateExecuteMixin (line 10) | class ServiceGenerateExecuteMixin: method _unpack_service_processed_data (line 13) | def _unpack_service_processed_data(self, processed_data: Tuple[Any, ..... method _resolve_service_seed_param (line 58) | def _resolve_service_seed_param(self, seed_list: Optional[List[int]]) ... method _build_service_generate_kwargs (line 64) | def _build_service_generate_kwargs( method _execute_service_generate_diffusion (line 118) | def _execute_service_generate_diffusion( FILE: acestep/core/generation/handler/service_generate_execute_test.py class _Host (line 12) | class _Host(ServiceGenerateExecuteMixin, ServiceGenerateOutputsMixin): method __init__ (line 15) | def __init__(self): class ServiceGenerateExecuteMixinTests (line 21) | class ServiceGenerateExecuteMixinTests(unittest.TestCase): method test_build_generate_kwargs_adds_timesteps_tensor (line 24) | def test_build_generate_kwargs_adds_timesteps_tensor(self): method test_attach_service_outputs_persists_required_fields (line 62) | def test_attach_service_outputs_persists_required_fields(self): method test_resolve_seed_param_none_uses_random_seed (line 87) | def test_resolve_seed_param_none_uses_random_seed(self): FILE: acestep/core/generation/handler/service_generate_outputs.py class ServiceGenerateOutputsMixin (line 8) | class ServiceGenerateOutputsMixin: method _attach_service_generate_outputs (line 11) | def _attach_service_generate_outputs( FILE: acestep/core/generation/handler/service_generate_request.py class ServiceGenerateRequestMixin (line 15) | class ServiceGenerateRequestMixin: method _build_service_seed_list (line 18) | def _build_service_seed_list( method _normalize_service_generate_inputs (line 36) | def _normalize_service_generate_inputs( FILE: acestep/core/generation/handler/service_generate_request_test.py class _Host (line 10) | class _Host(ServiceGenerateRequestMixin): method __init__ (line 13) | def __init__(self, is_turbo: bool): class ServiceGenerateRequestMixinTests (line 20) | class ServiceGenerateRequestMixinTests(unittest.TestCase): method test_normalize_inputs_clamps_turbo_steps_and_expands_lists (line 23) | def test_normalize_inputs_clamps_turbo_steps_and_expands_lists(self): method test_build_service_seed_list_duplicates_scalar_seed (line 50) | def test_build_service_seed_list_duplicates_scalar_seed(self): method test_seed_list_shorter_than_batch_gets_padded (line 71) | def test_seed_list_shorter_than_batch_gets_padded(self): method test_seed_list_longer_than_batch_gets_truncated (line 90) | def test_seed_list_longer_than_batch_gets_truncated(self): method test_lyrics_longer_than_batch_get_truncated (line 108) | def test_lyrics_longer_than_batch_get_truncated(self): method test_batch_size_at_maximum_is_not_clamped (line 126) | def test_batch_size_at_maximum_is_not_clamped(self): method test_batch_size_exceeds_maximum_gets_clamped (line 147) | def test_batch_size_exceeds_maximum_gets_clamped(self): method test_batch_size_clamping_with_seed_list (line 172) | def test_batch_size_clamping_with_seed_list(self): method test_batch_size_below_maximum_is_not_affected (line 196) | def test_batch_size_below_maximum_is_not_affected(self): method test_batch_size_clamping_truncates_all_list_fields (line 217) | def test_batch_size_clamping_truncates_all_list_fields(self): method test_batch_size_clamping_with_single_value_fields (line 257) | def test_batch_size_clamping_with_single_value_fields(self): FILE: acestep/core/generation/handler/service_generate_test.py function _load_service_generate_module (line 15) | def _load_service_generate_module(): class _Host (line 59) | class _Host(ServiceGenerateMixin): method __init__ (line 66) | def __init__(self): method _normalize_service_generate_inputs (line 92) | def _normalize_service_generate_inputs(self, **kwargs): method __getattr__ (line 99) | def __getattr__(self, name): class ServiceGenerateMixinTests (line 112) | class ServiceGenerateMixinTests(unittest.TestCase): method test_service_generate_orchestrates_helpers_and_returns_attached_outputs (line 115) | def test_service_generate_orchestrates_helpers_and_returns_attached_ou... method test_service_generate_forwards_runtime_controls_to_build_and_execute (line 127) | def test_service_generate_forwards_runtime_controls_to_build_and_execu... FILE: acestep/core/generation/handler/task_utils.py class TaskUtilsMixin (line 12) | class TaskUtilsMixin: method prepare_seeds (line 19) | def prepare_seeds( method generate_instruction (line 65) | def generate_instruction( method determine_task_type (line 99) | def determine_task_type(self, task_type, audio_code_string): method create_target_wavs (line 115) | def create_target_wavs(self, duration_seconds: float) -> torch.Tensor: FILE: acestep/core/generation/handler/task_utils_test.py class _Host (line 8) | class _Host(TaskUtilsMixin): class DetermineTaskTypeTests (line 12) | class DetermineTaskTypeTests(unittest.TestCase): method setUp (line 15) | def setUp(self): method test_repaint_task_enables_repainting (line 18) | def test_repaint_task_enables_repainting(self): method test_lego_task_enables_repainting_for_chunk_mask (line 26) | def test_lego_task_enables_repainting_for_chunk_mask(self): method test_cover_task_is_not_repaint (line 39) | def test_cover_task_is_not_repaint(self): method test_text2music_task_is_not_repaint (line 47) | def test_text2music_task_is_not_repaint(self): method test_audio_codes_upgrade_task_to_cover (line 55) | def test_audio_codes_upgrade_task_to_cover(self): method test_lego_with_audio_codes_enables_repainting (line 65) | def test_lego_with_audio_codes_enables_repainting(self): FILE: acestep/core/generation/handler/training_preset.py class TrainingPresetMixin (line 6) | class TrainingPresetMixin: method switch_to_training_preset (line 9) | def switch_to_training_preset(self) -> Tuple[str, bool]: FILE: acestep/core/generation/handler/training_preset_test.py function _load_training_preset_module (line 10) | def _load_training_preset_module(): class _Host (line 42) | class _Host(TrainingPresetMixin): method __init__ (line 45) | def __init__(self): method initialize_service (line 52) | def initialize_service(self, **kwargs): class TrainingPresetMixinTests (line 58) | class TrainingPresetMixinTests(unittest.TestCase): method test_switch_to_training_preset_returns_already_safe_when_unquantized (line 61) | def test_switch_to_training_preset_returns_already_safe_when_unquantiz... method test_switch_to_training_preset_fails_without_last_init_params (line 69) | def test_switch_to_training_preset_fails_without_last_init_params(self): method test_switch_to_training_preset_reinitializes_without_quantization (line 78) | def test_switch_to_training_preset_reinitializes_without_quantization(... method test_switch_to_training_preset_returns_failure_on_reinit_error (line 108) | def test_switch_to_training_preset_returns_failure_on_reinit_error(self): method test_switch_to_training_preset_passes_none_when_prefer_source_absent (line 132) | def test_switch_to_training_preset_passes_none_when_prefer_source_abse... method test_switch_to_training_preset_does_not_mutate_last_init_params (line 155) | def test_switch_to_training_preset_does_not_mutate_last_init_params(se... FILE: acestep/core/generation/handler/vae_decode.py class VaeDecodeMixin (line 9) | class VaeDecodeMixin: method tiled_decode (line 16) | def tiled_decode( method _tiled_decode_cpu_fallback (line 87) | def _tiled_decode_cpu_fallback(self, latents): method _decode_on_cpu (line 103) | def _decode_on_cpu(self, latents): FILE: acestep/core/generation/handler/vae_decode_chunks.py class VaeDecodeChunksMixin (line 10) | class VaeDecodeChunksMixin: method _tiled_decode_inner (line 13) | def _tiled_decode_inner(self, latents, chunk_size, overlap, offload_wa... method _tiled_decode_gpu (line 87) | def _tiled_decode_gpu(self, latents, stride, overlap, num_steps): method _tiled_decode_offload_cpu (line 118) | def _tiled_decode_offload_cpu(self, latents, bsz, latent_frames, strid... FILE: acestep/core/generation/handler/vae_decode_chunks_test.py class VaeDecodeChunksMixinTests (line 10) | class VaeDecodeChunksMixinTests(unittest.TestCase): method test_batch_sequential_decode_for_multi_sample_input (line 13) | def test_batch_sequential_decode_for_multi_sample_input(self): method test_direct_decode_for_short_latents (line 20) | def test_direct_decode_for_short_latents(self): method test_overlap_adjustment_reduces_invalid_overlap (line 27) | def test_overlap_adjustment_reduces_invalid_overlap(self): method test_oom_fallback_gpu_to_offload_path (line 42) | def test_oom_fallback_gpu_to_offload_path(self): method test_oom_fallback_chain_reaches_decode_on_cpu (line 62) | def test_oom_fallback_chain_reaches_decode_on_cpu(self): FILE: acestep/core/generation/handler/vae_decode_mixin_test.py class VaeDecodeMixinTests (line 10) | class VaeDecodeMixinTests(unittest.TestCase): method test_tiled_decode_reduces_mps_chunk_and_overlap (line 13) | def test_tiled_decode_reduces_mps_chunk_and_overlap(self): method test_tiled_decode_mps_runtime_failure_uses_cpu_fallback (line 22) | def test_tiled_decode_mps_runtime_failure_uses_cpu_fallback(self): method test_tiled_decode_uses_mlx_fast_path_when_available (line 35) | def test_tiled_decode_uses_mlx_fast_path_when_available(self): method test_tiled_decode_falls_back_when_mlx_decode_fails (line 43) | def test_tiled_decode_falls_back_when_mlx_decode_fails(self): method test_tiled_decode_non_mps_runtime_error_is_raised (line 58) | def test_tiled_decode_non_mps_runtime_error_is_raised(self): FILE: acestep/core/generation/handler/vae_decode_test_helpers.py class _DecodeOutput (line 9) | class _DecodeOutput: method __init__ (line 12) | def __init__(self, sample: torch.Tensor): class _FakeVae (line 17) | class _FakeVae: method __init__ (line 20) | def __init__(self, decode_fn=None): method parameters (line 25) | def parameters(self): method cpu (line 29) | def cpu(self): method float (line 33) | def float(self): method to (line 37) | def to(self, target): method decode (line 42) | def decode(self, latents: torch.Tensor): class _DecodeHost (line 50) | class _DecodeHost(VaeDecodeMixin): method __init__ (line 53) | def __init__(self): method _get_auto_decode_chunk_size (line 61) | def _get_auto_decode_chunk_size(self): method _should_offload_wav_to_cpu (line 65) | def _should_offload_wav_to_cpu(self): method _tiled_decode_inner (line 69) | def _tiled_decode_inner(self, latents, chunk_size, overlap, offload_wa... method _tiled_decode_cpu_fallback (line 77) | def _tiled_decode_cpu_fallback(self, latents): method _mlx_vae_decode (line 82) | def _mlx_vae_decode(self, latents): class _ChunksHost (line 88) | class _ChunksHost(VaeDecodeChunksMixin): method __init__ (line 91) | def __init__(self): method _empty_cache (line 99) | def _empty_cache(self): method _decode_on_cpu (line 103) | def _decode_on_cpu(self, latents): FILE: acestep/core/generation/handler/vae_encode.py class VaeEncodeMixin (line 12) | class VaeEncodeMixin: method tiled_encode (line 15) | def tiled_encode(self, audio, chunk_size=None, overlap=None, offload_l... FILE: acestep/core/generation/handler/vae_encode_chunks.py class VaeEncodeChunksMixin (line 7) | class VaeEncodeChunksMixin: method _tiled_encode_gpu (line 10) | def _tiled_encode_gpu(self, audio, batch_size, samples, stride, overla... method _tiled_encode_offload_cpu (line 42) | def _tiled_encode_offload_cpu(self, audio, batch_size, samples, stride... FILE: acestep/core/generation/handler/vae_encode_test.py class _Dist (line 11) | class _Dist: method __init__ (line 14) | def __init__(self, sample): method sample (line 18) | def sample(self): class _EncOut (line 23) | class _EncOut: method __init__ (line 26) | def __init__(self, sample): class _Vae (line 31) | class _Vae: method __init__ (line 34) | def __init__(self, fn=None): method encode (line 39) | def encode(self, audio_chunk): class _Host (line 47) | class _Host(VaeEncodeMixin, VaeEncodeChunksMixin): method __init__ (line 50) | def __init__(self): method _get_effective_mps_memory_gb (line 59) | def _get_effective_mps_memory_gb(self): method _mlx_vae_encode_sample (line 63) | def _mlx_vae_encode_sample(self, audio): class VaeEncodeMixinTests (line 69) | class VaeEncodeMixinTests(unittest.TestCase): method test_tiled_encode_uses_mlx_path_when_available (line 72) | def test_tiled_encode_uses_mlx_path_when_available(self): method test_tiled_encode_direct_path_for_short_audio (line 80) | def test_tiled_encode_direct_path_for_short_audio(self): method test_tiled_encode_uses_offload_path (line 86) | def test_tiled_encode_uses_offload_path(self): method test_tiled_encode_rejects_invalid_stride (line 101) | def test_tiled_encode_rejects_invalid_stride(self): method test_tiled_encode_routes_to_gpu_chunk_path (line 107) | def test_tiled_encode_routes_to_gpu_chunk_path(self): method test_tiled_encode_gpu_and_offload_outputs_match (line 122) | def test_tiled_encode_gpu_and_offload_outputs_match(self): method test_tiled_encode_offload_returns_cpu_tensor (line 136) | def test_tiled_encode_offload_returns_cpu_tensor(self): FILE: acestep/core/lora/introspection.py function collect_adapter_names (line 8) | def collect_adapter_names(decoder: Any) -> list[str]: function is_lora_like_module (line 77) | def is_lora_like_module(name: str, module: Any) -> bool: function read_adapter_value (line 93) | def read_adapter_value(value: Any, adapter: str) -> Any: function is_peft_factor_set_scale_module (line 109) | def is_peft_factor_set_scale_module(module: Any) -> bool: function get_peft_initial_scale (line 114) | def get_peft_initial_scale( FILE: acestep/core/lora/registry.py function build_lora_registry (line 13) | def build_lora_registry( FILE: acestep/core/lora/scaling.py function _inc (line 10) | def _inc(store: dict[str, int], key: str) -> None: function apply_scale_to_adapter (line 14) | def apply_scale_to_adapter( FILE: acestep/core/lora/service.py class LoraService (line 11) | class LoraService: method __init__ (line 18) | def __init__( method bind_decoder (line 33) | def bind_decoder(self, decoder: Any | None) -> None: method set_hooks (line 36) | def set_hooks( method discover_adapter_names (line 44) | def discover_adapter_names(self) -> list[str]: method _keep_adapter_agnostic_targets (line 50) | def _keep_adapter_agnostic_targets(registry: dict[str, dict[str, Any]]... method rebuild_registry (line 63) | def rebuild_registry(self, lora_path: str | None = None) -> tuple[int,... method ensure_active_adapter (line 91) | def ensure_active_adapter(self) -> str | None: method set_active_adapter (line 96) | def set_active_adapter(self, adapter_name: str) -> bool: method apply_scale (line 102) | def apply_scale(self, adapter_name: str, scale: float) -> int: method registry_snapshot (line 114) | def registry_snapshot(self, max_targets_per_adapter: int = 20) -> dict... FILE: acestep/core/lora/service_test.py class FakeDecoder (line 7) | class FakeDecoder: method __init__ (line 8) | def __init__(self, modules, adapter_names=None): method named_modules (line 12) | def named_modules(self): method get_adapter_names (line 15) | def get_adapter_names(self): class FakeScaleLayerModule (line 21) | class FakeScaleLayerModule: method __init__ (line 24) | def __init__(self): method unscale_layer (line 27) | def unscale_layer(self): method scale_layer (line 30) | def scale_layer(self, value): class FakeSetScaleFactorModule (line 34) | class FakeSetScaleFactorModule: method __init__ (line 35) | def __init__(self, scaling): method set_scale (line 41) | def set_scale(self, adapter_name, factor): class ExplodingSetScaleModule (line 45) | class ExplodingSetScaleModule: method set_scale (line 46) | def set_scale(self, adapter_name, factor): class LoraServiceTests (line 50) | class LoraServiceTests(unittest.TestCase): method test_rebuild_registry_keeps_adapter_agnostic_targets_without_adapter_names (line 51) | def test_rebuild_registry_keeps_adapter_agnostic_targets_without_adapt... method test_apply_scale_scale_layer_is_idempotent_with_unscale_layer (line 63) | def test_apply_scale_scale_layer_is_idempotent_with_unscale_layer(self): method test_set_scale_factor_unanchored_is_reported_and_skipped (line 79) | def test_set_scale_factor_unanchored_is_reported_and_skipped(self): method test_scaling_scalar_non_numeric_is_skipped_with_warning (line 93) | def test_scaling_scalar_non_numeric_is_skipped_with_warning(self): method test_target_exception_surfaces_warning (line 116) | def test_target_exception_surfaces_warning(self): FILE: acestep/core/scoring/_dtw.py function dtw_cpu (line 13) | def dtw_cpu(x: np.ndarray): function _backtrace (line 49) | def _backtrace(trace: np.ndarray, N: int, M: int): function median_filter (line 90) | def median_filter(x: torch.Tensor, filter_width: int) -> torch.Tensor: FILE: acestep/core/scoring/dit_alignment.py class TokenTimestamp (line 19) | class TokenTimestamp: class SentenceTimestamp (line 29) | class SentenceTimestamp: class MusicStampsAligner (line 39) | class MusicStampsAligner: method __init__ (line 46) | def __init__(self, tokenizer): method _apply_bidirectional_consensus (line 55) | def _apply_bidirectional_consensus( method _preprocess_attention (line 103) | def _preprocess_attention( method stamps_align_info (line 149) | def stamps_align_info( method _decode_tokens_incrementally (line 199) | def _decode_tokens_incrementally(self, token_ids: List[int]) -> List[s... method token_timestamps (line 240) | def token_timestamps( method _decode_sentence_from_tokens (line 292) | def _decode_sentence_from_tokens(self, tokens: List[TokenTimestamp]) -... method sentence_timestamps (line 305) | def sentence_timestamps( method format_lrc (line 375) | def format_lrc( method get_timestamps_and_lrc (line 411) | def get_timestamps_and_lrc( FILE: acestep/core/scoring/dit_score.py class MusicLyricScorer (line 15) | class MusicLyricScorer: method __init__ (line 23) | def __init__(self, tokenizer: Any): method _generate_token_type_mask (line 32) | def _generate_token_type_mask(self, token_ids: List[int]) -> np.ndarray: method _preprocess_attention (line 57) | def _preprocess_attention( method _compute_alignment_metrics (line 117) | def _compute_alignment_metrics( method lyrics_alignment_info (line 216) | def lyrics_alignment_info( method calculate_score (line 269) | def calculate_score( FILE: acestep/core/scoring/lm_score.py function pmi_score (line 19) | def pmi_score(log_prob_conditional: float, log_prob_unconditional: float... function pmi_to_normalized_score (line 42) | def pmi_to_normalized_score(pmi: float, scale: float = 0.1) -> float: function _load_scoring_model_context (line 71) | def _load_scoring_model_context(llm_handler): function _get_logits_and_target_for_scoring (line 116) | def _get_logits_and_target_for_scoring(llm_handler, formatted_prompt: str, function _calculate_topk_recall (line 181) | def _calculate_topk_recall(llm_handler, function _calculate_metadata_recall (line 235) | def _calculate_metadata_recall(llm_handler, function _calculate_log_prob (line 263) | def _calculate_log_prob( function calculate_reward_score (line 292) | def calculate_reward_score( function calculate_pmi_score_per_condition (line 388) | def calculate_pmi_score_per_condition( FILE: acestep/core/scoring/scoring_test.py class DtwCpuTests (line 17) | class DtwCpuTests(unittest.TestCase): method test_identity_cost_matrix (line 20) | def test_identity_cost_matrix(self): method test_single_element (line 30) | def test_single_element(self): method test_rectangular_matrix (line 37) | def test_rectangular_matrix(self): class MedianFilterTests (line 47) | class MedianFilterTests(unittest.TestCase): method test_identity_with_width_one (line 50) | def test_identity_with_width_one(self): method test_smoothing_effect (line 56) | def test_smoothing_effect(self): method test_short_input_passthrough (line 63) | def test_short_input_passthrough(self): class PmiScoreTests (line 70) | class PmiScoreTests(unittest.TestCase): method test_positive_pmi (line 73) | def test_positive_pmi(self): method test_zero_pmi (line 78) | def test_zero_pmi(self): method test_negative_pmi (line 83) | def test_negative_pmi(self): class PmiNormalizedScoreTests (line 89) | class PmiNormalizedScoreTests(unittest.TestCase): method test_zero_pmi_gives_half (line 92) | def test_zero_pmi_gives_half(self): method test_positive_pmi_above_half (line 96) | def test_positive_pmi_above_half(self): method test_negative_pmi_below_half (line 100) | def test_negative_pmi_below_half(self): method test_bounded_zero_one (line 104) | def test_bounded_zero_one(self): class RewardScoreTests (line 112) | class RewardScoreTests(unittest.TestCase): method test_all_components_present (line 115) | def test_all_components_present(self): method test_no_scores_returns_zero (line 122) | def test_no_scores_returns_zero(self): method test_caption_only (line 127) | def test_caption_only(self): method test_metadata_aggregation (line 133) | def test_metadata_aggregation(self): FILE: acestep/dataset_handler.py class DatasetHandler (line 14) | class DatasetHandler: method __init__ (line 22) | def __init__(self): method import_dataset (line 27) | def import_dataset(self, dataset_type: str) -> str: method get_item_data (line 46) | def get_item_data(self, *args, **kwargs) -> Tuple: FILE: acestep/debug_utils.py function _configure_cpu_threads (line 36) | def _configure_cpu_threads() -> None: function configure_cpu_threads_if_needed (line 74) | def configure_cpu_threads_if_needed() -> bool: function _normalize_mode (line 110) | def _normalize_mode(mode: str) -> str: function is_debug_enabled (line 114) | def is_debug_enabled(mode: str) -> bool: function is_debug_verbose (line 118) | def is_debug_verbose(mode: str) -> bool: function debug_log (line 122) | def debug_log(message: Union[str, Callable[[], str]], *, mode: str = TEN... function get_debug_mode (line 147) | def get_debug_mode(name: str, default: str = "OFF") -> str: function debug_log_for (line 152) | def debug_log_for(name: str, message: Union[str, Callable[[], str]], *, ... function debug_start_for (line 158) | def debug_start_for(name: str, label: str) -> Optional[float]: function debug_end_for (line 164) | def debug_end_for(name: str, label: str, start_ts: Optional[float]) -> N... function debug_log_verbose_for (line 170) | def debug_log_verbose_for(name: str, message: Union[str, Callable[[], st... function debug_start_verbose_for (line 178) | def debug_start_verbose_for(name: str, label: str) -> Optional[float]: function debug_end_verbose_for (line 186) | def debug_end_verbose_for(name: str, label: str, start_ts: Optional[floa... function debug_start (line 194) | def debug_start(name: str, *, mode: str = TENSOR_DEBUG_MODE, prefix: str... function debug_end (line 203) | def debug_end(name: str, start_ts: Optional[float], *, mode: str = TENSO... FILE: acestep/gpu_config.py function is_mps_platform (line 41) | def is_mps_platform() -> bool: function is_cuda_available (line 58) | def is_cuda_available() -> bool: function is_mps_available (line 68) | def is_mps_available() -> bool: function is_xpu_available (line 78) | def is_xpu_available() -> bool: function is_rocm_available (line 88) | def is_rocm_available() -> bool: function cuda_supports_bfloat16 (line 108) | def cuda_supports_bfloat16(device_index: int | None = None) -> bool: class GPUConfig (line 160) | class GPUConfig: function get_gpu_memory_gb (line 364) | def get_gpu_memory_gb() -> float: function _log_gpu_diagnostic_info (line 526) | def _log_gpu_diagnostic_info(torch_module): function get_gpu_tier (line 631) | def get_gpu_tier(gpu_memory_gb: float) -> str: function get_gpu_config (line 667) | def get_gpu_config(gpu_memory_gb: Optional[float] = None) -> GPUConfig: function get_lm_model_size (line 743) | def get_lm_model_size(model_path: str) -> str: function is_lm_model_size_allowed (line 764) | def is_lm_model_size_allowed( function find_best_lm_model_on_disk (line 789) | def find_best_lm_model_on_disk( function get_lm_gpu_memory_ratio (line 825) | def get_lm_gpu_memory_ratio( function compute_adaptive_config (line 919) | def compute_adaptive_config(total_vram_gb: float, dit_type: str = "turbo... function get_effective_free_vram_gb (line 1028) | def get_effective_free_vram_gb(device_index: int = 0) -> float: function get_available_vram_gb (line 1109) | def get_available_vram_gb() -> float: function estimate_inference_vram (line 1120) | def estimate_inference_vram( function check_duration_limit (line 1164) | def check_duration_limit( function check_batch_size_limit (line 1196) | def check_batch_size_limit( function is_lm_model_supported (line 1228) | def is_lm_model_supported(model_path: str, gpu_config: GPUConfig) -> Tup... function get_recommended_lm_model (line 1258) | def get_recommended_lm_model(gpu_config: GPUConfig) -> Optional[str]: function print_gpu_config_info (line 1275) | def print_gpu_config_info(gpu_config: GPUConfig): function get_gpu_device_name (line 1310) | def get_gpu_device_name() -> str: function get_gpu_config_for_tier (line 1341) | def get_gpu_config_for_tier(tier: str) -> GPUConfig: function get_global_gpu_config (line 1405) | def get_global_gpu_config() -> GPUConfig: function set_global_gpu_config (line 1413) | def set_global_gpu_config(config: GPUConfig): FILE: acestep/gpu_config_effective_free_vram_test.py function _make_torch_cuda_mock (line 18) | def _make_torch_cuda_mock( class GetEffectiveFreeVramGbTests (line 48) | class GetEffectiveFreeVramGbTests(unittest.TestCase): method _run_with_mock (line 51) | def _run_with_mock( method test_includes_pytorch_cache_when_device_free_is_zero (line 89) | def test_includes_pytorch_cache_when_device_free_is_zero(self): method test_sums_device_free_and_allocator_cache (line 109) | def test_sums_device_free_and_allocator_cache(self): method test_returns_zero_when_fully_allocated_no_cache (line 123) | def test_returns_zero_when_fully_allocated_no_cache(self): method test_returns_zero_when_cuda_unavailable (line 136) | def test_returns_zero_when_cuda_unavailable(self): method test_debug_cap_clamps_effective_free (line 146) | def test_debug_cap_clamps_effective_free(self): FILE: acestep/handler.py class AceStepHandler (line 61) | class AceStepHandler( method __init__ (line 102) | def __init__(self): FILE: acestep/inference.py function _get_spaces_gpu_decorator (line 23) | def _get_spaces_gpu_decorator(duration=180): class GenerationParams (line 39) | class GenerationParams: method to_dict (line 171) | def to_dict(self) -> Dict[str, Any]: class GenerationConfig (line 177) | class GenerationConfig: method to_dict (line 200) | def to_dict(self) -> Dict[str, Any]: class GenerationResult (line 206) | class GenerationResult: method to_dict (line 227) | def to_dict(self) -> Dict[str, Any]: class UnderstandResult (line 233) | class UnderstandResult: method to_dict (line 265) | def to_dict(self) -> Dict[str, Any]: function _update_metadata_from_lm (line 270) | def _update_metadata_from_lm( function generate_music (line 318) | def generate_music( function understand_music (line 814) | def understand_music( class CreateSampleResult (line 943) | class CreateSampleResult: method to_dict (line 981) | def to_dict(self) -> Dict[str, Any]: function create_sample (line 986) | def create_sample( class FormatSampleResult (line 1120) | class FormatSampleResult: method to_dict (line 1155) | def to_dict(self) -> Dict[str, Any]: function format_sample (line 1160) | def format_sample( FILE: acestep/launcher_compat.py class LegacyTorchFixDecision (line 13) | class LegacyTorchFixDecision: function evaluate_legacy_torch_fix (line 27) | def evaluate_legacy_torch_fix(torch_module: Any) -> LegacyTorchFixDecision: function determine_legacy_torch_fix (line 52) | def determine_legacy_torch_fix(torch_module: Any | None = None) -> Legac... function legacy_torch_fix_probe_exit_code (line 74) | def legacy_torch_fix_probe_exit_code(torch_module: Any | None = None) ->... FILE: acestep/launcher_compat_test.py function _make_torch (line 16) | def _make_torch( class LauncherCompatDecisionTests (line 31) | class LauncherCompatDecisionTests(unittest.TestCase): method test_legacy_arch_missing_requires_fix (line 34) | def test_legacy_arch_missing_requires_fix(self) -> None: method test_legacy_arch_present_skips_fix (line 42) | def test_legacy_arch_present_skips_fix(self) -> None: method test_modern_gpu_skips_fix_even_if_arch_not_listed (line 50) | def test_modern_gpu_skips_fix_even_if_arch_not_listed(self) -> None: method test_no_cuda_skips_fix (line 58) | def test_no_cuda_skips_fix(self) -> None: method test_determine_returns_probe_failed_on_exception (line 66) | def test_determine_returns_probe_failed_on_exception(self) -> None: method test_probe_exit_code_maps_to_decision (line 77) | def test_probe_exit_code_maps_to_decision(self) -> None: FILE: acestep/launcher_legacy_torch_fix_test.py class LauncherLegacyTorchFixTests (line 12) | class LauncherLegacyTorchFixTests(unittest.TestCase): method _read (line 15) | def _read(self, rel_path: str) -> str: method test_linux_gradio_launcher_calls_shared_probe (line 19) | def test_linux_gradio_launcher_calls_shared_probe(self) -> None: method test_linux_api_launcher_calls_shared_probe (line 28) | def test_linux_api_launcher_calls_shared_probe(self) -> None: method test_windows_gradio_launcher_calls_shared_probe (line 37) | def test_windows_gradio_launcher_calls_shared_probe(self) -> None: method test_windows_api_launcher_calls_shared_probe (line 52) | def test_windows_api_launcher_calls_shared_probe(self) -> None: FILE: acestep/llm_backend_compat.py function _has_working_triton_installation (line 7) | def _has_working_triton_installation() -> bool: function get_vllm_preflight_warning (line 17) | def get_vllm_preflight_warning(*, device: str, platform: str | None = No... FILE: acestep/llm_backend_compat_test.py class VllmBackendCompatTests (line 25) | class VllmBackendCompatTests(unittest.TestCase): method test_get_vllm_preflight_warning_returns_message_on_windows_without_triton (line 28) | def test_get_vllm_preflight_warning_returns_message_on_windows_without... method test_get_vllm_preflight_warning_returns_none_outside_windows_cuda (line 41) | def test_get_vllm_preflight_warning_returns_none_outside_windows_cuda(... class LlmInitializeBackendCompatTests (line 55) | class LlmInitializeBackendCompatTests(unittest.TestCase): method test_initialize_skips_vllm_when_windows_triton_is_unavailable (line 65) | def test_initialize_skips_vllm_when_windows_triton_is_unavailable( method test_initialize_falls_back_when_vllm_returns_triton_error (line 117) | def test_initialize_falls_back_when_vllm_returns_triton_error( FILE: acestep/llm_inference.py function _warn_if_prerelease_python (line 36) | def _warn_if_prerelease_python(): class LLMHandler (line 48) | class LLMHandler: method __init__ (line 56) | def __init__(self, persistent_storage_path: Optional[str] = None): method _clear_accelerator_cache (line 83) | def _clear_accelerator_cache(self) -> None: method unload (line 117) | def unload(self) -> None: method _cleanup_torch_distributed_state (line 149) | def _cleanup_torch_distributed_state(self) -> None: method _get_checkpoint_dir (line 159) | def _get_checkpoint_dir(self) -> str: method get_available_5hz_lm_models (line 167) | def get_available_5hz_lm_models(self) -> List[str]: method get_gpu_memory_utilization (line 181) | def get_gpu_memory_utilization(self, model_path: str = None, minimal_g... method _compute_max_new_tokens (line 231) | def _compute_max_new_tokens( method _has_meaningful_negative_prompt (line 298) | def _has_meaningful_negative_prompt(self, negative_prompt: str) -> bool: method _build_logits_processor (line 302) | def _build_logits_processor(self, repetition_penalty: float) -> Logits... method _setup_constrained_processor (line 309) | def _setup_constrained_processor( method _build_unconditional_prompt (line 367) | def _build_unconditional_prompt( method _load_pytorch_model (line 389) | def _load_pytorch_model(self, model_path: str, device: str) -> Tuple[b... method _apply_top_k_filter (line 406) | def _apply_top_k_filter(self, logits: torch.Tensor, top_k: Optional[in... method _apply_top_p_filter (line 413) | def _apply_top_p_filter(self, logits: torch.Tensor, top_p: Optional[fl... method _sample_tokens (line 426) | def _sample_tokens(self, logits: torch.Tensor, temperature: float) -> ... method _check_eos_token (line 440) | def _check_eos_token(self, tokens: torch.Tensor, eos_token_id: int, pa... method _update_constrained_processor_state (line 449) | def _update_constrained_processor_state(self, constrained_processor: O... method _forward_pass (line 455) | def _forward_pass( method _normalize_batch_input (line 479) | def _normalize_batch_input(self, formatted_prompts: Union[str, List[st... method initialize (line 487) | def initialize( method _initialize_5hz_lm_vllm (line 758) | def _initialize_5hz_lm_vllm(self, model_path: str, enforce_eager: bool... method _run_vllm (line 853) | def _run_vllm( method _run_pt_single (line 964) | def _run_pt_single( method _run_pt (line 1124) | def _run_pt( method has_all_metas (line 1224) | def has_all_metas(self, user_metadata: Optional[Dict[str, Optional[str... method _format_metadata_as_cot (line 1232) | def _format_metadata_as_cot(self, metadata: Dict[str, Any]) -> str: method generate_with_stop_condition (line 1261) | def generate_with_stop_condition( method build_formatted_prompt (line 1647) | def build_formatted_prompt(self, caption: str, lyrics: str = "", is_ne... method build_formatted_prompt_with_cot (line 1695) | def build_formatted_prompt_with_cot(self, caption: str, lyrics: str, c... method build_formatted_prompt_for_understanding (line 1757) | def build_formatted_prompt_for_understanding( method understand_audio_from_codes (line 1805) | def understand_audio_from_codes( method _extract_lyrics_from_output (line 1905) | def _extract_lyrics_from_output(self, output_text: str) -> str: method build_formatted_prompt_for_inspiration (line 1943) | def build_formatted_prompt_for_inspiration( method create_sample_from_query (line 1997) | def create_sample_from_query( method build_formatted_prompt_for_format (line 2119) | def build_formatted_prompt_for_format( method format_sample_from_input (line 2171) | def format_sample_from_input( method generate_from_formatted_prompt (line 2317) | def generate_from_formatted_prompt( method _generate_with_constrained_decoding (line 2477) | def _generate_with_constrained_decoding( method _generate_with_cfg_custom (line 2573) | def _generate_with_cfg_custom( method parse_lm_output (line 2747) | def parse_lm_output(self, output_text: str) -> Tuple[Dict[str, Any], s... method _is_mlx_available (line 2872) | def _is_mlx_available() -> bool: method _load_mlx_model (line 2888) | def _load_mlx_model(self, model_path: str) -> Tuple[bool, str]: method _make_mlx_cache (line 2976) | def _make_mlx_cache(self): method _run_mlx_batch_native (line 2991) | def _run_mlx_batch_native( method _run_mlx_single_native (line 3352) | def _run_mlx_single_native( method _run_mlx_single (line 3675) | def _run_mlx_single( method _run_mlx (line 3915) | def _run_mlx( method _load_model_context (line 4054) | def _load_model_context(self): method get_hf_model_for_scoring (line 4112) | def get_hf_model_for_scoring(self): FILE: acestep/llm_inference_cache_cleanup_test.py class LlmAcceleratorCacheCleanupTests (line 18) | class LlmAcceleratorCacheCleanupTests(unittest.TestCase): method test_syncs_then_clears_cuda (line 21) | def test_syncs_then_clears_cuda(self): method test_syncs_then_clears_xpu (line 34) | def test_syncs_then_clears_xpu(self): method test_syncs_then_clears_mps (line 50) | def test_syncs_then_clears_mps(self): method test_falls_back_to_cuda_when_device_unset (line 69) | def test_falls_back_to_cuda_when_device_unset(self): method test_noop_when_device_is_cpu (line 82) | def test_noop_when_device_is_cpu(self): FILE: acestep/llm_inference_cfg_fixes_test.py function _make_handler (line 32) | def _make_handler() -> "LLMHandler": function _make_constrained_processor (line 44) | def _make_constrained_processor(state: "FSMState", vocab_size: int = 10)... function _make_fake_model (line 59) | def _make_fake_model(batch_size: int, vocab_size: int = 10, logit_val: f... class TestCotCfgScaleFixed (line 75) | class TestCotCfgScaleFixed(unittest.TestCase): method test_cot_phase_uses_cfg_scale_1 (line 78) | def test_cot_phase_uses_cfg_scale_1(self): method test_generate_with_stop_condition_forces_cot_cfg_1 (line 122) | def test_generate_with_stop_condition_forces_cot_cfg_1(self): class TestCfgMaskBeforeCFG (line 175) | class TestCfgMaskBeforeCFG(unittest.TestCase): method _run_single_step (line 181) | def _run_single_step( method test_codes_generation_only_samples_valid_tokens (line 228) | def test_codes_generation_only_samples_valid_tokens(self): method test_non_codes_state_samples_from_full_vocab (line 238) | def test_non_codes_state_samples_from_full_vocab(self): method test_codes_generation_cfg_applied_to_valid_indices_only (line 248) | def test_codes_generation_cfg_applied_to_valid_indices_only(self): class TestCfgNanGuard (line 313) | class TestCfgNanGuard(unittest.TestCase): method test_cfg_nan_replaced_with_neg_inf (line 324) | def test_cfg_nan_replaced_with_neg_inf(self): class TestPerSequenceEosTracking (line 391) | class TestPerSequenceEosTracking(unittest.TestCase): method test_generation_stops_when_all_sequences_finish (line 396) | def test_generation_stops_when_all_sequences_finish(self): method test_finished_sequences_are_forced_to_eos (line 431) | def test_finished_sequences_are_forced_to_eos(self): FILE: acestep/llm_inference_dist_cleanup_test.py class LlmDistributedCleanupTests (line 15) | class LlmDistributedCleanupTests(unittest.TestCase): method test_cleanup_destroys_initialized_process_group (line 18) | def test_cleanup_destroys_initialized_process_group(self): method test_cleanup_is_noop_when_not_initialized (line 27) | def test_cleanup_is_noop_when_not_initialized(self): FILE: acestep/llm_inference_enforce_eager_test.py function _make_handler (line 22) | def _make_handler() -> "LLMHandler": function _mock_gpu_config (line 27) | def _mock_gpu_config(): class TestEnforceEagerWhenFlashAttnMissing (line 36) | class TestEnforceEagerWhenFlashAttnMissing(unittest.TestCase): method _run_initialize_with_mocks (line 39) | def _run_initialize_with_mocks(self, flash_attn_available: bool, devic... method test_enforce_eager_true_when_flash_attn_missing (line 82) | def test_enforce_eager_true_when_flash_attn_missing(self): method test_enforce_eager_false_when_flash_attn_present (line 91) | def test_enforce_eager_false_when_flash_attn_present(self): method test_enforce_eager_still_true_for_jetson_even_with_flash_attn (line 99) | def test_enforce_eager_still_true_for_jetson_even_with_flash_attn(self): FILE: acestep/local_cache.py class LocalCache (line 19) | class LocalCache: method __new__ (line 28) | def __new__(cls, cache_dir: Optional[str] = None): method __init__ (line 37) | def __init__(self, cache_dir: Optional[str] = None): method set (line 57) | def set(self, name: str, value: Any, ex: Optional[int] = None) -> bool: method get (line 74) | def get(self, name: str) -> Optional[str]: method delete (line 78) | def delete(self, name: str) -> int: method exists (line 82) | def exists(self, name: str) -> bool: method keys (line 86) | def keys(self, pattern: str = "*") -> list: method expire (line 97) | def expire(self, name: str, seconds: int) -> bool: method ttl (line 105) | def ttl(self, name: str) -> int: method close (line 114) | def close(self): function get_local_cache (line 120) | def get_local_cache(cache_dir: Optional[str] = None) -> LocalCache: FILE: acestep/local_cache_thread_safety_test.py class LocalCacheLockTests (line 9) | class LocalCacheLockTests(unittest.TestCase): method test_class_level_lock_exists (line 12) | def test_class_level_lock_exists(self): FILE: acestep/model_downloader.py function _get_models_source_dir (line 42) | def _get_models_source_dir() -> Path: function _file_hash (line 47) | def _file_hash(filepath: Path) -> str: function _check_code_mismatch (line 56) | def _check_code_mismatch(model_name: str, checkpoints_dir) -> List[str]: function _sync_model_code_files (line 92) | def _sync_model_code_files(model_name: str, checkpoints_dir) -> List[str]: function _can_access_google (line 136) | def _can_access_google(timeout: float = 3.0) -> bool: function _download_from_huggingface_internal (line 158) | def _download_from_huggingface_internal( function _download_from_modelscope_internal (line 186) | def _download_from_modelscope_internal( function _smart_download (line 210) | def _smart_download( function get_project_root (line 310) | def get_project_root() -> Path: function get_checkpoints_dir (line 325) | def get_checkpoints_dir(custom_dir: Optional[str] = None) -> Path: function _contains_model_weights (line 332) | def _contains_model_weights(model_path: Path) -> bool: function check_main_model_exists (line 356) | def check_main_model_exists(checkpoints_dir: Optional[Path] = None) -> b... function check_model_exists (line 375) | def check_model_exists(model_name: str, checkpoints_dir: Optional[Path] ... function list_available_models (line 398) | def list_available_models() -> Dict[str, str]: function download_main_model (line 412) | def download_main_model( function download_submodel (line 463) | def download_submodel( function download_all_models (line 515) | def download_all_models( function ensure_main_model (line 555) | def ensure_main_model( function ensure_lm_model (line 587) | def ensure_lm_model( function ensure_dit_model (line 633) | def ensure_dit_model( function print_model_list (line 675) | def print_model_list(): function main (line 698) | def main(): FILE: acestep/model_downloader_test.py function _load_module (line 12) | def _load_module(): class TestGetProjectRoot (line 23) | class TestGetProjectRoot(unittest.TestCase): method setUpClass (line 27) | def setUpClass(cls): method test_returns_cwd_by_default (line 30) | def test_returns_cwd_by_default(self): method test_returns_env_var_when_set (line 37) | def test_returns_env_var_when_set(self): method test_env_var_takes_precedence_over_cwd (line 44) | def test_env_var_takes_precedence_over_cwd(self): method test_does_not_derive_path_from_package_file (line 52) | def test_does_not_derive_path_from_package_file(self): class TestGetCheckpointsDir (line 64) | class TestGetCheckpointsDir(unittest.TestCase): method setUpClass (line 68) | def setUpClass(cls): method test_default_is_checkpoints_under_cwd (line 71) | def test_default_is_checkpoints_under_cwd(self): method test_custom_dir_overrides_default (line 78) | def test_custom_dir_overrides_default(self): method test_env_var_is_honoured_as_root (line 84) | def test_env_var_is_honoured_as_root(self): class TestCheckMainModelExists (line 91) | class TestCheckMainModelExists(unittest.TestCase): method setUpClass (line 95) | def setUpClass(cls): method test_returns_false_when_any_component_lacks_weights (line 98) | def test_returns_false_when_any_component_lacks_weights(self): method test_returns_true_when_all_components_have_weights (line 111) | def test_returns_true_when_all_components_have_weights(self): method test_returns_true_when_vae_uses_diffusers_weight_filename (line 124) | def test_returns_true_when_vae_uses_diffusers_weight_filename(self): class TestCheckModelExists (line 141) | class TestCheckModelExists(unittest.TestCase): method setUpClass (line 145) | def setUpClass(cls): method test_returns_false_for_partial_model_directory_without_weights (line 148) | def test_returns_false_for_partial_model_directory_without_weights(self): method test_returns_true_when_model_weights_are_present (line 162) | def test_returns_true_when_model_weights_are_present(self): FILE: acestep/models/base/apg_guidance.py class MomentumBuffer (line 5) | class MomentumBuffer: method __init__ (line 7) | def __init__(self, momentum: float = -0.75): method update (line 11) | def update(self, update_value: torch.Tensor): function project (line 16) | def project( function apg_forward (line 33) | def apg_forward( function cfg_forward (line 59) | def cfg_forward(cond_output, uncond_output, cfg_strength): function call_cos_tensor (line 63) | def call_cos_tensor(tensor1, tensor2): function compute_perpendicular_component (line 80) | def compute_perpendicular_component(latent_diff, latent_hat_uncond): function adg_forward (line 107) | def adg_forward( function adg_w_norm_forward (line 191) | def adg_w_norm_forward( function adg_wo_clip_forward (line 215) | def adg_wo_clip_forward( FILE: acestep/models/base/configuration_acestep_v15.py class AceStepConfig (line 25) | class AceStepConfig(PretrainedConfig): method __init__ (line 148) | def __init__( FILE: acestep/models/base/modeling_acestep_v15_base.py function create_4d_mask (line 56) | def create_4d_mask( function pack_sequences (line 138) | def pack_sequences(hidden1: torch.Tensor, hidden2: torch.Tensor, mask1: ... function sample_t_r (line 172) | def sample_t_r(batch_size, device, dtype, data_proportion=0.0, timestep_... class TimestepEmbedding (line 200) | class TimestepEmbedding(nn.Module): method __init__ (line 208) | def __init__( method timestep_embedding (line 225) | def timestep_embedding(self, t, dim, max_period=10000): method forward (line 248) | def forward(self, t): class AceStepAttention (line 256) | class AceStepAttention(nn.Module): method __init__ (line 266) | def __init__(self, config: AceStepConfig, layer_idx: int, is_cross_att... method forward (line 289) | def forward( class AceStepEncoderLayer (line 374) | class AceStepEncoderLayer(GradientCheckpointingLayer): method __init__ (line 381) | def __init__(self, config, layer_idx: int): method forward (line 401) | def forward( class AceStepDiTLayer (line 443) | class AceStepDiTLayer(GradientCheckpointingLayer): method __init__ (line 454) | def __init__(self, config: AceStepConfig, layer_idx: int, use_cross_at... method forward (line 475) | def forward( class AceStepPreTrainedModel (line 543) | class AceStepPreTrainedModel(PreTrainedModel): method _init_weights (line 558) | def _init_weights(self, module): class AceStepLyricEncoder (line 577) | class AceStepLyricEncoder(AceStepPreTrainedModel): method __init__ (line 585) | def __init__(self, config): method forward (line 603) | def forward( class AttentionPooler (line 734) | class AttentionPooler(AceStepPreTrainedModel): method __init__ (line 743) | def __init__(self, config): method forward (line 760) | def forward(self, class AudioTokenDetokenizer (line 862) | class AudioTokenDetokenizer(AceStepPreTrainedModel): method __init__ (line 870) | def __init__(self, config): method forward (line 889) | def forward(self, class AceStepTimbreEncoder (line 997) | class AceStepTimbreEncoder(AceStepPreTrainedModel): method __init__ (line 1006) | def __init__(self, config): method unpack_timbre_embeddings (line 1023) | def unpack_timbre_embeddings(self, timbre_embs_packed, refer_audio_ord... method forward (line 1076) | def forward( class AceStepAudioTokenizer (line 1181) | class AceStepAudioTokenizer(AceStepPreTrainedModel): method __init__ (line 1189) | def __init__(self, config): method forward (line 1206) | def forward( method tokenize (line 1220) | def tokenize(self, x): class Lambda (line 1225) | class Lambda(nn.Module): method __init__ (line 1232) | def __init__(self, func): method forward (line 1236) | def forward(self, x): class AceStepDiTModel (line 1240) | class AceStepDiTModel(AceStepPreTrainedModel): method __init__ (line 1248) | def __init__(self, config: AceStepConfig): method forward (line 1303) | def forward( class AceStepConditionEncoder (line 1509) | class AceStepConditionEncoder(AceStepPreTrainedModel): method __init__ (line 1517) | def __init__(self, config: AceStepConfig): method forward (line 1527) | def forward( function _repaint_step_injection (line 1557) | def _repaint_step_injection(xt, clean_src, mask, t_next, noise): function _repaint_boundary_blend (line 1564) | def _repaint_boundary_blend(x_gen, clean_src, mask, cf_frames): class AceStepConditionGenerationModel (line 1589) | class AceStepConditionGenerationModel(AceStepPreTrainedModel): method __init__ (line 1598) | def __init__(self, config: AceStepConfig): method tokenize (line 1612) | def tokenize(self, x, silence_latent, attention_mask): method detokenize (line 1625) | def detokenize(self, quantized): method prepare_condition (line 1639) | def prepare_condition( method forward (line 1686) | def forward( method training_losses (line 1762) | def training_losses(self, **kwargs): method prepare_noise (line 1765) | def prepare_noise(self, context_latents: torch.FloatTensor, seed: Unio... method get_x0_from_noise (line 1804) | def get_x0_from_noise(self, zt, vt, t): method renoise (line 1810) | def renoise(self, x, t, noise=None): method generate_audio (line 1818) | def generate_audio( function test_forward (line 2044) | def test_forward(model, seed=42): FILE: acestep/models/mlx/__init__.py function is_mlx_available (line 10) | def is_mlx_available() -> bool: function mlx_available (line 28) | def mlx_available() -> bool: FILE: acestep/models/mlx/dit_convert.py function convert_decoder_weights (line 11) | def convert_decoder_weights( function convert_and_load (line 69) | def convert_and_load( FILE: acestep/models/mlx/dit_generate.py function get_timestep_schedule (line 34) | def get_timestep_schedule( function _mlx_apg_forward (line 86) | def _mlx_apg_forward( function mlx_generate_diffusion (line 119) | def mlx_generate_diffusion( FILE: acestep/models/mlx/dit_model.py function _rotate_half (line 16) | def _rotate_half(x: mx.array) -> mx.array: function _apply_rotary_pos_emb (line 24) | def _apply_rotary_pos_emb( function _create_sliding_window_mask (line 38) | def _create_sliding_window_mask( class MLXRotaryEmbedding (line 62) | class MLXRotaryEmbedding(nn.Module): method __init__ (line 65) | def __init__(self, head_dim: int, max_len: int = 32768, base: float = ... method __call__ (line 80) | def __call__(self, seq_len: int) -> Tuple[mx.array, mx.array]: class MLXCrossAttentionCache (line 91) | class MLXCrossAttentionCache: method __init__ (line 98) | def __init__(self): method update (line 103) | def update(self, key: mx.array, value: mx.array, layer_idx: int): method is_updated (line 108) | def is_updated(self, layer_idx: int) -> bool: method get (line 111) | def get(self, layer_idx: int) -> Tuple[mx.array, mx.array]: class MLXSwiGLUMLP (line 119) | class MLXSwiGLUMLP(nn.Module): method __init__ (line 122) | def __init__(self, hidden_size: int, intermediate_size: int): method __call__ (line 128) | def __call__(self, x: mx.array) -> mx.array: class MLXAttention (line 132) | class MLXAttention(nn.Module): method __init__ (line 139) | def __init__( method _repeat_kv (line 171) | def _repeat_kv(x: mx.array, n_rep: int) -> mx.array: method __call__ (line 180) | def __call__( class MLXDiTLayer (line 242) | class MLXDiTLayer(nn.Module): method __init__ (line 251) | def __init__( method __call__ (line 302) | def __call__( class MLXTimestepEmbedding (line 355) | class MLXTimestepEmbedding(nn.Module): method __init__ (line 358) | def __init__(self, in_channels: int = 256, time_embed_dim: int = 2048,... method _sinusoidal_embedding (line 369) | def _sinusoidal_embedding(self, t: mx.array, dim: int, max_period: int... method __call__ (line 392) | def __call__(self, t: mx.array) -> Tuple[mx.array, mx.array]: class MLXDiTDecoder (line 413) | class MLXDiTDecoder(nn.Module): method __init__ (line 424) | def __init__( method _get_sliding_mask (line 510) | def _get_sliding_mask(self, seq_len: int, dtype: mx.Dtype) -> mx.array: method __call__ (line 517) | def __call__( method from_config (line 611) | def from_config(cls, config) -> "MLXDiTDecoder": FILE: acestep/models/mlx/vae_convert.py function _fuse_weight_norm (line 18) | def _fuse_weight_norm( function convert_vae_weights (line 37) | def convert_vae_weights( function convert_and_load (line 135) | def convert_and_load( FILE: acestep/models/mlx/vae_model.py class MLXSnake1d (line 24) | class MLXSnake1d(nn.Module): method __init__ (line 32) | def __init__(self, hidden_dim: int, logscale: bool = True): method __call__ (line 38) | def __call__(self, x: mx.array) -> mx.array: class MLXOobleckResidualUnit (line 62) | class MLXOobleckResidualUnit(nn.Module): method __init__ (line 66) | def __init__(self, dimension: int = 16, dilation: int = 1): method __call__ (line 77) | def __call__(self, hidden_state: mx.array) -> mx.array: class MLXOobleckEncoderBlock (line 94) | class MLXOobleckEncoderBlock(nn.Module): method __init__ (line 97) | def __init__(self, input_dim: int, output_dim: int, stride: int = 1): method __call__ (line 111) | def __call__(self, hidden_state: mx.array) -> mx.array: class MLXOobleckDecoderBlock (line 119) | class MLXOobleckDecoderBlock(nn.Module): method __init__ (line 122) | def __init__(self, input_dim: int, output_dim: int, stride: int = 1): method __call__ (line 136) | def __call__(self, hidden_state: mx.array) -> mx.array: class MLXOobleckEncoder (line 149) | class MLXOobleckEncoder(nn.Module): method __init__ (line 152) | def __init__( method __call__ (line 181) | def __call__(self, hidden_state: mx.array) -> mx.array: class MLXOobleckDecoder (line 190) | class MLXOobleckDecoder(nn.Module): method __init__ (line 193) | def __init__( method __call__ (line 224) | def __call__(self, hidden_state: mx.array) -> mx.array: class MLXAutoEncoderOobleck (line 237) | class MLXAutoEncoderOobleck(nn.Module): method __init__ (line 251) | def __init__( method encode_and_sample (line 285) | def encode_and_sample(self, audio_nlc: mx.array) -> mx.array: method encode_mean (line 306) | def encode_mean(self, audio_nlc: mx.array) -> mx.array: method decode (line 312) | def decode(self, latents_nlc: mx.array) -> mx.array: method from_pytorch_config (line 326) | def from_pytorch_config(cls, pt_vae) -> "MLXAutoEncoderOobleck": FILE: acestep/models/sft/apg_guidance.py class MomentumBuffer (line 5) | class MomentumBuffer: method __init__ (line 7) | def __init__(self, momentum: float = -0.75): method update (line 11) | def update(self, update_value: torch.Tensor): function project (line 16) | def project( function apg_forward (line 33) | def apg_forward( function cfg_forward (line 59) | def cfg_forward(cond_output, uncond_output, cfg_strength): function call_cos_tensor (line 63) | def call_cos_tensor(tensor1, tensor2): function compute_perpendicular_component (line 80) | def compute_perpendicular_component(latent_diff, latent_hat_uncond): function adg_forward (line 107) | def adg_forward( function adg_w_norm_forward (line 191) | def adg_w_norm_forward( function adg_wo_clip_forward (line 215) | def adg_wo_clip_forward( FILE: acestep/models/sft/configuration_acestep_v15.py class AceStepConfig (line 25) | class AceStepConfig(PretrainedConfig): method __init__ (line 148) | def __init__( FILE: acestep/models/sft/modeling_acestep_v15_base.py function create_4d_mask (line 56) | def create_4d_mask( function pack_sequences (line 138) | def pack_sequences(hidden1: torch.Tensor, hidden2: torch.Tensor, mask1: ... function sample_t_r (line 172) | def sample_t_r(batch_size, device, dtype, data_proportion=0.0, timestep_... class TimestepEmbedding (line 200) | class TimestepEmbedding(nn.Module): method __init__ (line 208) | def __init__( method timestep_embedding (line 225) | def timestep_embedding(self, t, dim, max_period=10000): method forward (line 248) | def forward(self, t): class AceStepAttention (line 256) | class AceStepAttention(nn.Module): method __init__ (line 266) | def __init__(self, config: AceStepConfig, layer_idx: int, is_cross_att... method forward (line 289) | def forward( class AceStepEncoderLayer (line 374) | class AceStepEncoderLayer(GradientCheckpointingLayer): method __init__ (line 381) | def __init__(self, config, layer_idx: int): method forward (line 401) | def forward( class AceStepDiTLayer (line 443) | class AceStepDiTLayer(GradientCheckpointingLayer): method __init__ (line 454) | def __init__(self, config: AceStepConfig, layer_idx: int, use_cross_at... method forward (line 475) | def forward( class AceStepPreTrainedModel (line 543) | class AceStepPreTrainedModel(PreTrainedModel): method _init_weights (line 558) | def _init_weights(self, module): class AceStepLyricEncoder (line 577) | class AceStepLyricEncoder(AceStepPreTrainedModel): method __init__ (line 585) | def __init__(self, config): method forward (line 603) | def forward( class AttentionPooler (line 734) | class AttentionPooler(AceStepPreTrainedModel): method __init__ (line 743) | def __init__(self, config): method forward (line 760) | def forward(self, class AudioTokenDetokenizer (line 862) | class AudioTokenDetokenizer(AceStepPreTrainedModel): method __init__ (line 870) | def __init__(self, config): method forward (line 889) | def forward(self, class AceStepTimbreEncoder (line 997) | class AceStepTimbreEncoder(AceStepPreTrainedModel): method __init__ (line 1006) | def __init__(self, config): method unpack_timbre_embeddings (line 1023) | def unpack_timbre_embeddings(self, timbre_embs_packed, refer_audio_ord... method forward (line 1076) | def forward( class AceStepAudioTokenizer (line 1181) | class AceStepAudioTokenizer(AceStepPreTrainedModel): method __init__ (line 1189) | def __init__(self, config): method forward (line 1206) | def forward( method tokenize (line 1220) | def tokenize(self, x): class Lambda (line 1225) | class Lambda(nn.Module): method __init__ (line 1232) | def __init__(self, func): method forward (line 1236) | def forward(self, x): class AceStepDiTModel (line 1240) | class AceStepDiTModel(AceStepPreTrainedModel): method __init__ (line 1248) | def __init__(self, config: AceStepConfig): method forward (line 1303) | def forward( class AceStepConditionEncoder (line 1509) | class AceStepConditionEncoder(AceStepPreTrainedModel): method __init__ (line 1517) | def __init__(self, config: AceStepConfig): method forward (line 1527) | def forward( function _repaint_step_injection (line 1557) | def _repaint_step_injection(xt, clean_src, mask, t_next, noise): function _repaint_boundary_blend (line 1564) | def _repaint_boundary_blend(x_gen, clean_src, mask, cf_frames): class AceStepConditionGenerationModel (line 1589) | class AceStepConditionGenerationModel(AceStepPreTrainedModel): method __init__ (line 1598) | def __init__(self, config: AceStepConfig): method tokenize (line 1612) | def tokenize(self, x, silence_latent, attention_mask): method detokenize (line 1625) | def detokenize(self, quantized): method prepare_condition (line 1639) | def prepare_condition( method forward (line 1686) | def forward( method training_losses (line 1762) | def training_losses(self, **kwargs): method prepare_noise (line 1765) | def prepare_noise(self, context_latents: torch.FloatTensor, seed: Unio... method get_x0_from_noise (line 1804) | def get_x0_from_noise(self, zt, vt, t): method renoise (line 1810) | def renoise(self, x, t, noise=None): method generate_audio (line 1818) | def generate_audio( function test_forward (line 2051) | def test_forward(model, seed=42): FILE: acestep/models/turbo/configuration_acestep_v15.py class AceStepConfig (line 25) | class AceStepConfig(PretrainedConfig): method __init__ (line 148) | def __init__( FILE: acestep/models/turbo/modeling_acestep_v15_turbo.py function create_4d_mask (line 53) | def create_4d_mask( function pack_sequences (line 135) | def pack_sequences(hidden1: torch.Tensor, hidden2: torch.Tensor, mask1: ... function sample_t_r (line 169) | def sample_t_r(batch_size, device, dtype, data_proportion=0.0, timestep_... class TimestepEmbedding (line 197) | class TimestepEmbedding(nn.Module): method __init__ (line 205) | def __init__( method timestep_embedding (line 222) | def timestep_embedding(self, t, dim, max_period=10000): method forward (line 245) | def forward(self, t): class AceStepAttention (line 253) | class AceStepAttention(nn.Module): method __init__ (line 263) | def __init__(self, config: AceStepConfig, layer_idx: int, is_cross_att... method forward (line 286) | def forward( class AceStepEncoderLayer (line 371) | class AceStepEncoderLayer(GradientCheckpointingLayer): method __init__ (line 378) | def __init__(self, config, layer_idx: int): method forward (line 398) | def forward( class AceStepDiTLayer (line 440) | class AceStepDiTLayer(GradientCheckpointingLayer): method __init__ (line 451) | def __init__(self, config: AceStepConfig, layer_idx: int, use_cross_at... method forward (line 472) | def forward( class AceStepPreTrainedModel (line 540) | class AceStepPreTrainedModel(PreTrainedModel): method _init_weights (line 555) | def _init_weights(self, module): class AceStepLyricEncoder (line 574) | class AceStepLyricEncoder(AceStepPreTrainedModel): method __init__ (line 582) | def __init__(self, config): method forward (line 600) | def forward( class AttentionPooler (line 731) | class AttentionPooler(AceStepPreTrainedModel): method __init__ (line 740) | def __init__(self, config): method forward (line 757) | def forward(self, class AudioTokenDetokenizer (line 859) | class AudioTokenDetokenizer(AceStepPreTrainedModel): method __init__ (line 867) | def __init__(self, config): method forward (line 886) | def forward(self, class AceStepTimbreEncoder (line 994) | class AceStepTimbreEncoder(AceStepPreTrainedModel): method __init__ (line 1003) | def __init__(self, config): method unpack_timbre_embeddings (line 1020) | def unpack_timbre_embeddings(self, timbre_embs_packed, refer_audio_ord... method forward (line 1073) | def forward( class AceStepAudioTokenizer (line 1178) | class AceStepAudioTokenizer(AceStepPreTrainedModel): method __init__ (line 1186) | def __init__(self, config): method forward (line 1203) | def forward( method tokenize (line 1217) | def tokenize(self, x): class Lambda (line 1222) | class Lambda(nn.Module): method __init__ (line 1229) | def __init__(self, func): method forward (line 1233) | def forward(self, x): class AceStepDiTModel (line 1237) | class AceStepDiTModel(AceStepPreTrainedModel): method __init__ (line 1245) | def __init__(self, config: AceStepConfig): method forward (line 1300) | def forward( class AceStepConditionEncoder (line 1506) | class AceStepConditionEncoder(AceStepPreTrainedModel): method __init__ (line 1514) | def __init__(self, config: AceStepConfig): method forward (line 1524) | def forward( function _repaint_step_injection (line 1554) | def _repaint_step_injection(xt, clean_src, mask, t_next, noise): function _repaint_boundary_blend (line 1561) | def _repaint_boundary_blend(x_gen, clean_src, mask, cf_frames): class AceStepConditionGenerationModel (line 1586) | class AceStepConditionGenerationModel(AceStepPreTrainedModel): method __init__ (line 1595) | def __init__(self, config: AceStepConfig): method tokenize (line 1609) | def tokenize(self, x, silence_latent, attention_mask): method detokenize (line 1622) | def detokenize(self, quantized): method prepare_condition (line 1636) | def prepare_condition( method forward (line 1683) | def forward( method training_losses (line 1759) | def training_losses(self, **kwargs): method prepare_noise (line 1762) | def prepare_noise(self, context_latents: torch.FloatTensor, seed: Unio... method get_x0_from_noise (line 1801) | def get_x0_from_noise(self, zt, vt, t): method renoise (line 1804) | def renoise(self, x, t, noise=None): method generate_audio (line 1812) | def generate_audio( function test_forward (line 2052) | def test_forward(model, seed=42): FILE: acestep/null_duration_fixes_test.py class ComputeMaxNewTokensCapTests (line 41) | class ComputeMaxNewTokensCapTests(unittest.TestCase): method _handler (line 44) | def _handler(self, max_model_len: int = 16384) -> "LLMHandler": method test_no_duration_caps_at_duration_max (line 49) | def test_no_duration_caps_at_duration_max(self): method test_no_duration_with_fallback_caps (line 56) | def test_no_duration_with_fallback_caps(self): method test_with_duration_ignores_cap (line 66) | def test_with_duration_ignores_cap(self): class SilenceLatentTilingTests (line 79) | class SilenceLatentTilingTests(unittest.TestCase): method _make_mixin (line 82) | def _make_mixin(self, latent_len: int = 64, channels: int = 6): method test_slice_within_bounds (line 92) | def test_slice_within_bounds(self): method test_slice_exact_bounds (line 97) | def test_slice_exact_bounds(self): method test_slice_exceeds_bounds_tiles (line 102) | def test_slice_exceeds_bounds_tiles(self): method test_tiled_values_are_correct (line 107) | def test_tiled_values_are_correct(self): class ApiDefaultDurationTests (line 124) | class ApiDefaultDurationTests(unittest.TestCase): method _base_req (line 127) | def _base_req(self): method test_null_duration_gets_default (line 160) | def test_null_duration_gets_default(self): method test_zero_duration_gets_default (line 184) | def test_zero_duration_gets_default(self): method test_explicit_duration_preserved (line 208) | def test_explicit_duration_preserved(self): FILE: acestep/openrouter_adapter.py function _generate_completion_id (line 53) | def _generate_completion_id() -> str: function _get_model_id (line 58) | def _get_model_id(model_name: str) -> str: function _parse_model_name (line 63) | def _parse_model_name(model_id: str) -> str: function _audio_to_base64_url (line 70) | def _audio_to_base64_url(audio_path: str, audio_format: str = "mp3") -> ... function _format_lm_content (line 92) | def _format_lm_content(result: Dict[str, Any]) -> str: function _base64_to_temp_file (line 126) | def _base64_to_temp_file(b64_data: str, audio_format: str = "mp3") -> str: class _AudioBlob (line 142) | class _AudioBlob(NamedTuple): function _materialize_audio_files (line 149) | def _materialize_audio_files( function _cleanup_temp_paths (line 170) | def _cleanup_temp_paths(paths: List[str]) -> None: function _extract_tagged_content (line 179) | def _extract_tagged_content(text: str) -> Tuple[Optional[str], Optional[... function _looks_like_lyrics (line 203) | def _looks_like_lyrics(text: str) -> bool: function _is_instrumental (line 226) | def _is_instrumental(lyrics: str) -> bool: function _parse_messages (line 236) | def _parse_messages( function _to_generate_music_request (line 321) | def _to_generate_music_request( function _build_openrouter_response (line 416) | def _build_openrouter_response( function _openrouter_stream_generator (line 473) | async def _openrouter_stream_generator( function create_openrouter_router (line 575) | def create_openrouter_router(app_state_getter) -> APIRouter: FILE: acestep/openrouter_models.py class AudioInputContent (line 17) | class AudioInputContent(BaseModel): class TextContent (line 23) | class TextContent(BaseModel): class AudioContent (line 29) | class AudioContent(BaseModel): class ChatMessage (line 39) | class ChatMessage(BaseModel): class AudioConfig (line 46) | class AudioConfig(BaseModel): class ChatCompletionRequest (line 58) | class ChatCompletionRequest(BaseModel): class Config (line 112) | class Config: class AudioOutputUrl (line 120) | class AudioOutputUrl(BaseModel): class AudioOutput (line 125) | class AudioOutput(BaseModel): class AssistantMessage (line 131) | class AssistantMessage(BaseModel): class Choice (line 139) | class Choice(BaseModel): class Usage (line 146) | class Usage(BaseModel): class ChatCompletionResponse (line 153) | class ChatCompletionResponse(BaseModel): class DeltaContent (line 170) | class DeltaContent(BaseModel): class StreamChoice (line 177) | class StreamChoice(BaseModel): class ChatCompletionChunk (line 184) | class ChatCompletionChunk(BaseModel): class ModelPricing (line 197) | class ModelPricing(BaseModel): class ModelInfo (line 205) | class ModelInfo(BaseModel): class ModelsResponse (line 233) | class ModelsResponse(BaseModel): class ErrorDetail (line 243) | class ErrorDetail(BaseModel): class ErrorResponse (line 251) | class ErrorResponse(BaseModel): FILE: acestep/text2music_src_audio_test.py class TestGenerationParamsTextToMusicSrcAudio (line 21) | class TestGenerationParamsTextToMusicSrcAudio(unittest.TestCase): method test_text2music_params_accept_src_audio_field (line 24) | def test_text2music_params_accept_src_audio_field(self): method test_cover_params_preserve_src_audio (line 33) | def test_cover_params_preserve_src_audio(self): class TestInferenceLayerSrcAudioGuard (line 42) | class TestInferenceLayerSrcAudioGuard(unittest.TestCase): method test_generate_music_passes_none_src_audio_for_text2music (line 46) | def test_generate_music_passes_none_src_audio_for_text2music(self, moc... method test_cover_task_preserves_src_audio (line 62) | def test_cover_task_preserves_src_audio(self): method test_repaint_task_preserves_src_audio (line 71) | def test_repaint_task_preserves_src_audio(self): class TestHandlerLayerSrcAudioGuard (line 81) | class TestHandlerLayerSrcAudioGuard(unittest.TestCase): method _simulate_handler_src_audio_logic (line 84) | def _simulate_handler_src_audio_logic(self, task_type, src_audio, audi... method test_text2music_ignores_src_audio (line 110) | def test_text2music_ignores_src_audio(self): method test_text2music_ignores_src_audio_even_with_no_codes (line 118) | def test_text2music_ignores_src_audio_even_with_no_codes(self): method test_cover_processes_src_audio (line 126) | def test_cover_processes_src_audio(self): method test_cover_ignores_src_audio_when_codes_provided (line 134) | def test_cover_ignores_src_audio_when_codes_provided(self): method test_repaint_processes_src_audio (line 142) | def test_repaint_processes_src_audio(self): method test_none_src_audio_is_noop_for_all_tasks (line 150) | def test_none_src_audio_is_noop_for_all_tasks(self): class TestGenerateWithProgressSrcAudioClear (line 158) | class TestGenerateWithProgressSrcAudioClear(unittest.TestCase): method test_text2music_clears_src_audio_before_params (line 161) | def test_text2music_clears_src_audio_before_params(self): method test_cover_preserves_src_audio (line 172) | def test_cover_preserves_src_audio(self): FILE: acestep/third_parts/nano-vllm/bench.py function main (line 8) | def main(): FILE: acestep/third_parts/nano-vllm/example.py function main (line 6) | def main(): FILE: acestep/third_parts/nano-vllm/nanovllm/config.py class Config (line 7) | class Config: method __post_init__ (line 20) | def __post_init__(self): FILE: acestep/third_parts/nano-vllm/nanovllm/distributed.py function initialize_distributed (line 15) | def initialize_distributed(backend: str, init_method: str, world_size: i... function is_initialized (line 41) | def is_initialized() -> bool: function get_rank (line 46) | def get_rank() -> int: function get_world_size (line 53) | def get_world_size() -> int: function barrier (line 60) | def barrier(): function all_reduce (line 66) | def all_reduce(tensor, op=None): function gather (line 80) | def gather(tensor, gather_list=None, dst=0): function destroy_process_group (line 93) | def destroy_process_group(): FILE: acestep/third_parts/nano-vllm/nanovllm/engine/block_manager.py function _debug_log (line 11) | def _debug_log(msg: str): class Block (line 17) | class Block: method __init__ (line 19) | def __init__(self, block_id): method update (line 25) | def update(self, hash: int, token_ids: list[int]): method reset (line 29) | def reset(self): class BlockManager (line 35) | class BlockManager: method __init__ (line 37) | def __init__(self, num_blocks: int, block_size: int): method compute_hash (line 45) | def compute_hash(cls, token_ids: list[int], prefix: int = -1): method reset (line 52) | def reset(self): method _allocate_block (line 62) | def _allocate_block(self, block_id: int) -> Block: method _deallocate_block (line 70) | def _deallocate_block(self, block_id: int) -> Block: method can_allocate (line 75) | def can_allocate(self, seq: Sequence) -> bool: method allocate (line 78) | def allocate(self, seq: Sequence): method deallocate (line 108) | def deallocate(self, seq: Sequence): method can_append (line 127) | def can_append(self, seq: Sequence) -> bool: method may_append (line 130) | def may_append(self, seq: Sequence): FILE: acestep/third_parts/nano-vllm/nanovllm/engine/llm_engine.py class LLMEngine (line 16) | class LLMEngine: method __init__ (line 18) | def __init__(self, model, **kwargs): method exit (line 50) | def exit(self): method add_request (line 56) | def add_request(self, prompt: str | list[int], sampling_params: Sampli... method step (line 84) | def step(self): method is_finished (line 94) | def is_finished(self): method reset (line 97) | def reset(self): method generate (line 118) | def generate( method _generate_impl (line 132) | def _generate_impl( FILE: acestep/third_parts/nano-vllm/nanovllm/engine/model_runner.py function _debug_log (line 16) | def _debug_log(msg: str): function find_available_port (line 29) | def find_available_port(start_port: int = 2333, max_attempts: int = 100)... class ModelRunner (line 55) | class ModelRunner: method __init__ (line 57) | def __init__(self, config: Config, rank: int, event: Event | list[Even... method _allocate_sample_buffers (line 146) | def _allocate_sample_buffers(self): method exit (line 181) | def exit(self): method loop (line 192) | def loop(self): method read_shm (line 199) | def read_shm(self): method write_shm (line 207) | def write_shm(self, method_name, *args): method call (line 216) | def call(self, method_name, *args): method warmup_model (line 222) | def warmup_model(self): method allocate_kv_cache (line 233) | def allocate_kv_cache(self): method prepare_block_tables (line 311) | def prepare_block_tables(self, seqs: list[Sequence]): method prepare_prefill (line 319) | def prepare_prefill(self, seqs: list[Sequence]): method prepare_decode (line 359) | def prepare_decode(self, seqs: list[Sequence]): method prepare_sample (line 381) | def prepare_sample(self, seqs: list[Sequence], is_cfg_batch: bool = Fa... method run_model (line 419) | def run_model(self, input_ids: torch.Tensor, positions: torch.Tensor, ... method run (line 492) | def run(self, seqs: list[Sequence], is_prefill: bool) -> list[int]: method capture_cudagraph (line 655) | def capture_cudagraph(self): FILE: acestep/third_parts/nano-vllm/nanovllm/engine/scheduler.py function _debug_log (line 11) | def _debug_log(msg: str): class Scheduler (line 17) | class Scheduler: method __init__ (line 19) | def __init__(self, config: Config): method is_finished (line 27) | def is_finished(self): method add (line 30) | def add(self, seq: Sequence): method schedule (line 33) | def schedule(self) -> tuple[list[Sequence], bool]: method preempt (line 218) | def preempt(self, seq: Sequence): method postprocess (line 223) | def postprocess(self, seqs: list[Sequence], token_ids: list[int]) -> l... FILE: acestep/third_parts/nano-vllm/nanovllm/engine/sequence.py class SequenceStatus (line 9) | class SequenceStatus(Enum): class Sequence (line 15) | class Sequence: method __init__ (line 19) | def __init__(self, token_ids: list[int], sampling_params = SamplingPar... method __len__ (line 44) | def __len__(self): method __getitem__ (line 47) | def __getitem__(self, key): method is_finished (line 51) | def is_finished(self): method num_completion_tokens (line 55) | def num_completion_tokens(self): method prompt_token_ids (line 59) | def prompt_token_ids(self): method completion_token_ids (line 63) | def completion_token_ids(self): method num_cached_blocks (line 67) | def num_cached_blocks(self): method num_blocks (line 71) | def num_blocks(self): method last_block_num_tokens (line 75) | def last_block_num_tokens(self): method block (line 78) | def block(self, i): method append_token (line 82) | def append_token(self, token_id: int): method __getstate__ (line 87) | def __getstate__(self): method __setstate__ (line 91) | def __setstate__(self, state): FILE: acestep/third_parts/nano-vllm/nanovllm/layers/activation.py class SiluAndMul (line 8) | class SiluAndMul(nn.Module): method __init__ (line 10) | def __init__(self): method forward (line 14) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: acestep/third_parts/nano-vllm/nanovllm/layers/attention.py function _debug_log (line 11) | def _debug_log(msg: str): function store_kvcache_kernel (line 40) | def store_kvcache_kernel( function _store_kvcache_pytorch (line 66) | def _store_kvcache_pytorch( function store_kvcache (line 100) | def store_kvcache( function _sdpa_varlen_prefill (line 124) | def _sdpa_varlen_prefill( function _sdpa_prefill_with_paged_cache (line 177) | def _sdpa_prefill_with_paged_cache( function _sdpa_decode_with_paged_cache (line 233) | def _sdpa_decode_with_paged_cache( class Attention (line 292) | class Attention(nn.Module): method __init__ (line 294) | def __init__( method forward (line 308) | def forward(self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor): method _forward_flash_attn (line 332) | def _forward_flash_attn(self, q, k, v, k_cache, v_cache, context): method _forward_sdpa (line 359) | def _forward_sdpa(self, q, k, v, k_cache, v_cache, context): FILE: acestep/third_parts/nano-vllm/nanovllm/layers/embed_head.py class VocabParallelEmbedding (line 10) | class VocabParallelEmbedding(nn.Module): method __init__ (line 12) | def __init__( method weight_loader (line 28) | def weight_loader(self, param: nn.Parameter, loaded_weight: torch.Tens... method forward (line 35) | def forward(self, x: torch.Tensor): class ParallelLMHead (line 46) | class ParallelLMHead(VocabParallelEmbedding): method __init__ (line 48) | def __init__( method forward (line 57) | def forward(self, x: torch.Tensor): FILE: acestep/third_parts/nano-vllm/nanovllm/layers/layernorm.py class RMSNorm (line 7) | class RMSNorm(nn.Module): method __init__ (line 9) | def __init__( method rms_forward (line 19) | def rms_forward( method add_rms_forward (line 31) | def add_rms_forward( method forward (line 44) | def forward( FILE: acestep/third_parts/nano-vllm/nanovllm/layers/linear.py function divide (line 9) | def divide(numerator, denominator): class LinearBase (line 14) | class LinearBase(nn.Module): method __init__ (line 16) | def __init__( method forward (line 35) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ReplicatedLinear (line 39) | class ReplicatedLinear(LinearBase): method __init__ (line 41) | def __init__( method weight_loader (line 49) | def weight_loader(self, param: nn.Parameter, loaded_weight: torch.Tens... method forward (line 52) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ColumnParallelLinear (line 56) | class ColumnParallelLinear(LinearBase): method __init__ (line 58) | def __init__( method weight_loader (line 67) | def weight_loader(self, param: nn.Parameter, loaded_weight: torch.Tens... method forward (line 74) | def forward(self, x: torch.Tensor) -> torch.Tensor: class MergedColumnParallelLinear (line 78) | class MergedColumnParallelLinear(ColumnParallelLinear): method __init__ (line 80) | def __init__( method weight_loader (line 89) | def weight_loader(self, param: nn.Parameter, loaded_weight: torch.Tens... class QKVParallelLinear (line 98) | class QKVParallelLinear(ColumnParallelLinear): method __init__ (line 100) | def __init__( method weight_loader (line 116) | def weight_loader(self, param: nn.Parameter, loaded_weight: torch.Tens... class RowParallelLinear (line 133) | class RowParallelLinear(LinearBase): method __init__ (line 135) | def __init__( method weight_loader (line 144) | def weight_loader(self, param: nn.Parameter, loaded_weight: torch.Tens... method forward (line 151) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: acestep/third_parts/nano-vllm/nanovllm/layers/rotary_embedding.py function apply_rotary_emb (line 8) | def apply_rotary_emb( class RotaryEmbedding (line 19) | class RotaryEmbedding(nn.Module): method __init__ (line 21) | def __init__( method forward (line 40) | def forward( function get_rope (line 54) | def get_rope( FILE: acestep/third_parts/nano-vllm/nanovllm/layers/sampler.py function apply_top_k_top_p (line 8) | def apply_top_k_top_p( function apply_top_k_only (line 50) | def apply_top_k_only( class Sampler (line 85) | class Sampler(nn.Module): method __init__ (line 87) | def __init__(self): method forward (line 91) | def forward( FILE: acestep/third_parts/nano-vllm/nanovllm/llm.py class LLM (line 4) | class LLM(LLMEngine): FILE: acestep/third_parts/nano-vllm/nanovllm/models/qwen3.py class Qwen3Attention (line 15) | class Qwen3Attention(nn.Module): method __init__ (line 17) | def __init__( method forward (line 72) | def forward( class Qwen3MLP (line 91) | class Qwen3MLP(nn.Module): method __init__ (line 93) | def __init__( method forward (line 113) | def forward(self, x): class Qwen3DecoderLayer (line 120) | class Qwen3DecoderLayer(nn.Module): method __init__ (line 122) | def __init__( method forward (line 146) | def forward( class Qwen3Model (line 162) | class Qwen3Model(nn.Module): method __init__ (line 164) | def __init__( method forward (line 173) | def forward( class Qwen3ForCausalLM (line 186) | class Qwen3ForCausalLM(nn.Module): method __init__ (line 195) | def __init__( method embed_tokens (line 208) | def embed_tokens(self): method layers (line 212) | def layers(self): method norm (line 216) | def norm(self): method forward (line 219) | def forward( method compute_logits (line 226) | def compute_logits( FILE: acestep/third_parts/nano-vllm/nanovllm/sampling_params.py class SamplingParams (line 6) | class SamplingParams: method __post_init__ (line 21) | def __post_init__(self): FILE: acestep/third_parts/nano-vllm/nanovllm/utils/compat.py function maybe_compile (line 24) | def maybe_compile(fn: Optional[F] = None, **compile_kwargs: Any) -> Any: FILE: acestep/third_parts/nano-vllm/nanovllm/utils/compat_test.py function _sample_fn (line 7) | def _sample_fn(x): class MaybeCompileTests (line 12) | class MaybeCompileTests(unittest.TestCase): method test_compiles_when_triton_available (line 15) | def test_compiles_when_triton_available(self): method test_returns_original_when_triton_absent (line 25) | def test_returns_original_when_triton_absent(self): method test_kwargs_syntax_forwards_compile_args (line 32) | def test_kwargs_syntax_forwards_compile_args(self): FILE: acestep/third_parts/nano-vllm/nanovllm/utils/context.py class Context (line 7) | class Context: function get_context (line 36) | def get_context(): function set_context (line 43) | def set_context(is_prefill, cu_seqlens_q=None, cu_seqlens_k=None, max_se... function reset_context (line 46) | def reset_context(): FILE: acestep/third_parts/nano-vllm/nanovllm/utils/loader.py function default_weight_loader (line 8) | def default_weight_loader(param: nn.Parameter, loaded_weight: torch.Tens... function _get_parameter_safe (line 12) | def _get_parameter_safe(model: nn.Module, weight_name: str): function load_model (line 43) | def load_model(model: nn.Module, path: str): FILE: acestep/training/__init__.py function check_lightning_available (line 50) | def check_lightning_available(): FILE: acestep/training/configs.py class LoRAConfig (line 12) | class LoRAConfig: method to_dict (line 30) | def to_dict(self): class LoKRConfig (line 42) | class LoKRConfig: method to_dict (line 60) | def to_dict(self): class TrainingConfig (line 79) | class TrainingConfig: method __post_init__ (line 133) | def __post_init__(self) -> None: method to_dict (line 137) | def to_dict(self): FILE: acestep/training/data_module.py class LightningDataModule (line 27) | class LightningDataModule: class PreprocessedTensorDataset (line 35) | class PreprocessedTensorDataset(Dataset): method __init__ (line 48) | def __init__(self, tensor_dir: str): method _resolve_manifest_path (line 95) | def _resolve_manifest_path(self, raw: str) -> Optional[str]: method __len__ (line 130) | def __len__(self) -> int: method __getitem__ (line 133) | def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]: function collate_preprocessed_batch (line 152) | def collate_preprocessed_batch(batch: List[Dict]) -> Dict[str, torch.Ten... class PreprocessedDataModule (line 220) | class PreprocessedDataModule(LightningDataModule if LIGHTNING_AVAILABLE ... method __init__ (line 227) | def __init__( method setup (line 262) | def setup(self, stage: Optional[str] = None): method train_dataloader (line 280) | def train_dataloader(self) -> DataLoader: method val_dataloader (line 299) | def val_dataloader(self) -> Optional[DataLoader]: class AceStepTrainingDataset (line 324) | class AceStepTrainingDataset(Dataset): method __init__ (line 336) | def __init__( method _validate_samples (line 352) | def _validate_samples(self) -> List[Dict[str, Any]]: method __len__ (line 381) | def __len__(self) -> int: method __getitem__ (line 384) | def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]: function collate_training_batch (line 430) | def collate_training_batch(batch: List[Dict]) -> Dict[str, Any]: class AceStepDataModule (line 462) | class AceStepDataModule(LightningDataModule if LIGHTNING_AVAILABLE else ... method __init__ (line 468) | def __init__( method setup (line 492) | def setup(self, stage: Optional[str] = None): method train_dataloader (line 518) | def train_dataloader(self) -> DataLoader: method val_dataloader (line 529) | def val_dataloader(self) -> Optional[DataLoader]: function load_dataset_from_json (line 543) | def load_dataset_from_json(json_path: str) -> Tuple[List[Dict[str, Any]]... FILE: acestep/training/data_module_test.py class SafePathTests (line 20) | class SafePathTests(unittest.TestCase): method test_valid_directory (line 23) | def test_valid_directory(self): method test_traversal_raises (line 30) | def test_traversal_raises(self): method test_absolute_path_outside_raises (line 36) | def test_absolute_path_outside_raises(self): method test_normal_child (line 42) | def test_normal_child(self): method test_absolute_path_inside_allowed (line 48) | def test_absolute_path_inside_allowed(self): class PreprocessedTensorDatasetPathSafetyTests (line 56) | class PreprocessedTensorDatasetPathSafetyTests(unittest.TestCase): method setUp (line 59) | def setUp(self): method test_manifest_traversal_paths_skipped (line 63) | def test_manifest_traversal_paths_skipped(self): method test_fallback_scan_only_finds_pt_files (line 84) | def test_fallback_scan_only_finds_pt_files(self): method test_nonexistent_dir_raises (line 93) | def test_nonexistent_dir_raises(self): method test_manifest_relative_to_tensor_dir (line 97) | def test_manifest_relative_to_tensor_dir(self): method test_manifest_legacy_cwd_relative_paths (line 110) | def test_manifest_legacy_cwd_relative_paths(self): class SaveManifestTests (line 133) | class SaveManifestTests(unittest.TestCase): method test_paths_stored_relative_to_output_dir (line 136) | def test_paths_stored_relative_to_output_dir(self): method test_cwd_relative_input_normalised (line 157) | def test_cwd_relative_input_normalised(self): class LoadDatasetFromJsonTests (line 174) | class LoadDatasetFromJsonTests(unittest.TestCase): method setUp (line 177) | def setUp(self): method test_nonexistent_file_raises (line 180) | def test_nonexistent_file_raises(self): method test_valid_json (line 184) | def test_valid_json(self): FILE: acestep/training/dataset_builder_modules/audio_io.py function _read_text_file (line 10) | def _read_text_file(path: str) -> Tuple[str, bool]: function load_caption_file (line 30) | def load_caption_file(audio_path: str) -> Tuple[str, bool]: function load_json_metadata (line 41) | def load_json_metadata(audio_path: str) -> Tuple[Dict[str, Any], bool]: function load_lyrics_file (line 72) | def load_lyrics_file(audio_path: str) -> Tuple[str, bool]: function get_audio_duration (line 88) | def get_audio_duration(audio_path: str) -> int: FILE: acestep/training/dataset_builder_modules/builder.py class DatasetBuilder (line 12) | class DatasetBuilder( FILE: acestep/training/dataset_builder_modules/core.py class CoreMixin (line 6) | class CoreMixin: method __init__ (line 9) | def __init__(self): method get_sample_count (line 14) | def get_sample_count(self) -> int: method get_labeled_count (line 18) | def get_labeled_count(self) -> int: FILE: acestep/training/dataset_builder_modules/csv_metadata.py function load_csv_metadata (line 10) | def load_csv_metadata(directory: str) -> Dict[str, Dict[str, Any]]: FILE: acestep/training/dataset_builder_modules/dataframe.py class DataframeMixin (line 4) | class DataframeMixin: method get_samples_dataframe_data (line 7) | def get_samples_dataframe_data(self) -> List[List[Any]]: method to_training_format (line 32) | def to_training_format(self) -> List[Dict[str, Any]]: FILE: acestep/training/dataset_builder_modules/label_all.py class LabelAllMixin (line 6) | class LabelAllMixin: method label_all_samples (line 9) | def label_all_samples( FILE: acestep/training/dataset_builder_modules/label_single.py class LabelSingleMixin (line 9) | class LabelSingleMixin: method label_sample (line 12) | def label_sample( FILE: acestep/training/dataset_builder_modules/label_utils.py function get_audio_codes (line 6) | def get_audio_codes(audio_path: str, dit_handler) -> Optional[str]: function parse_int (line 24) | def parse_int(value: Any) -> Optional[int]: FILE: acestep/training/dataset_builder_modules/metadata.py class MetadataMixin (line 4) | class MetadataMixin: method set_custom_tag (line 7) | def set_custom_tag(self, custom_tag: str, tag_position: str = "prepend"): method set_all_instrumental (line 15) | def set_all_instrumental(self, is_instrumental: bool): FILE: acestep/training/dataset_builder_modules/models.py class AudioSample (line 15) | class AudioSample: method __post_init__ (line 36) | def __post_init__(self): method to_dict (line 40) | def to_dict(self) -> Dict[str, Any]: method from_dict (line 45) | def from_dict(cls, data: Dict[str, Any]) -> "AudioSample": method get_full_caption (line 54) | def get_full_caption(self, tag_position: str = "prepend") -> str: method get_full_genre (line 67) | def get_full_genre(self, tag_position: str = "prepend") -> str: method get_training_prompt (line 80) | def get_training_prompt(self, tag_position: str = "prepend", use_genre... method has_raw_lyrics (line 90) | def has_raw_lyrics(self) -> bool: method has_formatted_lyrics (line 94) | def has_formatted_lyrics(self) -> bool: class DatasetMetadata (line 100) | class DatasetMetadata: method __post_init__ (line 111) | def __post_init__(self): method to_dict (line 115) | def to_dict(self) -> Dict[str, Any]: FILE: acestep/training/dataset_builder_modules/preprocess.py function _empty_gpu_cache (line 33) | def _empty_gpu_cache() -> None: class PreprocessMixin (line 46) | class PreprocessMixin: method preprocess_to_tensors (line 49) | def preprocess_to_tensors( FILE: acestep/training/dataset_builder_modules/preprocess_audio.py function load_audio_stereo (line 4) | def load_audio_stereo(audio_path: str, target_sample_rate: int, max_dura... FILE: acestep/training/dataset_builder_modules/preprocess_context.py function build_context_latents (line 4) | def build_context_latents( FILE: acestep/training/dataset_builder_modules/preprocess_encoder.py function run_encoder (line 4) | def run_encoder( FILE: acestep/training/dataset_builder_modules/preprocess_lyrics.py function encode_lyrics (line 4) | def encode_lyrics(text_encoder, text_tokenizer, lyrics: str, device, dty... FILE: acestep/training/dataset_builder_modules/preprocess_manifest.py function save_manifest (line 6) | def save_manifest(output_dir: str, metadata, output_paths: List[str]) ->... FILE: acestep/training/dataset_builder_modules/preprocess_text.py function build_text_prompt (line 9) | def build_text_prompt(sample: AudioSample, tag_position: str, use_genre:... function encode_text (line 16) | def encode_text(text_encoder, text_tokenizer, text_prompt: str, device, ... FILE: acestep/training/dataset_builder_modules/preprocess_utils.py function select_genre_indices (line 7) | def select_genre_indices(samples: List[AudioSample], genre_ratio: int) -... function build_metas_str (line 16) | def build_metas_str(sample: AudioSample) -> str: FILE: acestep/training/dataset_builder_modules/preprocess_vae.py function vae_encode (line 18) | def vae_encode(vae, audio, dtype): function tiled_vae_encode (line 41) | def tiled_vae_encode( FILE: acestep/training/dataset_builder_modules/scan.py class ScanMixin (line 12) | class ScanMixin: method scan_directory (line 15) | def scan_directory(self, directory: str) -> Tuple[List[AudioSample], s... FILE: acestep/training/dataset_builder_modules/serialization.py class SerializationMixin (line 12) | class SerializationMixin: method save_dataset (line 15) | def save_dataset(self, output_path: str, dataset_name: str = None) -> ... method load_dataset (line 44) | def load_dataset(self, dataset_path: str) -> Tuple[List[AudioSample], ... FILE: acestep/training/dataset_builder_modules/update_sample.py class UpdateSampleMixin (line 6) | class UpdateSampleMixin: method update_sample (line 9) | def update_sample(self, sample_idx: int, **kwargs) -> Tuple[AudioSampl... FILE: acestep/training/lokr_utils.py function check_lycoris_available (line 30) | def check_lycoris_available() -> bool: function _matches_target_module_name (line 35) | def _matches_target_module_name(module_name: str, target_modules) -> bool: function inject_lokr_into_dit (line 49) | def inject_lokr_into_dit( function save_lokr_weights (line 185) | def save_lokr_weights( function load_lokr_weights (line 211) | def load_lokr_weights(lycoris_net: "LycorisNetwork", weights_path: str) ... function save_lokr_training_checkpoint (line 221) | def save_lokr_training_checkpoint( FILE: acestep/training/lora_checkpoint.py function save_lora_weights (line 25) | def save_lora_weights( function load_lora_weights (line 69) | def load_lora_weights( function save_training_checkpoint (line 109) | def save_training_checkpoint( function load_training_checkpoint (line 151) | def load_training_checkpoint( FILE: acestep/training/lora_injection.py function _safe_enable_input_require_grads (line 16) | def _safe_enable_input_require_grads(self): function _unwrap_decoder (line 77) | def _unwrap_decoder(module: nn.Module) -> nn.Module: function get_dit_target_modules (line 116) | def get_dit_target_modules(model) -> List[str]: function freeze_non_lora_parameters (line 136) | def freeze_non_lora_parameters(model, freeze_encoder: bool = True) -> None: function inject_lora_into_dit (line 168) | def inject_lora_into_dit( FILE: acestep/training/lora_utils.py function check_peft_available (line 20) | def check_peft_available() -> bool: function merge_lora_weights (line 25) | def merge_lora_weights(model) -> Any: function get_lora_info (line 46) | def get_lora_info(model) -> Dict[str, Any]: FILE: acestep/training/path_safety.py function _resolve (line 23) | def _resolve(path: str) -> str: function set_safe_root (line 38) | def set_safe_root(root: str) -> None: function get_safe_root (line 48) | def get_safe_root() -> str: function safe_path (line 53) | def safe_path(user_path: str, *, base: Optional[str] = None) -> str: function safe_open (line 96) | def safe_open(user_path: str, mode: str = "r", **kwargs): FILE: acestep/training/test_lora_utils.py class TestUnwrapDecoder (line 15) | class TestUnwrapDecoder(unittest.TestCase): method test_returns_module_directly (line 18) | def test_returns_module_directly(self): method test_unwraps_forward_module (line 24) | def test_unwraps_forward_module(self): method test_unwraps_peft_base_model (line 33) | def test_unwraps_peft_base_model(self): method test_unwraps_peft_base_model_no_inner_model (line 42) | def test_unwraps_peft_base_model_no_inner_model(self): method test_unwraps_nested_wrappers (line 49) | def test_unwraps_nested_wrappers(self): method test_unwraps_complex_peft_chain (line 60) | def test_unwraps_complex_peft_chain(self): class TestCheckPeftAvailable (line 74) | class TestCheckPeftAvailable(unittest.TestCase): method test_returns_boolean (line 77) | def test_returns_boolean(self): class TestFreezeNonLoraParameters (line 83) | class TestFreezeNonLoraParameters(unittest.TestCase): method _create_mock_model (line 86) | def _create_mock_model(self, param_names_requires_grad=None): method test_lora_params_remain_trainable (line 98) | def test_lora_params_remain_trainable(self): method test_non_lora_non_encoder_frozen_when_freeze_encoder_true (line 113) | def test_non_lora_non_encoder_frozen_when_freeze_encoder_true(self): method test_encoder_frozen_when_freeze_encoder_true (line 126) | def test_encoder_frozen_when_freeze_encoder_true(self): method test_encoder_trainable_when_freeze_encoder_false (line 142) | def test_encoder_trainable_when_freeze_encoder_false(self): method test_mixed_params_freeze_encoder_true (line 170) | def test_mixed_params_freeze_encoder_true(self): method test_mixed_params_freeze_encoder_false (line 190) | def test_mixed_params_freeze_encoder_false(self): FILE: acestep/training/trainer.py function _normalize_device_type (line 73) | def _normalize_device_type(device: Any) -> str: function _select_compute_dtype (line 82) | def _select_compute_dtype(device_type: str) -> torch.dtype: function _select_fabric_precision (line 91) | def _select_fabric_precision(device_type: str) -> str: function _ensure_trainable_params_fp32 (line 102) | def _ensure_trainable_params_fp32(module: nn.Module) -> Tuple[int, int]: function _count_nonfinite_grads (line 117) | def _count_nonfinite_grads(params: List[torch.nn.Parameter]) -> Tuple[in... function _ensure_optimizer_params_fp32 (line 131) | def _ensure_optimizer_params_fp32(optimizer: torch.optim.Optimizer) -> T... function _build_param_name_lookup (line 147) | def _build_param_name_lookup( function _count_nonfinite_grads_detailed (line 160) | def _count_nonfinite_grads_detailed( function _collect_lokr_trainable_params (line 204) | def _collect_lokr_trainable_params( function _unwrap_stale_fabric_decoder (line 232) | def _unwrap_stale_fabric_decoder(model: nn.Module) -> bool: function _iter_module_wrappers (line 253) | def _iter_module_wrappers(module: nn.Module) -> List[nn.Module]: function _configure_training_memory_features (line 283) | def _configure_training_memory_features(decoder: nn.Module) -> Tuple[boo... function sample_discrete_timestep (line 334) | def sample_discrete_timestep(bsz, timesteps_tensor): class PreprocessedLoRAModule (line 360) | class PreprocessedLoRAModule(nn.Module): method __init__ (line 373) | def __init__( method training_step (line 455) | def training_step( class LoRATrainer (line 540) | class LoRATrainer: method __init__ (line 547) | def __init__( method train_from_preprocessed (line 570) | def train_from_preprocessed( method _train_with_fabric (line 699) | def _train_with_fabric( method _train_basic (line 1160) | def _train_basic( method stop (line 1318) | def stop(self): class PreprocessedLoKRModule (line 1323) | class PreprocessedLoKRModule(nn.Module): method __init__ (line 1326) | def __init__( method training_step (line 1363) | def training_step(self, batch: Dict[str, torch.Tensor]) -> torch.Tensor: class LoKRTrainer (line 1417) | class LoKRTrainer: method __init__ (line 1420) | def __init__( method train_from_preprocessed (line 1437) | def train_from_preprocessed( method _train_with_fabric (line 1567) | def _train_with_fabric( method _train_basic (line 1908) | def _train_basic( method stop (line 2069) | def stop(self): FILE: acestep/training_v2/cli/args.py function build_root_parser (line 28) | def build_root_parser() -> argparse.ArgumentParser: function _add_model_args (line 118) | def _add_model_args(parser: argparse.ArgumentParser) -> None: function _add_device_args (line 149) | def _add_device_args(parser: argparse.ArgumentParser) -> None: function _add_common_training_args (line 167) | def _add_common_training_args(parser: argparse.ArgumentParser) -> None: function _add_fixed_args (line 267) | def _add_fixed_args(parser: argparse.ArgumentParser) -> None: function _add_estimation_args (line 274) | def _add_estimation_args(parser: argparse.ArgumentParser) -> None: FILE: acestep/training_v2/cli/config_builder.py function _resolve_model_config_path (line 25) | def _resolve_model_config_path(ckpt_root: Path, variant: str) -> Path: function build_configs (line 48) | def build_configs(args: argparse.Namespace) -> Tuple[AdapterConfig, Trai... FILE: acestep/training_v2/cli/train_fixed.py function _cleanup_gpu (line 29) | def _cleanup_gpu() -> None: function run_fixed (line 40) | def run_fixed(args: argparse.Namespace) -> int: FILE: acestep/training_v2/cli/train_vanilla.py function _cleanup_gpu (line 37) | def _cleanup_gpu() -> None: class _HandlerShim (line 48) | class _HandlerShim: method __init__ (line 55) | def __init__(self, model: torch.nn.Module, device: str, dtype: torch.d... function run_vanilla (line 66) | def run_vanilla(args: argparse.Namespace) -> int: FILE: acestep/training_v2/cli/validation.py function validate_paths (line 14) | def validate_paths(args: argparse.Namespace) -> bool: function resolve_target_modules (line 60) | def resolve_target_modules(target_modules: list, attention_type: str) ->... FILE: acestep/training_v2/configs.py class LoRAConfigV2 (line 30) | class LoRAConfigV2(LoRAConfig): method to_dict (line 40) | def to_dict(self) -> dict: class LoKRConfigV2 (line 68) | class LoKRConfigV2(LoKRConfig): method to_dict (line 78) | def to_dict(self) -> dict: class TrainingConfigV2 (line 89) | class TrainingConfigV2(TrainingConfig): method effective_log_dir (line 233) | def effective_log_dir(self) -> Path: method to_dict (line 239) | def to_dict(self) -> dict: method save_json (line 284) | def save_json(self, path: Path) -> None: method from_json (line 291) | def from_json(cls, path: Path) -> "TrainingConfigV2": FILE: acestep/training_v2/estimate.py function run_estimation (line 26) | def run_estimation( function _find_attention_modules (line 236) | def _find_attention_modules(model: nn.Module, granularity: str) -> List[... FILE: acestep/training_v2/fixed_lora_module.py class _LastLossAccessor (line 39) | class _LastLossAccessor: method __init__ (line 47) | def __init__(self, module: "FixedLoRAModule") -> None: method append (line 51) | def append(self, value: float) -> None: method __getitem__ (line 55) | def __getitem__(self, idx: int) -> float: method __bool__ (line 60) | def __bool__(self) -> bool: method __len__ (line 63) | def __len__(self) -> int: function _normalize_device_type (line 75) | def _normalize_device_type(device: Any) -> str: function _select_compute_dtype (line 83) | def _select_compute_dtype(device_type: str) -> torch.dtype: function _select_fabric_precision (line 91) | def _select_fabric_precision(device_type: str) -> str: class FixedLoRAModule (line 104) | class FixedLoRAModule(nn.Module): method __init__ (line 119) | def __init__( method _inject_lora (line 187) | def _inject_lora(self, model: nn.Module, cfg: LoRAConfigV2) -> None: method _inject_lokr (line 204) | def _inject_lokr(self, model: nn.Module, cfg: LoKRConfigV2) -> None: method training_step (line 237) | def training_step(self, batch: Dict[str, torch.Tensor]) -> torch.Tensor: FILE: acestep/training_v2/gpu_utils.py class GPUInfo (line 25) | class GPUInfo: method __str__ (line 46) | def __str__(self) -> str: function detect_gpu (line 56) | def detect_gpu(requested_device: str = "auto", requested_precision: str ... function _cuda_free_mb (line 137) | def _cuda_free_mb(idx: int = 0) -> float: function get_available_vram_mb (line 144) | def get_available_vram_mb(device: str = "auto") -> Optional[float]: function get_gpu_info (line 163) | def get_gpu_info(device: str = "auto") -> dict: function estimate_batch_budget (line 193) | def estimate_batch_budget( FILE: acestep/training_v2/make_test_fixtures.py function generate_single_sample (line 42) | def generate_single_sample( function generate_fixtures (line 69) | def generate_fixtures( function main (line 119) | def main() -> int: FILE: acestep/training_v2/model_discovery.py class ModelInfo (line 32) | class ModelInfo: function scan_models (line 46) | def scan_models(checkpoint_dir: str | Path) -> List[ModelInfo]: function detect_base_model (line 106) | def detect_base_model(config: Dict, dir_name: str = "") -> str: function get_base_defaults (line 125) | def get_base_defaults(base_model: str) -> Dict: function fuzzy_search (line 134) | def fuzzy_search(query: str, models: List[ModelInfo]) -> List[ModelInfo]: function pick_model (line 161) | def pick_model( function _search_loop (line 208) | def _search_loop(models: List[ModelInfo]) -> Optional[Tuple[str, ModelIn... function prompt_base_model (line 239) | def prompt_base_model(model_name: str) -> str: FILE: acestep/training_v2/model_loader.py function _is_flash_attention_available (line 25) | def _is_flash_attention_available(device: str) -> bool: function _resolve_model_dir (line 61) | def _resolve_model_dir(checkpoint_dir: str | Path, variant: str) -> Path: function _resolve_dtype (line 87) | def _resolve_dtype(precision: str) -> torch.dtype: function read_model_config (line 97) | def read_model_config(checkpoint_dir: str | Path, variant: str) -> Dict[... function load_decoder_for_training (line 114) | def load_decoder_for_training( function load_preprocessing_models (line 187) | def load_preprocessing_models( function cleanup_preprocessing_models (line 243) | def cleanup_preprocessing_models(models: Dict[str, Any]) -> None: function load_vae (line 267) | def load_vae( function load_text_encoder (line 291) | def load_text_encoder( function load_silence_latent (line 318) | def load_silence_latent( function unload_models (line 372) | def unload_models(*models: Any) -> None: FILE: acestep/training_v2/optim.py function build_optimizer (line 43) | def build_optimizer( function build_scheduler (line 115) | def build_scheduler( FILE: acestep/training_v2/preprocess.py function preprocess_audio_files (line 47) | def preprocess_audio_files( function _pass1_light (line 166) | def _pass1_light( function _pass2_heavy (line 336) | def _pass2_heavy( FILE: acestep/training_v2/preprocess_discovery.py function discover_audio_files (line 24) | def discover_audio_files( function load_sample_metadata (line 93) | def load_sample_metadata( function load_dataset_metadata (line 145) | def load_dataset_metadata(dataset_json: Optional[str]) -> Dict[str, Any]: function select_genre_indices (line 181) | def select_genre_indices(num_samples: int, genre_ratio: int) -> Set[int]: FILE: acestep/training_v2/preprocess_prompt.py function build_simple_prompt (line 16) | def build_simple_prompt( FILE: acestep/training_v2/preprocess_vae.py function tiled_vae_encode (line 21) | def tiled_vae_encode( FILE: acestep/training_v2/settings.py function settings_dir (line 33) | def settings_dir() -> Path: function settings_path (line 42) | def settings_path() -> Path: function _default_settings (line 51) | def _default_settings() -> Dict[str, Any]: function load_settings (line 61) | def load_settings() -> Optional[Dict[str, Any]]: function save_settings (line 85) | def save_settings(data: Dict[str, Any]) -> None: function is_first_run (line 98) | def is_first_run() -> bool: function get_checkpoint_dir (line 106) | def get_checkpoint_dir() -> Optional[str]: FILE: acestep/training_v2/tensorboard_utils.py function is_tensorboard_available (line 31) | def is_tensorboard_available() -> bool: class TrainingLogger (line 36) | class TrainingLogger: method __init__ (line 42) | def __init__(self, log_dir: str | Path, enabled: bool = True) -> None: method log_scalar (line 61) | def log_scalar(self, tag: str, value: float, step: int) -> None: method log_loss (line 66) | def log_loss(self, loss: float, step: int) -> None: method log_lr (line 69) | def log_lr(self, lr: float, step: int) -> None: method log_epoch_loss (line 72) | def log_epoch_loss(self, loss: float, epoch: int) -> None: method log_grad_norm (line 75) | def log_grad_norm(self, norm: float, step: int) -> None: method log_per_layer_grad_norms (line 82) | def log_per_layer_grad_norms( method log_estimation_scores (line 113) | def log_estimation_scores( method log_param_histogram (line 128) | def log_param_histogram( method flush (line 152) | def flush(self) -> None: method close (line 156) | def close(self) -> None: method __enter__ (line 161) | def __enter__(self) -> "TrainingLogger": method __exit__ (line 164) | def __exit__(self, *exc: Any) -> None: FILE: acestep/training_v2/timestep_sampling.py function sample_timesteps (line 20) | def sample_timesteps( function apply_cfg_dropout (line 80) | def apply_cfg_dropout( FILE: acestep/training_v2/trainer_basic_loop.py function _flush_accumulated (line 33) | def _flush_accumulated( function run_basic_training_loop (line 85) | def run_basic_training_loop( FILE: acestep/training_v2/trainer_fixed.py class FixedLoRATrainer (line 71) | class FixedLoRATrainer: method __init__ (line 79) | def __init__( method train (line 101) | def train( method stop (line 173) | def stop(self) -> None: method _iter_module_wrappers (line 181) | def _iter_module_wrappers(module: nn.Module) -> list: method _configure_memory_features (line 186) | def _configure_memory_features(cls, decoder: nn.Module) -> tuple: method _offload_non_decoder (line 190) | def _offload_non_decoder(model: nn.Module) -> int: method _save_adapter_flat (line 193) | def _save_adapter_flat(self, output_dir: str) -> None: method _save_checkpoint (line 196) | def _save_checkpoint( method _save_final (line 201) | def _save_final(self, output_dir: str) -> None: method _verify_saved_adapter (line 205) | def _verify_saved_adapter(output_dir: str) -> None: method _resume_checkpoint (line 208) | def _resume_checkpoint( method _train_fabric (line 217) | def _train_fabric( FILE: acestep/training_v2/trainer_helpers.py function iter_module_wrappers (line 37) | def iter_module_wrappers(module: nn.Module) -> list: function configure_memory_features (line 68) | def configure_memory_features(decoder: nn.Module) -> tuple: function offload_non_decoder (line 121) | def offload_non_decoder(model: nn.Module) -> int: function save_adapter_flat (line 145) | def save_adapter_flat(trainer: Any, output_dir: str) -> None: function save_checkpoint (line 187) | def save_checkpoint( function save_final (line 237) | def save_final(trainer: Any, output_dir: str) -> None: function verify_saved_adapter (line 243) | def verify_saved_adapter(output_dir: str) -> None: function resume_checkpoint (line 304) | def resume_checkpoint( FILE: acestep/training_v2/trainer_helpers_test.py function _make_fabric_wrapper (line 12) | def _make_fabric_wrapper(inner: MagicMock) -> MagicMock: function _make_peft_decoder (line 19) | def _make_peft_decoder() -> MagicMock: function _make_base_decoder (line 25) | def _make_base_decoder() -> MagicMock: function _make_full_model (line 30) | def _make_full_model(decoder: MagicMock) -> MagicMock: function _make_trainer (line 43) | def _make_trainer(decoder: MagicMock, adapter_type: str = "lora") -> Mag... class TestSaveAdapterFlatLora (line 54) | class TestSaveAdapterFlatLora(unittest.TestCase): method test_calls_save_pretrained_on_peft_decoder_not_full_model (line 57) | def test_calls_save_pretrained_on_peft_decoder_not_full_model(self): method test_unwraps_fabric_wrapper_before_saving (line 72) | def test_unwraps_fabric_wrapper_before_saving(self): method test_doubly_wrapped_fabric_still_reaches_peft_decoder (line 86) | def test_doubly_wrapped_fabric_still_reaches_peft_decoder(self): method test_fallback_to_save_lora_weights_when_no_save_pretrained (line 100) | def test_fallback_to_save_lora_weights_when_no_save_pretrained(self): method test_regression_full_model_save_pretrained_not_called_for_lora (line 117) | def test_regression_full_model_save_pretrained_not_called_for_lora(self): FILE: acestep/training_v2/trainer_vanilla.py class LoRAConfig (line 31) | class LoRAConfig: # type: ignore[no-redef] class TrainingConfig (line 40) | class TrainingConfig: # type: ignore[no-redef] class _HandlerShim (line 61) | class _HandlerShim: method __init__ (line 74) | def __init__(self, model: torch.nn.Module, device: str, dtype: torch.d... class VanillaTrainer (line 81) | class VanillaTrainer: method __init__ (line 98) | def __init__( method _build_configs (line 110) | def _build_configs(self) -> Tuple[LoRAConfig, TrainingConfig, int]: method _setup_device_and_model (line 151) | def _setup_device_and_model( method _run_training (line 178) | def _run_training( method train (line 203) | def train(self) -> None: FILE: acestep/training_v2/ui/__init__.py function set_plain_mode (line 42) | def set_plain_mode(value: bool) -> None: function is_rich_active (line 48) | def is_rich_active() -> bool: function require_rich (line 57) | def require_rich() -> None: class TrainingUpdate (line 73) | class TrainingUpdate: method __iter__ (line 97) | def __iter__(self) -> Iterator[Tuple[int, float, str]]: # type: ignor... FILE: acestep/training_v2/ui/banner.py function _pick_logo (line 48) | def _pick_logo() -> str: function _pick_motto (line 87) | def _pick_motto() -> str: function _get_versions (line 91) | def _get_versions() -> dict: function _get_gpu_line (line 108) | def _get_gpu_line(device: str = "", precision: str = "") -> str: function show_banner (line 124) | def show_banner( FILE: acestep/training_v2/ui/config_panel.py function _resolve_value (line 129) | def _resolve_value( function _is_default (line 147) | def _is_default(key: str, value: Any) -> bool: function _fmt_value (line 157) | def _fmt_value(value: Any) -> str: function show_config (line 173) | def show_config( function _show_rich (line 194) | def _show_rich( function _show_plain (line 239) | def _show_plain( function confirm_start (line 266) | def confirm_start(skip: bool = False) -> bool: FILE: acestep/training_v2/ui/errors.py function _find_suggestions (line 70) | def _find_suggestions(error_str: str) -> list[str]: function handle_error (line 82) | def handle_error( function show_warning (line 104) | def show_warning(msg: str) -> None: function show_fail (line 112) | def show_fail(msg: str) -> None: function show_info (line 120) | def show_info(msg: str) -> None: function show_error (line 128) | def show_error( function _show_rich (line 169) | def _show_rich( function _show_plain (line 208) | def _show_plain( FILE: acestep/training_v2/ui/flows_common.py function build_train_namespace (line 15) | def build_train_namespace(a: dict, mode: str) -> argparse.Namespace: FILE: acestep/training_v2/ui/flows_estimate.py function _step_model (line 26) | def _step_model(a: dict) -> None: function _step_params (line 63) | def _step_params(a: dict) -> None: function _step_lora (line 79) | def _step_lora(a: dict) -> None: function _step_output (line 95) | def _step_output(a: dict) -> None: function wizard_estimate (line 121) | def wizard_estimate() -> argparse.Namespace: FILE: acestep/training_v2/ui/flows_preprocess.py function _step_model (line 28) | def _step_model(a: dict) -> None: function _step_source (line 61) | def _step_source(a: dict) -> None: function _ask_dataset_json (line 94) | def _ask_dataset_json(default: str | None) -> str | None: function _resolve_dataset_json (line 124) | def _resolve_dataset_json(raw_path: str) -> Path | None: function _print_found_nearby (line 155) | def _print_found_nearby(original: str, found: Path) -> None: function _print_not_found (line 165) | def _print_not_found(path: str) -> None: function _step_output (line 175) | def _step_output(a: dict) -> None: function wizard_preprocess (line 198) | def wizard_preprocess() -> argparse.Namespace: FILE: acestep/training_v2/ui/flows_setup.py function _print (line 34) | def _print(msg: str) -> None: function _smart_checkpoint_default (line 44) | def _smart_checkpoint_default() -> str: function run_first_setup (line 56) | def run_first_setup() -> dict: function run_settings_editor (line 141) | def run_settings_editor() -> dict | None: FILE: acestep/training_v2/ui/flows_train.py function _build_steps (line 36) | def _build_steps(mode: str, config_mode: str, adapter_type: str = "lora"... function _offer_load_preset (line 67) | def _offer_load_preset(answers: dict) -> None: function _offer_save_preset (line 93) | def _offer_save_preset(answers: dict) -> None: function wizard_train (line 138) | def wizard_train( FILE: acestep/training_v2/ui/flows_train_steps.py function step_config_mode (line 26) | def step_config_mode(a: dict) -> None: function step_required (line 39) | def step_required(a: dict) -> None: function step_lora (line 90) | def step_lora(a: dict) -> None: function step_lokr (line 115) | def step_lokr(a: dict) -> None: function _default_shift (line 161) | def _default_shift(a: dict) -> float: function _default_inference_steps (line 169) | def _default_inference_steps(a: dict) -> int: function step_training (line 177) | def step_training(a: dict) -> None: function step_cfg (line 200) | def step_cfg(a: dict) -> None: function step_logging (line 206) | def step_logging(a: dict) -> None: function step_advanced_device (line 233) | def step_advanced_device(a: dict) -> None: function step_advanced_optimizer (line 240) | def step_advanced_optimizer(a: dict) -> None: function step_advanced_vram (line 271) | def step_advanced_vram(a: dict) -> None: function step_advanced_training (line 286) | def step_advanced_training(a: dict) -> None: function step_advanced_dataloader (line 294) | def step_advanced_dataloader(a: dict) -> None: function step_advanced_logging (line 309) | def step_advanced_logging(a: dict) -> None: FILE: acestep/training_v2/ui/gpu_monitor.py class VRAMSnapshot (line 16) | class VRAMSnapshot: method used_gb (line 25) | def used_gb(self) -> float: method total_gb (line 29) | def total_gb(self) -> float: method percent (line 33) | def percent(self) -> float: method free_mb (line 39) | def free_mb(self) -> float: class GPUMonitor (line 43) | class GPUMonitor: method __init__ (line 54) | def __init__(self, device: str = "cuda:0", interval: float = 5.0) -> N... method _init_static (line 66) | def _init_static(self) -> None: method _cuda_idx (line 81) | def _cuda_idx(self) -> int: method available (line 89) | def available(self) -> bool: method snapshot (line 93) | def snapshot(self) -> VRAMSnapshot: method peak_mb (line 127) | def peak_mb(self) -> float: FILE: acestep/training_v2/ui/help_formatter.py class RichHelpFormatter (line 19) | class RichHelpFormatter(argparse.HelpFormatter): method __init__ (line 25) | def __init__( method format_help (line 41) | def format_help(self) -> str: function install_rich_help (line 97) | def install_rich_help(parser: argparse.ArgumentParser) -> None: FILE: acestep/training_v2/ui/presets.py function _find_project_root (line 34) | def _find_project_root() -> Optional[Path]: function _local_presets_dir (line 74) | def _local_presets_dir() -> Path: function _global_presets_dir (line 87) | def _global_presets_dir() -> Path: function _builtin_presets_dir (line 101) | def _builtin_presets_dir() -> Path: function _sanitize_name (line 142) | def _sanitize_name(name: str) -> str: function list_presets (line 170) | def list_presets() -> List[Dict[str, Any]]: function load_preset (line 223) | def load_preset(name: str) -> Optional[Dict[str, Any]]: function save_preset (line 249) | def save_preset(name: str, description: str, answers: Dict[str, Any]) ->... function delete_preset (line 279) | def delete_preset(name: str) -> bool: function import_preset (line 297) | def import_preset(source_path: str) -> Optional[str]: function export_preset (line 333) | def export_preset(name: str, dest_path: str) -> bool: FILE: acestep/training_v2/ui/progress.py class _LiveLogCapture (line 28) | class _LiveLogCapture(logging.Handler): method __init__ (line 44) | def __init__(self, messages: list, live: object = None) -> None: method emit (line 49) | def emit(self, record: logging.LogRecord) -> None: class TrainingStats (line 62) | class TrainingStats: method elapsed (line 89) | def elapsed(self) -> float: method elapsed_str (line 95) | def elapsed_str(self) -> str: method samples_per_sec (line 99) | def samples_per_sec(self) -> float: method eta_seconds (line 108) | def eta_seconds(self) -> float: method eta_str (line 120) | def eta_str(self) -> str: method record_step (line 126) | def record_step(self) -> None: function _fmt_duration (line 133) | def _fmt_duration(seconds: float) -> str: function _build_display (line 152) | def _build_display( function track_training (line 284) | def track_training( function _track_rich (line 311) | def _track_rich( function _track_plain (line 403) | def _track_plain( function _process_structured (line 426) | def _process_structured(update: TrainingUpdate, stats: TrainingStats) ->... function _process_tuple (line 471) | def _process_tuple(step: int, loss: float, msg: str, stats: TrainingStat... FILE: acestep/training_v2/ui/prompt_helpers.py function _esc (line 25) | def _esc(text: object) -> str: function native_path (line 35) | def native_path(path: str) -> str: class GoBack (line 51) | class GoBack(Exception): function _is_back (line 55) | def _is_back(raw: str) -> bool: function step_indicator (line 62) | def step_indicator(current: int, total: int, label: str) -> None: function menu (line 74) | def menu( function ask (line 149) | def ask( function ask_path (line 249) | def ask_path( function ask_bool (line 271) | def ask_bool(label: str, default: bool = True, allow_back: bool = False)... function section (line 283) | def section(title: str) -> None: FILE: acestep/training_v2/ui/summary.py function _dir_size_str (line 19) | def _dir_size_str(path: str) -> str: function show_summary (line 34) | def show_summary( function _show_failure (line 59) | def _show_failure(stats: TrainingStats, output_dir: str) -> None: function _show_rich (line 85) | def _show_rich( function _build_checkpoint_grid (line 174) | def _build_checkpoint_grid( function _show_plain (line 214) | def _show_plain( FILE: acestep/training_v2/ui/wizard.py function _ensure_first_run_done (line 24) | def _ensure_first_run_done() -> None: function run_wizard_session (line 44) | def run_wizard_session() -> Generator[argparse.Namespace, None, None]: function _main_menu (line 101) | def _main_menu() -> Optional[argparse.Namespace]: function _training_mode_submenu (line 153) | def _training_mode_submenu() -> Optional[str]: function run_wizard (line 172) | def run_wizard() -> Optional[argparse.Namespace]: function _run_settings_editor (line 184) | def _run_settings_editor() -> None: function _print_abort (line 194) | def _print_abort() -> None: FILE: acestep/training_v2/ui/wizard_menus.py function experimental_menu (line 16) | def experimental_menu() -> Optional[argparse.Namespace]: function manage_presets_menu (line 55) | def manage_presets_menu() -> None: function _print_msg (line 133) | def _print_msg(msg: str) -> None: FILE: acestep/ui/gradio/api/api_routes.py function set_api_key (line 28) | def set_api_key(key: Optional[str]): function _get_api_key (line 35) | def _get_api_key() -> Optional[str]: function _wrap_response (line 41) | def _wrap_response(data: Any, code: int = 200, error: Optional[str] = No... function verify_token_from_request (line 52) | def verify_token_from_request(body: dict, authorization: Optional[str] =... function verify_api_key (line 82) | async def verify_api_key(authorization: Optional[str] = Header(None)): function _close_result_cache (line 117) | def _close_result_cache(): function _get_project_root (line 129) | def _get_project_root() -> str: function _load_all_examples (line 134) | def _load_all_examples(sample_mode: str = "simple_mode") -> List[Dict[st... function store_result (line 166) | def store_result(task_id: str, result: dict, status: str = "succeeded"): function get_result (line 181) | def get_result(task_id: str) -> Optional[dict]: function health_check (line 194) | async def health_check(): function list_models (line 204) | async def list_models(request: Request, _: None = Depends(verify_api_key)): function get_audio (line 225) | async def get_audio(path: str, _: None = Depends(verify_api_key)): function create_random_sample (line 248) | async def create_random_sample(request: Request, authorization: Optional... function query_result (line 274) | async def query_result(request: Request, authorization: Optional[str] = ... function format_input (line 313) | async def format_input(request: Request, authorization: Optional[str] = ... function release_task (line 361) | async def release_task(request: Request, authorization: Optional[str] = ... function _add_cors_middleware (line 598) | def _add_cors_middleware(app): function _add_cors_middleware_post_launch (line 603) | def _add_cors_middleware_post_launch(app): function setup_api_routes_to_app (line 618) | def setup_api_routes_to_app(app, dit_handler, llm_handler, api_key: Opti... function setup_api_routes (line 635) | def setup_api_routes(demo, dit_handler, llm_handler, api_key: Optional[s... FILE: acestep/ui/gradio/api/api_routes_resource_test.py class ApiRoutesResourceCleanupTests (line 7) | class ApiRoutesResourceCleanupTests(unittest.TestCase): method test_close_result_cache_calls_close_when_diskcache_available (line 10) | def test_close_result_cache_calls_close_when_diskcache_available(self): method test_close_result_cache_skips_when_diskcache_unavailable (line 24) | def test_close_result_cache_skips_when_diskcache_unavailable(self): method test_atexit_registered (line 38) | def test_atexit_registered(self): FILE: acestep/ui/gradio/api/api_routes_thread_safety_test.py class ApiKeyLockTests (line 17) | class ApiKeyLockTests(unittest.TestCase): method test_lock_attributes_exist (line 20) | def test_lock_attributes_exist(self): method test_set_and_get_api_key_consistent (line 25) | def test_set_and_get_api_key_consistent(self): class ResultCacheFallbackTests (line 68) | class ResultCacheFallbackTests(unittest.TestCase): method test_concurrent_store_and_get (line 72) | def test_concurrent_store_and_get(self): FILE: acestep/ui/gradio/events/__init__.py function setup_event_handlers (line 26) | def setup_event_handlers(demo, dit_handler, llm_handler, dataset_handler... function setup_training_event_handlers (line 98) | def setup_training_event_handlers(demo, dit_handler, llm_handler, traini... FILE: acestep/ui/gradio/events/generation/llm_action_params.py function _parse_positive_duration_seconds (line 5) | def _parse_positive_duration_seconds(value: Optional[Union[float, int, s... function build_user_metadata (line 18) | def build_user_metadata( function convert_lm_params (line 38) | def convert_lm_params( FILE: acestep/ui/gradio/events/generation/llm_analysis_actions.py function analyze_src_audio (line 15) | def analyze_src_audio( function transcribe_audio_codes (line 114) | def transcribe_audio_codes(llm_handler, audio_code_string, constrained_d... FILE: acestep/ui/gradio/events/generation/llm_format_actions.py function _format_failure_response (line 13) | def _format_failure_response(update_count: int, status_message: str): function _clean_optional_wrapped_quotes (line 18) | def _clean_optional_wrapped_quotes(text: Optional[str]) -> Optional[str]: function _execute_format_sample (line 30) | def _execute_format_sample( function handle_format_sample (line 79) | def handle_format_sample( function handle_format_caption (line 123) | def handle_format_caption( function handle_format_lyrics (line 170) | def handle_format_lyrics( FILE: acestep/ui/gradio/events/generation/llm_sample_actions.py function handle_create_sample (line 12) | def handle_create_sample( FILE: acestep/ui/gradio/events/generation/metadata_loading.py function load_metadata (line 20) | def load_metadata(file_obj, llm_handler=None): function _get_project_root (line 131) | def _get_project_root() -> str: function load_random_example (line 139) | def load_random_example(task_type: str, llm_handler=None): function sample_example_smart (line 227) | def sample_example_smart(llm_handler, task_type: str, constrained_decodi... function load_random_simple_description (line 265) | def load_random_simple_description(): FILE: acestep/ui/gradio/events/generation/mode_ui.py function compute_mode_ui_updates (line 16) | def compute_mode_ui_updates(mode: str, llm_handler=None, previous_mode: ... function handle_generation_mode_change (line 184) | def handle_generation_mode_change(mode: str, previous_mode: str, llm_han... function handle_extract_track_name_change (line 189) | def handle_extract_track_name_change(track_name_value: str, mode: str): function handle_extract_src_audio_change (line 196) | def handle_extract_src_audio_change(src_audio_path, mode: str): FILE: acestep/ui/gradio/events/generation/mode_ui_helpers.py function _compute_field_updates_for_mode (line 8) | def _compute_field_updates_for_mode( function _compute_meta_updates_for_mode (line 53) | def _compute_meta_updates_for_mode( function _compute_automation_updates (line 87) | def _compute_automation_updates(is_extract: bool, is_lego: bool, not_sim... function _compute_repainting_labels (line 106) | def _compute_repainting_labels(is_lego: bool, is_repaint: bool): FILE: acestep/ui/gradio/events/generation/mode_ui_test.py class ModeUiStateClearingTests (line 35) | class ModeUiStateClearingTests(unittest.TestCase): method test_tuple_length (line 38) | def test_tuple_length(self): method test_custom_mode_preserves_audio_codes (line 43) | def test_custom_mode_preserves_audio_codes(self): method test_remix_mode_clears_audio_codes (line 51) | def test_remix_mode_clears_audio_codes(self): method test_simple_mode_clears_audio_codes (line 58) | def test_simple_mode_clears_audio_codes(self): method test_repaint_mode_clears_audio_codes (line 64) | def test_repaint_mode_clears_audio_codes(self): method test_custom_mode_clears_src_audio (line 70) | def test_custom_mode_clears_src_audio(self): method test_simple_mode_clears_src_audio (line 76) | def test_simple_mode_clears_src_audio(self): method test_remix_mode_preserves_src_audio (line 82) | def test_remix_mode_preserves_src_audio(self): method test_repaint_mode_preserves_src_audio (line 89) | def test_repaint_mode_preserves_src_audio(self): method test_round_trip_remix_to_custom_clears_both (line 95) | def test_round_trip_remix_to_custom_clears_both(self): method test_repaint_to_custom_clears_audio_codes (line 111) | def test_repaint_to_custom_clears_audio_codes(self): method test_simple_to_custom_preserves_audio_codes (line 118) | def test_simple_to_custom_preserves_audio_codes(self): method test_round_trip_custom_to_remix_clears_codes (line 125) | def test_round_trip_custom_to_remix_clears_codes(self): method test_remix_mode_forces_think_checkbox_off (line 131) | def test_remix_mode_forces_think_checkbox_off(self): method test_repaint_mode_forces_think_checkbox_off (line 139) | def test_repaint_mode_forces_think_checkbox_off(self): method test_remix_to_custom_restores_think_checkbox (line 147) | def test_remix_to_custom_restores_think_checkbox(self): method test_repaint_to_custom_restores_think_checkbox (line 161) | def test_repaint_to_custom_restores_think_checkbox(self): method test_remix_to_simple_restores_think_checkbox (line 168) | def test_remix_to_simple_restores_think_checkbox(self): method test_no_lm_keeps_think_checkbox_off (line 175) | def test_no_lm_keeps_think_checkbox_off(self): method test_non_extract_modes_do_not_force_auto_fields_interactive (line 183) | def test_non_extract_modes_do_not_force_auto_fields_interactive(self): method test_leaving_extract_sets_auto_fields_non_interactive (line 189) | def test_leaving_extract_sets_auto_fields_non_interactive(self): FILE: acestep/ui/gradio/events/generation/model_config.py function _has_token (line 20) | def _has_token(token: str, path: str) -> bool: function is_pure_base_model (line 29) | def is_pure_base_model(config_path_lower: str) -> bool: function update_model_type_settings (line 45) | def update_model_type_settings(config_path: str | None, current_mode: st... function is_sft_model (line 70) | def is_sft_model(config_path_lower: str) -> bool: function get_ui_control_config (line 82) | def get_ui_control_config(is_turbo: bool, is_pure_base: bool = False, is... function get_model_type_ui_settings (line 135) | def get_model_type_ui_settings(is_turbo: bool, current_mode: str | None ... function get_generation_mode_choices (line 173) | def get_generation_mode_choices(is_pure_base: bool = False) -> list: FILE: acestep/ui/gradio/events/generation/model_config_test.py class HasTokenTests (line 14) | class HasTokenTests(unittest.TestCase): method test_token_with_hyphens (line 17) | def test_token_with_hyphens(self): method test_token_at_start (line 21) | def test_token_at_start(self): method test_token_at_end (line 25) | def test_token_at_end(self): method test_token_alone (line 29) | def test_token_alone(self): method test_token_with_dots (line 33) | def test_token_with_dots(self): method test_token_with_underscores (line 37) | def test_token_with_underscores(self): method test_token_embedded_rejected (line 41) | def test_token_embedded_rejected(self): class IsSftModelTests (line 47) | class IsSftModelTests(unittest.TestCase): method test_sft_model_detected (line 50) | def test_sft_model_detected(self): method test_turbo_model_not_sft (line 54) | def test_turbo_model_not_sft(self): method test_base_model_not_sft (line 58) | def test_base_model_not_sft(self): method test_substring_inside_larger_word_rejected (line 62) | def test_substring_inside_larger_word_rejected(self): method test_unrelated_path_not_sft (line 69) | def test_unrelated_path_not_sft(self): class IsPureBaseModelTests (line 74) | class IsPureBaseModelTests(unittest.TestCase): method test_base_model_detected (line 77) | def test_base_model_detected(self): method test_sft_model_not_base (line 81) | def test_sft_model_not_base(self): method test_turbo_model_not_base (line 85) | def test_turbo_model_not_base(self): method test_substring_inside_larger_word_rejected (line 89) | def test_substring_inside_larger_word_rejected(self): method test_unrelated_path_not_base (line 96) | def test_unrelated_path_not_base(self): class GetUiControlConfigTests (line 101) | class GetUiControlConfigTests(unittest.TestCase): method test_sft_model_returns_50_steps (line 104) | def test_sft_model_returns_50_steps(self): method test_base_model_returns_32_steps (line 109) | def test_base_model_returns_32_steps(self): method test_turbo_model_returns_8_steps (line 114) | def test_turbo_model_returns_8_steps(self): method test_turbo_takes_precedence_over_sft (line 119) | def test_turbo_takes_precedence_over_sft(self): class UpdateModelTypeSettingsIntegrationTests (line 125) | class UpdateModelTypeSettingsIntegrationTests(unittest.TestCase): method test_sft_path_produces_50_steps (line 128) | def test_sft_path_produces_50_steps(self): method test_turbo_path_produces_8_steps (line 134) | def test_turbo_path_produces_8_steps(self): method test_base_path_produces_32_steps (line 139) | def test_base_path_produces_32_steps(self): method test_none_path_does_not_crash (line 144) | def test_none_path_does_not_crash(self): method test_substring_no_false_positive_end_to_end (line 149) | def test_substring_no_false_positive_end_to_end(self): FILE: acestep/ui/gradio/events/generation/service_init.py function _select_quantization_value (line 20) | def _select_quantization_value( function refresh_checkpoints (line 48) | def refresh_checkpoints(dit_handler): function init_service_wrapper (line 54) | def init_service_wrapper( function on_tier_change (line 216) | def on_tier_change(selected_tier, llm_handler=None): FILE: acestep/ui/gradio/events/generation/service_init_test.py class InitServiceWrapperPathTests (line 10) | class InitServiceWrapperPathTests(unittest.TestCase): method _import_module (line 13) | def _import_module(self): method test_passes_project_root_not_checkpoint_dir (line 19) | def test_passes_project_root_not_checkpoint_dir(self, mock_gpu_config): method test_project_root_is_consistent_with_checkpoint_dir (line 81) | def test_project_root_is_consistent_with_checkpoint_dir(self, mock_gpu... class InitServiceWrapperDeviceResolutionTests (line 130) | class InitServiceWrapperDeviceResolutionTests(unittest.TestCase): method _import_module (line 139) | def _import_module(self): method test_reinit_without_llm_preserves_resolved_device (line 145) | def test_reinit_without_llm_preserves_resolved_device(self, mock_gpu_c... method test_init_llm_with_auto_device_calls_initialize (line 202) | def test_init_llm_with_auto_device_calls_initialize(self, mock_gpu_con... class QuantizationSelectionTests (line 256) | class QuantizationSelectionTests(unittest.TestCase): method _import_module (line 259) | def _import_module(self): method test_select_quantization_value_uses_dynamic_mode_for_pre_ampere_cuda (line 264) | def test_select_quantization_value_uses_dynamic_mode_for_pre_ampere_cu... method test_select_quantization_value_keeps_default_when_torch_import_fails (line 278) | def test_select_quantization_value_keeps_default_when_torch_import_fai... FILE: acestep/ui/gradio/events/generation/ui_helpers.py function update_negative_prompt_visibility (line 14) | def update_negative_prompt_visibility(init_llm_checked): function on_auto_checkbox_change (line 29) | def on_auto_checkbox_change(auto_checked: bool, field_name: str): function reset_all_auto (line 44) | def reset_all_auto(): function uncheck_auto_for_populated_fields (line 64) | def uncheck_auto_for_populated_fields(bpm, key_scale, time_signature, vo... function update_audio_cover_strength_visibility (line 101) | def update_audio_cover_strength_visibility(task_type_value, init_llm_che... function convert_src_audio_to_codes_wrapper (line 120) | def convert_src_audio_to_codes_wrapper(dit_handler, src_audio): function update_instruction_ui (line 126) | def update_instruction_ui( function update_transcribe_button_text (line 148) | def update_transcribe_button_text(audio_code_string): function reset_format_caption_flag (line 156) | def reset_format_caption_flag(): function update_audio_uploads_accordion (line 161) | def update_audio_uploads_accordion(reference_audio, src_audio): function handle_instrumental_checkbox (line 167) | def handle_instrumental_checkbox(instrumental_checked, current_lyrics, s... function handle_simple_instrumental_change (line 183) | def handle_simple_instrumental_change(is_instrumental: bool): function update_audio_components_visibility (line 198) | def update_audio_components_visibility(batch_size): FILE: acestep/ui/gradio/events/generation/validation.py function clamp_duration_to_gpu_limit (line 16) | def clamp_duration_to_gpu_limit(duration_value: Optional[float], llm_han... function parse_and_validate_timesteps (line 39) | def parse_and_validate_timesteps( function _has_reference_audio (line 80) | def _has_reference_audio(reference_audio) -> bool: function _extract_audio_path (line 91) | def _extract_audio_path(audio_value: Any) -> Optional[str]: function validate_uploaded_audio_file (line 108) | def validate_uploaded_audio_file(audio_value: Any, audio_role: str = "re... function _contains_audio_code_tokens (line 135) | def _contains_audio_code_tokens(codes_string: str) -> bool: FILE: acestep/ui/gradio/events/generation_handlers_test.py class _FakeDitHandler (line 17) | class _FakeDitHandler: method __init__ (line 20) | def __init__(self, convert_result): method convert_src_audio_to_codes (line 25) | def convert_src_audio_to_codes(self, _src_audio): class GenerationHandlersTests (line 31) | class GenerationHandlersTests(unittest.TestCase): method test_analyze_src_audio_rejects_non_audio_code_output (line 36) | def test_analyze_src_audio_rejects_non_audio_code_output( method test_analyze_src_audio_allows_valid_audio_code_output (line 65) | def test_analyze_src_audio_allows_valid_audio_code_output( method test_init_service_wrapper_preserves_batch_size (line 99) | def test_init_service_wrapper_preserves_batch_size( method test_init_service_wrapper_defaults_batch_size_when_none (line 156) | def test_init_service_wrapper_defaults_batch_size_when_none( method test_validate_uploaded_audio_file_returns_none_for_invalid_file (line 211) | def test_validate_uploaded_audio_file_returns_none_for_invalid_file( method test_validate_uploaded_audio_file_keeps_valid_file (line 224) | def test_validate_uploaded_audio_file_keeps_valid_file( method test_validate_uploaded_audio_file_shows_source_role_message (line 237) | def test_validate_uploaded_audio_file_shows_source_role_message( method test_handle_create_sample_success_path (line 254) | def test_handle_create_sample_success_path( method test_handle_format_caption_lm_not_initialized_regression (line 298) | def test_handle_format_caption_lm_not_initialized_regression(self, war... method test_handle_format_lyrics_strips_quotes (line 321) | def test_handle_format_lyrics_strips_quotes(self, format_sample_mock, ... method test_handle_format_sample_preserves_output_contract (line 359) | def test_handle_format_sample_preserves_output_contract(self, format_s... class LoadMetadataLmCodesTests (line 396) | class LoadMetadataLmCodesTests(unittest.TestCase): method _write_json (line 399) | def _write_json(self, tmpdir, data): method test_think_set_false_when_audio_codes_present (line 409) | def test_think_set_false_when_audio_codes_present(self, gpu_mock, info... method test_think_unchanged_when_audio_codes_empty (line 434) | def test_think_unchanged_when_audio_codes_empty(self, gpu_mock, info_m... class AutoCheckboxTests (line 456) | class AutoCheckboxTests(unittest.TestCase): method test_on_auto_checkbox_change_checked_returns_default_and_non_interactive (line 459) | def test_on_auto_checkbox_change_checked_returns_default_and_non_inter... method test_on_auto_checkbox_change_unchecked_returns_interactive (line 466) | def test_on_auto_checkbox_change_unchecked_returns_interactive(self): method test_on_auto_checkbox_change_all_fields (line 471) | def test_on_auto_checkbox_change_all_fields(self): method test_reset_all_auto_returns_correct_count (line 485) | def test_reset_all_auto_returns_correct_count(self): method test_reset_all_auto_checkboxes_are_true (line 490) | def test_reset_all_auto_checkboxes_are_true(self): method test_reset_all_auto_fields_are_defaults (line 496) | def test_reset_all_auto_fields_are_defaults(self): method test_uncheck_auto_for_populated_fields_all_default (line 505) | def test_uncheck_auto_for_populated_fields_all_default(self): method test_uncheck_auto_for_populated_fields_all_populated (line 519) | def test_uncheck_auto_for_populated_fields_all_populated(self): method test_uncheck_auto_for_populated_fields_mixed (line 532) | def test_uncheck_auto_for_populated_fields_mixed(self): FILE: acestep/ui/gradio/events/results/_batch_management_test_support.py function build_progress_result (line 16) | def build_progress_result(*, length: int = 48, all_audio_paths: Any = _M... function load_batch_management_module (line 36) | def load_batch_management_module( FILE: acestep/ui/gradio/events/results/audio_playback_updates.py function build_audio_slot_update (line 10) | def build_audio_slot_update( FILE: acestep/ui/gradio/events/results/audio_playback_updates_test.py function _load_module (line 8) | def _load_module(): class _FakeGr (line 21) | class _FakeGr: method update (line 25) | def update(**kwargs): class AudioPlaybackUpdatesTests (line 30) | class AudioPlaybackUpdatesTests(unittest.TestCase): method test_build_audio_slot_update_sets_value_and_rewinds (line 33) | def test_build_audio_slot_update_sets_value_and_rewinds(self): method test_build_audio_slot_update_clear_path_rewinds (line 47) | def test_build_audio_slot_update_clear_path_rewinds(self): method test_build_audio_slot_update_without_optional_flags_preserves_defaults (line 53) | def test_build_audio_slot_update_without_optional_flags_preserves_defa... FILE: acestep/ui/gradio/events/results/audio_transfer.py function send_audio_to_src_with_metadata (line 12) | def send_audio_to_src_with_metadata(audio_file, lm_metadata): function _extract_metadata_for_editing (line 41) | def _extract_metadata_for_editing(lm_metadata, current_lyrics="", curren... function send_audio_to_remix (line 60) | def send_audio_to_remix(audio_file, lm_metadata, current_lyrics, current... function send_audio_to_repaint (line 90) | def send_audio_to_repaint(audio_file, lm_metadata, current_lyrics, curre... function convert_result_audio_to_codes (line 120) | def convert_result_audio_to_codes(dit_handler, generated_audio): FILE: acestep/ui/gradio/events/results/batch_management_background.py function generate_next_batch_background (line 20) | def generate_next_batch_background( FILE: acestep/ui/gradio/events/results/batch_management_background_test.py class BatchManagementBackgroundTests (line 10) | class BatchManagementBackgroundTests(unittest.TestCase): method test_autogen_disabled_returns_noop_state (line 13) | def test_autogen_disabled_returns_noop_state(self): method test_precompleted_next_batch_returns_ready (line 32) | def test_precompleted_next_batch_returns_ready(self): method test_background_generation_success_stores_batch (line 52) | def test_background_generation_success_stores_batch(self): method test_background_auto_lrc_copies_lrc_fields (line 77) | def test_background_auto_lrc_copies_lrc_fields(self): method test_background_generation_exception_sets_error_entry (line 104) | def test_background_generation_exception_sets_error_entry(self): method test_background_empty_generator_sets_error_entry (line 129) | def test_background_empty_generator_sets_error_entry(self): method test_mps_cache_cleared_before_generation_on_mac (line 159) | def test_mps_cache_cleared_before_generation_on_mac(self): method test_mps_cache_not_called_when_mps_unavailable (line 185) | def test_mps_cache_not_called_when_mps_unavailable(self): FILE: acestep/ui/gradio/events/results/batch_management_helpers.py function _extract_ui_core_outputs (line 10) | def _extract_ui_core_outputs(result_tuple): function _build_saved_params (line 20) | def _build_saved_params( function _log_background_params (line 75) | def _log_background_params(params, next_batch_idx): function _apply_param_defaults (line 92) | def _apply_param_defaults(params): function _extract_scores (line 128) | def _extract_scores(final_result): FILE: acestep/ui/gradio/events/results/batch_management_helpers_test.py class _ValueWrapper (line 8) | class _ValueWrapper: method __init__ (line 11) | def __init__(self, value): class BatchManagementHelperTests (line 16) | class BatchManagementHelperTests(unittest.TestCase): method test_extract_ui_core_outputs_trims_to_46 (line 19) | def test_extract_ui_core_outputs_trims_to_46(self): method test_extract_ui_core_outputs_keeps_short_tuples (line 28) | def test_extract_ui_core_outputs_keeps_short_tuples(self): method test_build_saved_params_keeps_input_fields (line 34) | def test_build_saved_params_keeps_input_fields(self): method test_apply_param_defaults_adds_missing_without_overwrite (line 96) | def test_apply_param_defaults_adds_missing_without_overwrite(self): method test_extract_scores_handles_wrapped_values_and_missing_indices (line 110) | def test_extract_scores_handles_wrapped_values_and_missing_indices(self): method test_log_background_params_records_messages (line 124) | def test_log_background_params_records_messages(self): FILE: acestep/ui/gradio/events/results/batch_management_test.py function _build_call_kwargs (line 11) | def _build_call_kwargs(module): class BatchManagementWrapperTests (line 34) | class BatchManagementWrapperTests(unittest.TestCase): method test_non_windows_streams_partial_and_final_outputs (line 37) | def test_non_windows_streams_partial_and_final_outputs(self): method test_windows_emits_only_final_output (line 56) | def test_windows_emits_only_final_output(self): method test_all_audio_paths_none_skips_batch_storage (line 72) | def test_all_audio_paths_none_skips_batch_storage(self): method test_allow_lm_batch_stores_multiple_codes (line 88) | def test_allow_lm_batch_stores_multiple_codes(self): method test_auto_lrc_copies_lrc_fields_to_batch_queue (line 106) | def test_auto_lrc_copies_lrc_fields_to_batch_queue(self): method test_auto_lrc_sets_lrc_display_in_final_yield (line 129) | def test_auto_lrc_sets_lrc_display_in_final_yield(self): method test_auto_lrc_disabled_preserves_passthrough_values (line 156) | def test_auto_lrc_disabled_preserves_passthrough_values(self): method test_empty_inner_generator_returns_skip_tuple_and_warning (line 174) | def test_empty_inner_generator_returns_skip_tuple_and_warning(self): method test_foreground_scores_passed_to_store_batch_in_queue (line 198) | def test_foreground_scores_passed_to_store_batch_in_queue(self): method test_foreground_scores_default_empty_when_absent (line 219) | def test_foreground_scores_default_empty_when_absent(self): method test_mps_cache_cleared_before_and_after_generation_on_mac (line 240) | def test_mps_cache_cleared_before_and_after_generation_on_mac(self): method test_mps_cache_not_called_when_mps_unavailable (line 259) | def test_mps_cache_not_called_when_mps_unavailable(self): FILE: acestep/ui/gradio/events/results/batch_management_wrapper.py function generate_with_batch_management (line 25) | def generate_with_batch_management( FILE: acestep/ui/gradio/events/results/batch_navigation.py function navigate_to_previous_batch (line 24) | def navigate_to_previous_batch(current_batch_index, batch_queue): function navigate_to_next_batch (line 87) | def navigate_to_next_batch(autogen_enabled, current_batch_index, total_b... function _build_detail_updates (line 163) | def _build_detail_updates(batch_data, lrc_displays): FILE: acestep/ui/gradio/events/results/batch_navigation_test.py function _make_batch (line 11) | def _make_batch(audio_path="/tmp/audio.flac"): class NavigateToNextBatchTests (line 31) | class NavigateToNextBatchTests(unittest.TestCase): method _run_first_yield (line 34) | def _run_first_yield(self, gen): method test_stale_total_batches_allows_navigation (line 38) | def test_stale_total_batches_allows_navigation(self, _mock_t, mock_gr): method test_no_next_batch_when_truly_last (line 62) | def test_no_next_batch_when_truly_last(self, _mock_t, mock_gr): method test_batch_not_in_queue (line 82) | def test_batch_not_in_queue(self, _mock_t, mock_gr): FILE: acestep/ui/gradio/events/results/batch_queue.py function store_batch_in_queue (line 14) | def store_batch_in_queue( function update_batch_indicator (line 74) | def update_batch_indicator(current_batch, total_batches): function update_navigation_buttons (line 79) | def update_navigation_buttons(current_batch, total_batches): function capture_current_params (line 88) | def capture_current_params( function restore_batch_parameters (line 164) | def restore_batch_parameters(current_batch_index, batch_queue): FILE: acestep/ui/gradio/events/results/batch_queue_test.py class UpdateNavigationButtonsTests (line 12) | class UpdateNavigationButtonsTests(unittest.TestCase): method test_first_batch (line 15) | def test_first_batch(self): method test_last_batch (line 21) | def test_last_batch(self): method test_middle_batch (line 27) | def test_middle_batch(self): method test_single_batch (line 33) | def test_single_batch(self): class StoreBatchInQueueTests (line 40) | class StoreBatchInQueueTests(unittest.TestCase): method test_store_first_batch (line 43) | def test_store_first_batch(self): method test_store_preserves_existing_batches (line 58) | def test_store_preserves_existing_batches(self): method test_store_with_scores_and_codes (line 80) | def test_store_with_scores_and_codes(self): method test_store_defaults_scores_to_empty (line 95) | def test_store_defaults_scores_to_empty(self): method test_store_offloads_previous_extra_outputs_tensors_to_cpu (line 107) | def test_store_offloads_previous_extra_outputs_tensors_to_cpu(self): method test_store_offloads_cuda_tensor_to_cpu (line 133) | def test_store_offloads_cuda_tensor_to_cpu(self): method test_store_offloads_only_previous_batch_cuda_tensors (line 157) | def test_store_offloads_only_previous_batch_cuda_tensors(self): method test_store_first_batch_no_prev_cleanup (line 177) | def test_store_first_batch_no_prev_cleanup(self): method test_store_preserves_non_tensor_extra_outputs (line 189) | def test_store_preserves_non_tensor_extra_outputs(self): FILE: acestep/ui/gradio/events/results/generation_info.py function clear_audio_outputs_for_new_generation (line 25) | def clear_audio_outputs_for_new_generation(): function _build_generation_info (line 43) | def _build_generation_info( FILE: acestep/ui/gradio/events/results/generation_info_test.py function _load_module (line 13) | def _load_module(): class ConstantsTests (line 50) | class ConstantsTests(unittest.TestCase): method test_project_root_exists (line 53) | def test_project_root_exists(self): method test_default_results_dir_is_under_project_root (line 57) | def test_default_results_dir_is_under_project_root(self): class ClearAudioOutputsTests (line 66) | class ClearAudioOutputsTests(unittest.TestCase): method test_returns_nine_nones (line 69) | def test_returns_nine_nones(self): method test_gradio_runtime_rewinds_audio_but_clears_batch_files (line 86) | def test_gradio_runtime_rewinds_audio_but_clears_batch_files(self): class BuildGenerationInfoTests (line 96) | class BuildGenerationInfoTests(unittest.TestCase): method test_basic_generation_info (line 99) | def test_basic_generation_info(self): method test_empty_time_costs_returns_empty (line 117) | def test_empty_time_costs_returns_empty(self): method test_zero_audios_returns_empty (line 128) | def test_zero_audios_returns_empty(self): method test_non_target_behavior_unchanged (line 139) | def test_non_target_behavior_unchanged(self): FILE: acestep/ui/gradio/events/results/generation_progress.py function generate_with_progress (line 36) | def generate_with_progress( function _extract_sample_tensor (line 372) | def _extract_sample_tensor(extra_outputs, sample_idx): function _run_auto_lrc (line 400) | def _run_auto_lrc(dit_handler, extra_outputs, sample_idx, FILE: acestep/ui/gradio/events/results/lrc_utils.py function parse_lrc_to_subtitles (line 21) | def parse_lrc_to_subtitles(lrc_text: str, total_duration: Optional[float... function _format_vtt_timestamp (line 120) | def _format_vtt_timestamp(seconds: float) -> str: function lrc_to_vtt_file (line 129) | def lrc_to_vtt_file(lrc_text: str, total_duration: float = None) -> Opti... function update_audio_subtitles_from_lrc (line 168) | def update_audio_subtitles_from_lrc(lrc_text: str, audio_duration: float... function save_lrc_to_file (line 184) | def save_lrc_to_file(lrc_text): function generate_lrc_handler (line 208) | def generate_lrc_handler(dit_handler, sample_idx, current_batch_index, b... FILE: acestep/ui/gradio/events/results/lrc_utils_test.py class ParseLrcToSubtitlesTests (line 12) | class ParseLrcToSubtitlesTests(unittest.TestCase): method test_empty_input_returns_empty_list (line 15) | def test_empty_input_returns_empty_list(self): method test_single_line (line 21) | def test_single_line(self): method test_multiple_lines (line 30) | def test_multiple_lines(self): method test_lines_without_timestamps_are_ignored (line 40) | def test_lines_without_timestamps_are_ignored(self): method test_empty_text_lines_are_ignored (line 47) | def test_empty_text_lines_are_ignored(self): method test_three_digit_centiseconds (line 54) | def test_three_digit_centiseconds(self): method test_two_digit_centiseconds (line 62) | def test_two_digit_centiseconds(self): method test_subtitle_has_timestamp_pair (line 70) | def test_subtitle_has_timestamp_pair(self): class FormatVttTimestampTests (line 80) | class FormatVttTimestampTests(unittest.TestCase): method test_zero_seconds (line 83) | def test_zero_seconds(self): method test_simple_seconds (line 87) | def test_simple_seconds(self): method test_hours (line 92) | def test_hours(self): class SaveLrcToFileTests (line 98) | class SaveLrcToFileTests(unittest.TestCase): method test_empty_lrc_returns_skip (line 101) | def test_empty_lrc_returns_skip(self): method test_none_lrc_returns_skip (line 106) | def test_none_lrc_returns_skip(self): method test_valid_lrc_returns_update_dict (line 111) | def test_valid_lrc_returns_update_dict(self): FILE: acestep/ui/gradio/events/results/scoring.py function calculate_score_handler (line 13) | def calculate_score_handler( function calculate_score_handler_with_selection (line 165) | def calculate_score_handler_with_selection( FILE: acestep/ui/gradio/events/results_handlers_facade_test.py class FacadeReExportTests (line 12) | class FacadeReExportTests(unittest.TestCase): method test_all_expected_symbols_are_importable (line 53) | def test_all_expected_symbols_are_importable(self): method test_symbols_are_callable_or_constant (line 62) | def test_symbols_are_callable_or_constant(self): FILE: acestep/ui/gradio/events/training/dataset_ops.py function scan_directory (line 16) | def scan_directory( function auto_label_all (line 54) | def auto_label_all( function get_sample_preview (line 120) | def get_sample_preview( function save_sample_edit (line 173) | def save_sample_edit( function update_settings (line 224) | def update_settings( function save_dataset (line 248) | def save_dataset( FILE: acestep/ui/gradio/events/training/dataset_ops_test.py class TestGetSamplePreview (line 14) | class TestGetSamplePreview(unittest.TestCase): method test_none_builder_returns_empty (line 17) | def test_none_builder_returns_empty(self): method test_empty_samples_returns_empty (line 23) | def test_empty_samples_returns_empty(self): method test_none_index_returns_empty (line 29) | def test_none_index_returns_empty(self): method test_out_of_range_index_returns_empty (line 35) | def test_out_of_range_index_returns_empty(self): method test_valid_sample_returns_data (line 41) | def test_valid_sample_returns_data(self): class TestUpdateSettings (line 68) | class TestUpdateSettings(unittest.TestCase): method test_none_builder_returns_none (line 71) | def test_none_builder_returns_none(self): method test_updates_genre_ratio (line 75) | def test_updates_genre_ratio(self): class TestSaveDataset (line 82) | class TestSaveDataset(unittest.TestCase): method test_none_builder (line 85) | def test_none_builder(self): method test_empty_samples (line 89) | def test_empty_samples(self): method test_empty_path (line 95) | def test_empty_path(self): FILE: acestep/ui/gradio/events/training/lokr_training.py function start_lokr_training (line 20) | def start_lokr_training( function list_lokr_export_epochs (line 202) | def list_lokr_export_epochs(lokr_output_dir: str) -> Tuple[Any, str]: function export_lokr (line 257) | def export_lokr( FILE: acestep/ui/gradio/events/training/lora_training.py function start_training (line 23) | def start_training( function stop_training (line 243) | def stop_training(training_state: Dict) -> Tuple[str, Dict]: function export_lora (line 256) | def export_lora(export_path: str, lora_output_dir: str) -> str: FILE: acestep/ui/gradio/events/training/preprocess.py function load_existing_dataset_for_preprocess (line 20) | def load_existing_dataset_for_preprocess( function preprocess_dataset (line 144) | def preprocess_dataset( function load_training_dataset (line 197) | def load_training_dataset(tensor_dir: str) -> str: FILE: acestep/ui/gradio/events/training/preprocess_test.py class TestLoadTrainingDataset (line 15) | class TestLoadTrainingDataset(unittest.TestCase): method test_empty_path (line 18) | def test_empty_path(self): method test_nonexistent_path (line 22) | def test_nonexistent_path(self): method test_with_manifest (line 26) | def test_with_manifest(self): method test_without_manifest (line 41) | def test_without_manifest(self): method test_no_pt_files (line 51) | def test_no_pt_files(self): class TestPreprocessDataset (line 57) | class TestPreprocessDataset(unittest.TestCase): method test_none_builder (line 60) | def test_none_builder(self): method test_empty_samples (line 64) | def test_empty_samples(self): method test_no_labeled_samples (line 70) | def test_no_labeled_samples(self): method test_empty_output_dir (line 77) | def test_empty_output_dir(self): method test_no_model (line 84) | def test_no_model(self): FILE: acestep/ui/gradio/events/training/training_facade_test.py class TestTrainingFacadeExports (line 38) | class TestTrainingFacadeExports(unittest.TestCase): method test_all_symbols_present (line 41) | def test_all_symbols_present(self): method test_callable_symbols (line 49) | def test_callable_symbols(self): FILE: acestep/ui/gradio/events/training/training_utils.py function create_dataset_builder (line 23) | def create_dataset_builder(): function _safe_slider (line 32) | def _safe_slider( function _safe_join (line 48) | def _safe_join(base_root: str, user_path: str) -> Optional[str]: function _format_duration (line 66) | def _format_duration(seconds: float) -> str: function _training_loss_figure (line 77) | def _training_loss_figure( FILE: acestep/ui/gradio/events/training/training_utils_test.py class TestFormatDuration (line 15) | class TestFormatDuration(unittest.TestCase): method test_seconds_only (line 18) | def test_seconds_only(self): method test_minutes_and_seconds (line 21) | def test_minutes_and_seconds(self): method test_hours (line 24) | def test_hours(self): method test_zero (line 27) | def test_zero(self): class TestSafeJoin (line 31) | class TestSafeJoin(unittest.TestCase): method test_valid_relative_path (line 34) | def test_valid_relative_path(self): method test_absolute_path_rejected (line 40) | def test_absolute_path_rejected(self): method test_traversal_rejected (line 44) | def test_traversal_rejected(self): method test_empty_path (line 48) | def test_empty_path(self): method test_none_path (line 52) | def test_none_path(self): class TestSafeSlider (line 57) | class TestSafeSlider(unittest.TestCase): method test_minimum_max_value (line 60) | def test_minimum_max_value(self): method test_with_visible (line 65) | def test_with_visible(self): class TestTrainingLossFigure (line 70) | class TestTrainingLossFigure(unittest.TestCase): method test_empty_data_returns_figure (line 73) | def test_empty_data_returns_figure(self): method test_with_data_returns_figure (line 77) | def test_with_data_returns_figure(self): method test_with_ema_and_validation (line 85) | def test_with_ema_and_validation(self): class TestSafeTrainingRoot (line 100) | class TestSafeTrainingRoot(unittest.TestCase): method test_is_absolute (line 103) | def test_is_absolute(self): FILE: acestep/ui/gradio/events/wiring/ast_test_utils.py function load_module_ast (line 7) | def load_module_ast(module_path: Path) -> ast.Module: function subscript_key (line 13) | def subscript_key(node: ast.Subscript) -> str | None: FILE: acestep/ui/gradio/events/wiring/context.py class GenerationWiringContext (line 86) | class GenerationWiringContext: class TrainingWiringContext (line 99) | class TrainingWiringContext: function build_auto_checkbox_outputs (line 108) | def build_auto_checkbox_outputs(context: GenerationWiringContext) -> lis... function build_auto_checkbox_inputs (line 115) | def build_auto_checkbox_inputs(context: GenerationWiringContext) -> list... function build_mode_ui_outputs (line 122) | def build_mode_ui_outputs(context: GenerationWiringContext) -> list[Any]: FILE: acestep/ui/gradio/events/wiring/context_test.py function _load_context_module (line 79) | def _load_context_module(): class GenerationWiringContextTests (line 98) | class GenerationWiringContextTests(unittest.TestCase): method setUp (line 101) | def setUp(self): method test_build_auto_checkbox_outputs_uses_expected_order (line 115) | def test_build_auto_checkbox_outputs_uses_expected_order(self): method test_build_auto_checkbox_inputs_uses_expected_order (line 119) | def test_build_auto_checkbox_inputs_uses_expected_order(self): method test_build_mode_ui_outputs_uses_expected_order (line 123) | def test_build_mode_ui_outputs_uses_expected_order(self): class TrainingWiringContextTests (line 128) | class TrainingWiringContextTests(unittest.TestCase): method test_training_context_keeps_training_section_reference (line 131) | def test_training_context_keeps_training_section_reference(self): FILE: acestep/ui/gradio/events/wiring/decomposition_contract_generation_test.py class DecompositionContractGenerationTests (line 28) | class DecompositionContractGenerationTests(unittest.TestCase): method test_setup_event_handlers_uses_generation_wiring_helpers (line 31) | def test_setup_event_handlers_uses_generation_wiring_helpers(self): method test_generation_metadata_file_wiring_calls_expected_handlers (line 53) | def test_generation_metadata_file_wiring_calls_expected_handlers(self): method test_generation_mode_wiring_uses_mode_ui_outputs_variable (line 65) | def test_generation_mode_wiring_uses_mode_ui_outputs_variable(self): method test_generation_run_wiring_calls_expected_results_handlers (line 87) | def test_generation_run_wiring_calls_expected_results_handlers(self): method test_batch_navigation_wiring_calls_expected_results_handlers (line 105) | def test_batch_navigation_wiring_calls_expected_results_handlers(self): method test_results_display_wiring_calls_expected_results_handlers (line 124) | def test_results_display_wiring_calls_expected_results_handlers(self): FILE: acestep/ui/gradio/events/wiring/decomposition_contract_helpers.py function load_setup_event_handlers_node (line 29) | def load_setup_event_handlers_node() -> ast.FunctionDef: function load_setup_training_event_handlers_node (line 40) | def load_setup_training_event_handlers_node() -> ast.FunctionDef: function load_generation_mode_wiring_node (line 51) | def load_generation_mode_wiring_node() -> ast.FunctionDef: function load_generation_metadata_file_wiring_module (line 62) | def load_generation_metadata_file_wiring_module() -> ast.Module: function load_generation_run_wiring_node (line 69) | def load_generation_run_wiring_node() -> ast.FunctionDef: function load_generation_batch_navigation_wiring_node (line 80) | def load_generation_batch_navigation_wiring_node() -> ast.FunctionDef: function load_results_display_wiring_module (line 91) | def load_results_display_wiring_module() -> ast.Module: function load_training_run_wiring_module (line 98) | def load_training_run_wiring_module() -> ast.Module: function load_training_lokr_wiring_module (line 105) | def load_training_lokr_wiring_module() -> ast.Module: function load_training_dataset_preprocess_wiring_module (line 112) | def load_training_dataset_preprocess_wiring_module() -> ast.Module: function load_training_dataset_builder_wiring_module (line 119) | def load_training_dataset_builder_wiring_module() -> ast.Module: function call_name (line 126) | def call_name(node: ast.AST) -> str | None: FILE: acestep/ui/gradio/events/wiring/decomposition_contract_training_test.py class DecompositionContractTrainingTests (line 26) | class DecompositionContractTrainingTests(unittest.TestCase): method test_setup_training_event_handlers_uses_training_run_wiring_helper (line 29) | def test_setup_training_event_handlers_uses_training_run_wiring_helper... method test_training_run_wiring_calls_expected_training_handlers (line 45) | def test_training_run_wiring_calls_expected_training_handlers(self): method test_training_dataset_builder_wiring_calls_expected_handlers (line 73) | def test_training_dataset_builder_wiring_calls_expected_handlers(self): method test_training_dataset_preprocess_wiring_calls_expected_handlers (line 93) | def test_training_dataset_preprocess_wiring_calls_expected_handlers(se... FILE: acestep/ui/gradio/events/wiring/docstring_coverage_test.py function _collect_nodes_missing_docstrings (line 19) | def _collect_nodes_missing_docstrings(module: ast.Module) -> list[str]: class DocstringCoverageTests (line 38) | class DocstringCoverageTests(unittest.TestCase): method test_module_and_symbol_docstrings_are_present (line 41) | def test_module_and_symbol_docstrings_are_present(self): FILE: acestep/ui/gradio/events/wiring/generation_batch_navigation_wiring.py function _build_navigation_outputs (line 13) | def _build_navigation_outputs(results_section: dict[str, Any], include_n... function _build_capture_current_params_inputs (line 91) | def _build_capture_current_params_inputs(generation_section: dict[str, A... function register_generation_batch_navigation_handlers (line 167) | def register_generation_batch_navigation_handlers(context: GenerationWir... FILE: acestep/ui/gradio/events/wiring/generation_metadata_file_wiring.py function _build_load_metadata_outputs (line 50) | def _build_load_metadata_outputs(context: GenerationWiringContext) -> li... function register_generation_metadata_file_handlers (line 62) | def register_generation_metadata_file_handlers( FILE: acestep/ui/gradio/events/wiring/generation_metadata_file_wiring_test.py function _tuple_string_values (line 55) | def _tuple_string_values(node: ast.AST) -> list[str]: class GenerationMetadataFileWiringTests (line 68) | class GenerationMetadataFileWiringTests(unittest.TestCase): method test_metadata_output_key_contract_order_is_stable (line 71) | def test_metadata_output_key_contract_order_is_stable(self): method test_build_outputs_appends_format_caption_state_last (line 83) | def test_build_outputs_appends_format_caption_state_last(self): method test_register_function_references_expected_generation_handlers (line 99) | def test_register_function_references_expected_generation_handlers(self): FILE: acestep/ui/gradio/events/wiring/generation_metadata_wiring.py function register_generation_metadata_handlers (line 14) | def register_generation_metadata_handlers( FILE: acestep/ui/gradio/events/wiring/generation_mode_wiring.py function _on_repaint_mode_change (line 15) | def _on_repaint_mode_change(mode, current_strength, memory): function _on_repaint_strength_change (line 26) | def _on_repaint_strength_change(strength, current_mode): function register_generation_mode_handlers (line 37) | def register_generation_mode_handlers( FILE: acestep/ui/gradio/events/wiring/generation_run_wiring.py function register_generation_run_handlers (line 11) | def register_generation_run_handlers(context: GenerationWiringContext) -... FILE: acestep/ui/gradio/events/wiring/generation_service_wiring.py function register_generation_service_handlers (line 20) | def register_generation_service_handlers( function _apply_runtime_language (line 201) | def _apply_runtime_language(language: str) -> dict[str, Any]: FILE: acestep/ui/gradio/events/wiring/generation_service_wiring_test.py class GenerationServiceWiringTests (line 11) | class GenerationServiceWiringTests(unittest.TestCase): method test_registers_language_dropdown_change_handler (line 14) | def test_registers_language_dropdown_change_handler(self): method test_language_runtime_helper_exists (line 44) | def test_language_runtime_helper_exists(self): FILE: acestep/ui/gradio/events/wiring/generation_text_format_wiring.py function register_generation_text_format_handlers (line 12) | def register_generation_text_format_handlers( FILE: acestep/ui/gradio/events/wiring/results_aux_wiring.py function register_results_aux_handlers (line 13) | def register_results_aux_handlers( FILE: acestep/ui/gradio/events/wiring/results_display_wiring.py function register_results_save_button_handlers (line 77) | def register_results_save_button_handlers(context: GenerationWiringConte... function register_results_restore_and_lrc_handlers (line 92) | def register_results_restore_and_lrc_handlers(context: GenerationWiringC... FILE: acestep/ui/gradio/events/wiring/results_display_wiring_test.py class ResultsDisplayWiringTests (line 56) | class ResultsDisplayWiringTests(unittest.TestCase): method test_download_js_contains_expected_ascii_messages (line 59) | def test_download_js_contains_expected_ascii_messages(self): method test_restore_outputs_keep_expected_order (line 79) | def test_restore_outputs_keep_expected_order(self): method test_save_and_lrc_handlers_cover_all_8_result_slots (line 104) | def test_save_and_lrc_handlers_cover_all_8_result_slots(self): FILE: acestep/ui/gradio/events/wiring/training_dataset_builder_wiring.py function _build_sample_preview_outputs (line 38) | def _build_sample_preview_outputs(training_section: Mapping[str, Any]) -... function register_training_dataset_builder_handlers (line 44) | def register_training_dataset_builder_handlers(context: TrainingWiringCo... FILE: acestep/ui/gradio/events/wiring/training_dataset_preprocess_wiring.py function _build_dataset_load_outputs (line 37) | def _build_dataset_load_outputs( function register_training_dataset_load_handler (line 48) | def register_training_dataset_load_handler( function register_training_preprocess_handler (line 72) | def register_training_preprocess_handler(context: TrainingWiringContext)... FILE: acestep/ui/gradio/events/wiring/training_lokr_wiring.py function _build_lokr_training_wrapper (line 11) | def _build_lokr_training_wrapper( function register_lokr_training_handlers (line 68) | def register_lokr_training_handlers( FILE: acestep/ui/gradio/events/wiring/training_run_wiring.py function _normalize_training_state (line 12) | def _normalize_training_state(training_state: Any) -> dict[str, bool]: function _build_training_wrapper (line 20) | def _build_training_wrapper(dit_handler: Any): function register_training_run_handlers (line 68) | def register_training_run_handlers(context: TrainingWiringContext) -> None: FILE: acestep/ui/gradio/help_content.py function _next_id (line 18) | def _next_id() -> str: function _md_to_html (line 25) | def _md_to_html(md_text: str) -> str: function create_help_button (line 144) | def create_help_button(section_key: str) -> gr.HTML: FILE: acestep/ui/gradio/help_content_i18n_test.py class I18nHelpKeysTests (line 14) | class I18nHelpKeysTests(unittest.TestCase): method setUpClass (line 32) | def setUpClass(cls): method test_en_has_help_section (line 44) | def test_en_has_help_section(self): method test_all_languages_have_required_keys (line 48) | def test_all_languages_have_required_keys(self): method test_help_values_are_non_empty_strings (line 62) | def test_help_values_are_non_empty_strings(self): method test_i18n_t_returns_help_content (line 74) | def test_i18n_t_returns_help_content(self): FILE: acestep/ui/gradio/help_content_md_test.py class MdToHtmlTests (line 12) | class MdToHtmlTests(unittest.TestCase): method test_heading_h2 (line 15) | def test_heading_h2(self): method test_heading_h3 (line 19) | def test_heading_h3(self): method test_bold_text (line 23) | def test_bold_text(self): method test_italic_text (line 27) | def test_italic_text(self): method test_inline_code (line 31) | def test_inline_code(self): method test_unordered_list (line 35) | def test_unordered_list(self): method test_ordered_list (line 42) | def test_ordered_list(self): method test_blockquote (line 48) | def test_blockquote(self): method test_code_block (line 54) | def test_code_block(self): method test_empty_input (line 61) | def test_empty_input(self): method test_paragraph (line 65) | def test_paragraph(self): method test_list_closed_after_non_list_line (line 71) | def test_list_closed_after_non_list_line(self): method test_link_in_paragraph (line 78) | def test_link_in_paragraph(self): method test_link_in_list_item (line 85) | def test_link_in_list_item(self): method test_link_in_blockquote (line 91) | def test_link_in_blockquote(self): method test_link_in_heading (line 97) | def test_link_in_heading(self): FILE: acestep/ui/gradio/help_content_misc_test.py class NextIdTests (line 17) | class NextIdTests(unittest.TestCase): method test_ids_are_unique (line 20) | def test_ids_are_unique(self): method test_ids_are_strings (line 24) | def test_ids_are_strings(self): class HelpModalCssTests (line 29) | class HelpModalCssTests(unittest.TestCase): method test_css_not_empty (line 32) | def test_css_not_empty(self): method test_css_contains_overlay_selector (line 36) | def test_css_contains_overlay_selector(self): method test_css_contains_content_selector (line 40) | def test_css_contains_content_selector(self): method test_css_contains_close_selector (line 44) | def test_css_contains_close_selector(self): method test_css_contains_inline_btn_selector (line 48) | def test_css_contains_inline_btn_selector(self): method test_css_contains_inline_container_selector (line 52) | def test_css_contains_inline_container_selector(self): class CreateHelpButtonTests (line 57) | class CreateHelpButtonTests(unittest.TestCase): method test_create_help_button_calls_gr_html (line 60) | def test_create_help_button_calls_gr_html(self): method test_create_help_button_html_contains_modal (line 69) | def test_create_help_button_html_contains_modal(self): FILE: acestep/ui/gradio/help_content_test_helpers.py function ensure_gradio_mocked (line 7) | def ensure_gradio_mocked() -> None: FILE: acestep/ui/gradio/i18n/i18n.py class I18n (line 21) | class I18n: method __init__ (line 24) | def __init__(self, default_language: str = "en"): method _load_all_translations (line 37) | def _load_all_translations(self): method set_language (line 66) | def set_language(self, language: str): method t (line 74) | def t(self, key: str, **kwargs) -> str: method _get_nested_value (line 109) | def _get_nested_value(self, data: dict, key: str) -> Optional[str]: method get_available_languages (line 131) | def get_available_languages(self) -> list: method get_available_languages_info (line 135) | def get_available_languages_info(self) -> list[tuple[str, str, str]]: function get_i18n (line 150) | def get_i18n(language: Optional[str] = None) -> I18n: function set_language_context (line 173) | def set_language_context(language: str) -> contextvars.Token[str | None]: function reset_language_context (line 194) | def reset_language_context(token: contextvars.Token[str | None]) -> None: function t (line 199) | def t(key: str, **kwargs) -> str: function available_languages_info (line 213) | def available_languages_info() -> list[tuple[str, str, str]]: FILE: acestep/ui/gradio/i18n/i18n_thread_safety_test.py class I18nThreadSafetyTests (line 19) | class I18nThreadSafetyTests(unittest.TestCase): method test_concurrent_get_i18n_returns_same_instance (line 22) | def test_concurrent_get_i18n_returns_same_instance(self): method test_lock_attribute_exists (line 48) | def test_lock_attribute_exists(self): class ContextVarIsolationTests (line 53) | class ContextVarIsolationTests(unittest.TestCase): method setUp (line 56) | def setUp(self): method test_contextvar_overrides_instance_language (line 62) | def test_contextvar_overrides_instance_language(self): method test_contextvar_none_falls_back_to_instance (line 84) | def test_contextvar_none_falls_back_to_instance(self): method test_reset_restores_previous_value (line 94) | def test_reset_restores_previous_value(self): method test_concurrent_contexts_are_isolated (line 110) | def test_concurrent_contexts_are_isolated(self): method test_mixed_contextvar_and_fallback_threads (line 143) | def test_mixed_contextvar_and_fallback_threads(self): method test_set_language_context_warns_on_invalid_language (line 188) | def test_set_language_context_warns_on_invalid_language(self): method test_contextvar_isolation_in_copy_context (line 210) | def test_contextvar_isolation_in_copy_context(self): FILE: acestep/ui/gradio/interfaces/__init__.py function create_gradio_interface (line 40) | def create_gradio_interface(dit_handler, llm_handler, dataset_handler, i... FILE: acestep/ui/gradio/interfaces/audio_player_preferences.py function _load_preferences_script (line 9) | def _load_preferences_script() -> str: function get_audio_player_preferences_head (line 19) | def get_audio_player_preferences_head() -> str: FILE: acestep/ui/gradio/interfaces/audio_player_preferences_test.py function _load_module (line 8) | def _load_module(): class AudioPlayerPreferencesHeadTests (line 23) | class AudioPlayerPreferencesHeadTests(unittest.TestCase): method test_external_script_asset_exists (line 26) | def test_external_script_asset_exists(self): method test_script_contains_volume_persistence_and_sync_hooks (line 32) | def test_script_contains_volume_persistence_and_sync_hooks(self): method test_script_resets_audio_position_on_updates (line 52) | def test_script_resets_audio_position_on_updates(self): method test_script_seeds_sane_default_volume_when_storage_missing (line 59) | def test_script_seeds_sane_default_volume_when_storage_missing(self): method test_script_generation_is_stable (line 66) | def test_script_generation_is_stable(self): FILE: acestep/ui/gradio/interfaces/dataset.py function create_dataset_section (line 8) | def create_dataset_section(dataset_handler) -> dict: FILE: acestep/ui/gradio/interfaces/generation.py function _compute_init_defaults (line 14) | def _compute_init_defaults( function create_generation_section (line 36) | def create_generation_section( FILE: acestep/ui/gradio/interfaces/generation_advanced_dit_controls.py function build_dit_controls (line 11) | def build_dit_controls(ui_config: dict[str, Any]) -> dict[str, Any]: FILE: acestep/ui/gradio/interfaces/generation_advanced_output_controls.py function build_output_controls (line 10) | def build_output_controls( function build_automation_controls (line 121) | def build_automation_controls(service_mode: bool) -> dict[str, Any]: FILE: acestep/ui/gradio/interfaces/generation_advanced_primary_controls.py function build_lora_controls (line 10) | def build_lora_controls() -> dict[str, Any]: function build_lm_controls (line 63) | def build_lm_controls(service_mode: bool) -> dict[str, Any]: FILE: acestep/ui/gradio/interfaces/generation_advanced_settings.py function create_advanced_settings_section (line 27) | def create_advanced_settings_section( FILE: acestep/ui/gradio/interfaces/generation_contract_ast_utils.py function load_module (line 11) | def load_module(module_name: str) -> ast.Module: function call_name (line 25) | def call_name(node: ast.AST) -> str | None: function collect_return_dict_keys (line 42) | def collect_return_dict_keys(module_name: str, function_name: str) -> se... function collect_generation_section_keys_used_by_wiring (line 84) | def collect_generation_section_keys_used_by_wiring() -> set[str]: FILE: acestep/ui/gradio/interfaces/generation_decomposition_contract_test.py class GenerationDecompositionContractTests (line 22) | class GenerationDecompositionContractTests(unittest.TestCase): method test_generation_facade_imports (line 25) | def test_generation_facade_imports(self): method test_generation_facade_merges_sections (line 38) | def test_generation_facade_merges_sections(self): method test_generation_facade_exposes_required_public_symbols (line 57) | def test_generation_facade_exposes_required_public_symbols(self): method test_advanced_settings_section_delegates_to_control_builders (line 73) | def test_advanced_settings_section_delegates_to_control_builders(self): method test_generation_tab_section_delegates_to_component_builders (line 91) | def test_generation_tab_section_delegates_to_component_builders(self): method test_service_config_section_delegates_to_row_and_toggle_helpers (line 112) | def test_service_config_section_delegates_to_row_and_toggle_helpers(se... method test_generation_keys_cover_all_wiring_generation_section_requirements (line 131) | def test_generation_keys_cover_all_wiring_generation_section_requireme... FILE: acestep/ui/gradio/interfaces/generation_defaults.py function compute_init_defaults (line 10) | def compute_init_defaults( function resolve_is_pure_base_model (line 97) | def resolve_is_pure_base_model( FILE: acestep/ui/gradio/interfaces/generation_service_config.py function create_service_config_content (line 24) | def create_service_config_content( function create_service_config_section (line 108) | def create_service_config_section( FILE: acestep/ui/gradio/interfaces/generation_service_config_rows.py function build_language_selector (line 15) | def build_language_selector(current_language: str) -> dict[str, Any]: function build_gpu_info_and_tier (line 38) | def build_gpu_info_and_tier(gpu_config: Any) -> dict[str, Any]: function build_checkpoint_controls (line 66) | def build_checkpoint_controls(dit_handler: Any, service_pre_initialized:... function build_model_device_controls (line 92) | def build_model_device_controls( function build_lm_backend_controls (line 137) | def build_lm_backend_controls( FILE: acestep/ui/gradio/interfaces/generation_service_config_rows_test.py class GenerationServiceConfigRowsTests (line 11) | class GenerationServiceConfigRowsTests(unittest.TestCase): method test_language_dropdown_is_explicitly_interactive (line 14) | def test_language_dropdown_is_explicitly_interactive(self): FILE: acestep/ui/gradio/interfaces/generation_service_config_toggles.py function _mlx_avail (line 12) | def _mlx_avail() -> bool: function build_service_toggles (line 18) | def build_service_toggles( function build_service_init_controls (line 120) | def build_service_init_controls(service_pre_initialized: bool, params: d... FILE: acestep/ui/gradio/interfaces/generation_tab_generate_controls.py function _build_left_generate_toggles (line 10) | def _build_left_generate_toggles( function _build_right_generate_toggles (line 41) | def _build_right_generate_toggles(service_mode: bool) -> tuple[gr.Checkb... function build_generate_row_controls (line 67) | def build_generate_row_controls( FILE: acestep/ui/gradio/interfaces/generation_tab_optional_controls.py function build_optional_parameter_controls (line 11) | def build_optional_parameter_controls( FILE: acestep/ui/gradio/interfaces/generation_tab_optional_controls_test.py class GenerationTabOptionalControlsTests (line 18) | class GenerationTabOptionalControlsTests(unittest.TestCase): method test_optional_fields_default_to_non_interactive (line 21) | def test_optional_fields_default_to_non_interactive(self): FILE: acestep/ui/gradio/interfaces/generation_tab_primary_controls.py function build_mode_selector_controls (line 14) | def build_mode_selector_controls(initial_mode_choices: list[str]) -> dic... function build_hidden_generation_state (line 48) | def build_hidden_generation_state() -> dict[str, Any]: FILE: acestep/ui/gradio/interfaces/generation_tab_secondary_controls.py function build_cover_strength_controls (line 11) | def build_cover_strength_controls() -> dict[str, Any]: function build_custom_mode_controls (line 50) | def build_custom_mode_controls() -> dict[str, Any]: function build_repainting_controls (line 117) | def build_repainting_controls() -> dict[str, Any]: FILE: acestep/ui/gradio/interfaces/generation_tab_section.py function create_generation_tab_section (line 33) | def create_generation_tab_section( FILE: acestep/ui/gradio/interfaces/generation_tab_simple_controls.py function build_simple_input_controls (line 12) | def build_simple_input_controls() -> tuple[gr.Textbox, gr.Dropdown, gr.C... function build_simple_action_controls (line 50) | def build_simple_action_controls( function build_simple_mode_controls (line 81) | def build_simple_mode_controls() -> dict[str, Any]: FILE: acestep/ui/gradio/interfaces/generation_tab_source_controls.py function build_source_audio_controls (line 12) | def build_source_audio_controls() -> dict[str, Any]: function build_track_selection_controls (line 41) | def build_track_selection_controls() -> dict[str, Any]: function build_lm_code_hint_controls (line 75) | def build_lm_code_hint_controls() -> dict[str, Any]: function build_source_track_and_code_controls (line 123) | def build_source_track_and_code_controls() -> dict[str, Any]: FILE: acestep/ui/gradio/interfaces/result.py function _create_audio_column (line 10) | def _create_audio_column(n, visible=True): function create_results_section (line 97) | def create_results_section(dit_handler) -> dict: FILE: acestep/ui/gradio/interfaces/training.py function _resolve_epoch_slider_defaults (line 15) | def _resolve_epoch_slider_defaults() -> tuple[int, int, int]: function create_training_section (line 24) | def create_training_section(dit_handler, llm_handler, init_params=None) ... FILE: acestep/ui/gradio/interfaces/training_contract_ast_utils.py function load_module (line 13) | def load_module(module_name: str) -> ast.Module: function call_name (line 20) | def call_name(node: ast.AST) -> str | None: function collect_return_dict_keys (line 30) | def collect_return_dict_keys(module_name: str, function_name: str) -> se... function collect_training_section_keys_used_by_wiring (line 64) | def collect_training_section_keys_used_by_wiring() -> set[str]: FILE: acestep/ui/gradio/interfaces/training_dataset_builder_tab.py function create_dataset_builder_tab (line 20) | def create_dataset_builder_tab() -> dict[str, object]: FILE: acestep/ui/gradio/interfaces/training_dataset_tab_label_preview.py function build_dataset_label_and_preview_controls (line 10) | def build_dataset_label_and_preview_controls() -> dict[str, object]: FILE: acestep/ui/gradio/interfaces/training_dataset_tab_save_preprocess.py function build_dataset_save_and_preprocess_controls (line 10) | def build_dataset_save_and_preprocess_controls() -> dict[str, object]: FILE: acestep/ui/gradio/interfaces/training_dataset_tab_scan_settings.py function build_dataset_scan_and_settings_controls (line 10) | def build_dataset_scan_and_settings_controls() -> dict[str, object]: FILE: acestep/ui/gradio/interfaces/training_decomposition_contract_test.py class TrainingDecompositionContractTests (line 25) | class TrainingDecompositionContractTests(unittest.TestCase): method test_training_facade_imports_tab_helpers (line 28) | def test_training_facade_imports_tab_helpers(self) -> None: method test_training_facade_merges_helper_sections (line 44) | def test_training_facade_merges_helper_sections(self) -> None: method test_dataset_builder_tab_delegates_to_section_builders (line 64) | def test_dataset_builder_tab_delegates_to_section_builders(self) -> None: method test_training_keys_cover_wiring_requirements (line 79) | def test_training_keys_cover_wiring_requirements(self) -> None: method test_training_ui_markers_preserved (line 108) | def test_training_ui_markers_preserved(self) -> None: method test_lokr_helpers_use_i18n_translation_calls (line 126) | def test_lokr_helpers_use_i18n_translation_calls(self) -> None: FILE: acestep/ui/gradio/interfaces/training_lokr_tab.py function create_training_lokr_tab (line 17) | def create_training_lokr_tab() -> dict[str, object]: FILE: acestep/ui/gradio/interfaces/training_lokr_tab_dataset.py function build_lokr_dataset_and_adapter_controls (line 10) | def build_lokr_dataset_and_adapter_controls() -> dict[str, object]: FILE: acestep/ui/gradio/interfaces/training_lokr_tab_run_export.py function build_lokr_run_and_export_controls (line 10) | def build_lokr_run_and_export_controls() -> dict[str, object]: FILE: acestep/ui/gradio/interfaces/training_lora_tab.py function create_training_lora_tab (line 17) | def create_training_lora_tab( FILE: acestep/ui/gradio/interfaces/training_lora_tab_dataset.py function build_lora_dataset_and_adapter_controls (line 10) | def build_lora_dataset_and_adapter_controls() -> dict[str, object]: FILE: acestep/ui/gradio/interfaces/training_lora_tab_run_export.py function build_lora_run_and_export_controls (line 10) | def build_lora_run_and_export_controls( FILE: acestep/ui/streamlit/components/audio_player.py function audio_player_widget (line 9) | def audio_player_widget(audio_path: str, label: str = "Audio", show_down... function simple_audio_player (line 62) | def simple_audio_player(audio_path: str, label: str = "▶️ Play"): FILE: acestep/ui/streamlit/components/batch_generator.py function show_batch_generator (line 10) | def show_batch_generator(): function generate_batch (line 130) | def generate_batch(queue: list, parallel_count: int, steps: int, guidanc... FILE: acestep/ui/streamlit/components/dashboard.py function show_dashboard (line 10) | def show_dashboard(): FILE: acestep/ui/streamlit/components/editor.py function show_editor (line 24) | def show_editor() -> None: FILE: acestep/ui/streamlit/components/editor_audio_picker.py function pick_audio_source (line 16) | def pick_audio_source() -> Optional[Path]: function _pick_from_projects (line 44) | def _pick_from_projects(fallback: Optional[Path]) -> Optional[Path]: function _pick_from_outputs (line 71) | def _pick_from_outputs(fallback: Optional[Path]) -> Optional[Path]: function _pick_from_upload (line 91) | def _pick_from_upload(fallback: Optional[Path]) -> Optional[Path]: function _scan_output_files (line 105) | def _scan_output_files() -> List[Path]: FILE: acestep/ui/streamlit/components/editor_runner.py function run_edit_task (line 21) | def run_edit_task( function _generate (line 82) | def _generate( function _show_results (line 129) | def _show_results(result, task_type: str, caption: str) -> None: FILE: acestep/ui/streamlit/components/editor_tasks.py function repaint_ui (line 13) | def repaint_ui(audio_path: Path, duration_sec: float) -> None: function cover_ui (line 68) | def cover_ui(audio_path: Path, duration_sec: float) -> None: function complete_ui (line 129) | def complete_ui(audio_path: Path, duration_sec: float) -> None: FILE: acestep/ui/streamlit/components/editor_waveform.py function show_waveform_and_player (line 25) | def show_waveform_and_player(audio_path: Path) -> float: function region_selector (line 51) | def region_selector( function _get_duration (line 89) | def _get_duration(audio_path: Path) -> float: function _load_waveform (line 104) | def _load_waveform( function _draw_waveform (line 124) | def _draw_waveform(y: np.ndarray, duration_sec: float) -> None: function _draw_region_bar (line 138) | def _draw_region_bar( FILE: acestep/ui/streamlit/components/generation_wizard.py function _quick_init_dit (line 32) | def _quick_init_dit() -> None: function show_generation_wizard (line 49) | def show_generation_wizard() -> None: function generate_song (line 247) | def generate_song( FILE: acestep/ui/streamlit/components/settings_panel.py function show_settings_panel (line 21) | def show_settings_panel() -> None: function _show_model_settings (line 43) | def _show_model_settings() -> None: function _show_hardware_settings (line 153) | def _show_hardware_settings() -> None: function _show_storage_settings (line 196) | def _show_storage_settings() -> None: function _show_about_section (line 231) | def _show_about_section() -> None: function _list_dit_models (line 260) | def _list_dit_models() -> list: function _list_lm_models (line 280) | def _list_lm_models() -> list: FILE: acestep/ui/streamlit/utils/audio_utils.py function load_audio_file (line 15) | def load_audio_file(file_path: str, sr: int = 16000) -> Tuple[np.ndarray... function save_audio_file (line 28) | def save_audio_file(audio_data: np.ndarray, file_path: str, sr: int = 16... function get_audio_duration (line 41) | def get_audio_duration(file_path: str) -> float: function normalize_audio (line 54) | def normalize_audio(audio_data: np.ndarray, target_db: float = -1.0) -> ... function get_waveform_data (line 79) | def get_waveform_data(audio_data: np.ndarray, num_points: int = 1000) ->... FILE: acestep/ui/streamlit/utils/cache.py function get_dit_handler (line 26) | def get_dit_handler(): function get_llm_handler (line 38) | def get_llm_handler(): function get_dataset_handler (line 50) | def get_dataset_handler(): function is_dit_ready (line 65) | def is_dit_ready() -> bool: function is_llm_ready (line 71) | def is_llm_ready() -> bool: function initialize_dit (line 77) | def initialize_dit( function initialize_llm (line 106) | def initialize_llm( function clear_handlers (line 145) | def clear_handlers() -> None: FILE: acestep/ui/streamlit/utils/project_manager.py class ProjectMetadata (line 16) | class ProjectMetadata: method __post_init__ (line 28) | def __post_init__(self): class ProjectManager (line 33) | class ProjectManager: method __init__ (line 36) | def __init__(self, projects_dir: Path = PROJECTS_DIR): method create_project (line 40) | def create_project(self, name: str, description: str = "") -> Path: method get_project (line 57) | def get_project(self, name: str) -> Optional[Path]: method list_projects (line 64) | def list_projects(self) -> List[Dict]: method save_metadata (line 81) | def save_metadata(self, project_path: Path, **kwargs) -> None: method save_audio (line 97) | def save_audio(self, project_path: Path, audio_data: bytes, filename: ... method get_audio_files (line 106) | def get_audio_files(self, project_path: Path) -> List[Path]: method delete_project (line 114) | def delete_project(self, name: str) -> bool: method _save_metadata (line 123) | def _save_metadata(self, project_path: Path, metadata: ProjectMetadata... method _load_metadata (line 129) | def _load_metadata(self, project_path: Path) -> Optional[ProjectMetada... FILE: cli.py function _configure_logging (line 31) | def _configure_logging( function _get_project_root (line 89) | def _get_project_root() -> str: function _parse_description_hints (line 93) | def _parse_description_hints(description: str) -> tuple[Optional[str], b... function _prompt_non_empty (line 144) | def _prompt_non_empty(prompt: str) -> str: function _prompt_with_default (line 151) | def _prompt_with_default(prompt: str, default: Optional[str] = None, req... function _prompt_bool (line 164) | def _prompt_bool(prompt: str, default: bool) -> bool: function _prompt_choice_from_list (line 177) | def _prompt_choice_from_list( function _edit_formatted_prompt_via_file (line 213) | def _edit_formatted_prompt_via_file(formatted_prompt: str, instruction_p... function _extract_caption_lyrics_from_formatted_prompt (line 235) | def _extract_caption_lyrics_from_formatted_prompt(formatted_prompt: str)... function _extract_instruction_from_formatted_prompt (line 256) | def _extract_instruction_from_formatted_prompt(formatted_prompt: str) ->... function _extract_cot_metadata_from_formatted_prompt (line 265) | def _extract_cot_metadata_from_formatted_prompt(formatted_prompt: str) -... function _parse_number (line 299) | def _parse_number(value: str) -> Optional[float]: function _parse_timesteps_input (line 309) | def _parse_timesteps_input(value) -> Optional[List[float]]: function _install_prompt_edit_hook (line 335) | def _install_prompt_edit_hook( function _prompt_int (line 408) | def _prompt_int(prompt: str, default: Optional[int] = None, min_value: O... function _prompt_float (line 429) | def _prompt_float(prompt: str, default: Optional[float] = None, min_valu... function _prompt_existing_file (line 450) | def _prompt_existing_file(prompt: str, default: Optional[str] = None) ->... function _expand_audio_path (line 461) | def _expand_audio_path(path_str: Optional[str]) -> Optional[str]: function _parse_bool (line 470) | def _parse_bool(value: str) -> bool: function _resolve_device (line 474) | def _resolve_device(device: str) -> str: function _default_instruction_for_task (line 486) | def _default_instruction_for_task(task_type: str, tracks: Optional[List[... function _apply_optional_defaults (line 499) | def _apply_optional_defaults(args, params_defaults: GenerationParams, co... function _summarize_lyrics (line 546) | def _summarize_lyrics(lyrics: Optional[str]) -> str: function _print_final_parameters (line 561) | def _print_final_parameters( function _build_meta_dict (line 616) | def _build_meta_dict(params: GenerationParams) -> Optional[dict]: function _print_dit_prompt (line 629) | def _print_dit_prompt(dit_handler: "AceStepHandler", params: GenerationP... function run_wizard (line 646) | def run_wizard(args, configure_only: bool = False, default_config_path: ... function main (line 989) | def main(): FILE: generate_examples.py function generate_examples (line 20) | def generate_examples(num_examples=50, output_dir="examples/text2music",... FILE: openrouter/client_test.py function get_headers (line 34) | def get_headers(api_key: Optional[str] = None) -> dict: function handle_response (line 42) | def handle_response(resp, audio_filename: str) -> bool: function save_audio (line 71) | def save_audio(audio_url: str, filename: str) -> str: function test_health (line 95) | def test_health(base_url: str, api_key: Optional[str] = None) -> bool: function test_list_models (line 111) | def test_list_models(base_url: str, api_key: Optional[str] = None) -> bool: function test_natural_language_mode (line 131) | def test_natural_language_mode(base_url: str, api_key: Optional[str] = N... function test_tagged_mode (line 190) | def test_tagged_mode(base_url: str, api_key: Optional[str] = None) -> bool: function test_lyrics_only_mode (line 250) | def test_lyrics_only_mode(base_url: str, api_key: Optional[str] = None) ... function test_instrumental_mode (line 291) | def test_instrumental_mode(base_url: str, api_key: Optional[str] = None)... function test_streaming_mode (line 326) | def test_streaming_mode(base_url: str, api_key: Optional[str] = None) ->... function test_full_parameters (line 416) | def test_full_parameters(base_url: str, api_key: Optional[str] = None) -... function test_error_handling (line 461) | def test_error_handling(base_url: str, api_key: Optional[str] = None) ->... function main (line 504) | def main(): FILE: openrouter/openrouter_api_server.py function set_api_key (line 72) | def set_api_key(key: Optional[str]): function verify_api_key (line 78) | async def verify_api_key(authorization: Optional[str] = Header(None)): class ChatMessage (line 100) | class ChatMessage(BaseModel): class AudioConfig (line 105) | class AudioConfig(BaseModel): class ChatCompletionRequest (line 116) | class ChatCompletionRequest(BaseModel): class AudioUrlContent (line 151) | class AudioUrlContent(BaseModel): class AudioOutputItem (line 156) | class AudioOutputItem(BaseModel): class ResponseMessage (line 162) | class ResponseMessage(BaseModel): class Choice (line 169) | class Choice(BaseModel): class Usage (line 175) | class Usage(BaseModel): class ChatCompletionResponse (line 181) | class ChatCompletionResponse(BaseModel): class DeltaContent (line 191) | class DeltaContent(BaseModel): class StreamChoice (line 198) | class StreamChoice(BaseModel): class ChatCompletionChunk (line 205) | class ChatCompletionChunk(BaseModel): class ModelInfo (line 214) | class ModelInfo(BaseModel): class ModelsResponse (line 226) | class ModelsResponse(BaseModel): function _get_project_root (line 234) | def _get_project_root() -> str: function _env_bool (line 240) | def _env_bool(name: str, default: bool) -> bool: function _looks_like_lyrics (line 251) | def _looks_like_lyrics(text: str) -> bool: function _extract_tagged_content (line 278) | def _extract_tagged_content(text: str) -> tuple[str, str, str]: function _base64_to_temp_file (line 304) | def _base64_to_temp_file(b64_data: str, audio_format: str = "mp3") -> str: function _extract_prompt_and_lyrics (line 320) | def _extract_prompt_and_lyrics(messages: List[ChatMessage]) -> tuple[str... function _read_audio_as_base64 (line 393) | def _read_audio_as_base64(file_path: str) -> str: function _audio_to_base64_url (line 399) | def _audio_to_base64_url(audio_path: str, audio_format: str = "mp3") -> ... function _format_lm_content (line 421) | def _format_lm_content(result: Dict[str, Any]) -> str: function _make_stream_chunk (line 461) | def _make_stream_chunk( function create_app (line 498) | def create_app() -> FastAPI: function main (line 1142) | def main() -> None: FILE: openrouter/stress_test.py class RequestResult (line 47) | class RequestResult: class StressTestStats (line 57) | class StressTestStats: method add_result (line 68) | def add_result(self, result: RequestResult): method success_rate (line 81) | def success_rate(self) -> float: method duration (line 88) | def duration(self) -> float: method qps (line 93) | def qps(self) -> float: method successful_qps (line 100) | def successful_qps(self) -> float: method get_latency_stats (line 106) | def get_latency_stats(self) -> Dict[str, float]: class StressTester (line 133) | class StressTester: method __init__ (line 136) | def __init__( method get_headers (line 152) | def get_headers(self) -> dict: method make_request (line 159) | def make_request(self) -> RequestResult: method _get_generate_payload (line 242) | def _get_generate_payload(self) -> dict: method _get_instrumental_payload (line 255) | def _get_instrumental_payload(self) -> dict: method run_fixed_requests (line 267) | def run_fixed_requests( method run_duration_based (line 315) | def run_duration_based( method run_ramp_up (line 371) | def run_ramp_up( method _print_step_summary (line 416) | def _print_step_summary(self, result: Dict[str, Any]): function print_stats (line 429) | def print_stats(stats: StressTestStats, title: str = "压力测试结果"): function print_ramp_summary (line 479) | def print_ramp_summary(results: List[Dict[str, Any]]): function main (line 523) | def main(): FILE: plugins/acestep_vst3/src/PluginBackendClient.cpp type acestep::vst3 (line 3) | namespace acestep::vst3 function normalizeBaseUrl (line 9) | juce::String normalizeBaseUrl(juce::String baseUrl) function buildUrl (line 19) | juce::URL buildUrl(const juce::String& baseUrl, const juce::String& path) function readJsonResponse (line 31) | bool readJsonResponse(const juce::URL& url, function buildResultLabel (line 101) | juce::String buildResultLabel(const juce::DynamicObject& itemObject, i... function chooseModelName (line 131) | juce::String chooseModelName(ModelPreset preset) function chooseInferenceSteps (line 145) | int chooseInferenceSteps(QualityMode qualityMode) function chooseFileExtension (line 160) | juce::String chooseFileExtension(const juce::String& remoteFileUrl) function PluginHealthCheckResult (line 179) | PluginHealthCheckResult PluginBackendClient::checkHealth(const juce::S... function PluginGenerationStartResult (line 202) | PluginGenerationStartResult PluginBackendClient::startGeneration(const... function PluginGenerationPollResult (line 259) | PluginGenerationPollResult PluginBackendClient::pollGeneration(const j... function PluginPreviewDownloadResult (line 360) | PluginPreviewDownloadResult PluginBackendClient::downloadPreviewFile(c... FILE: plugins/acestep_vst3/src/PluginBackendClient.h function namespace (line 10) | namespace acestep::vst3 FILE: plugins/acestep_vst3/src/PluginConfig.h function namespace (line 3) | namespace acestep::vst3 FILE: plugins/acestep_vst3/src/PluginEditor.cpp type acestep::vst3 (line 5) | namespace acestep::vst3 FILE: plugins/acestep_vst3/src/PluginEditorPreview.cpp type acestep::vst3 (line 5) | namespace acestep::vst3 FILE: plugins/acestep_vst3/src/PluginEditorState.cpp type acestep::vst3 (line 6) | namespace acestep::vst3 FILE: plugins/acestep_vst3/src/PluginEnums.cpp type acestep::vst3 (line 3) | namespace acestep::vst3 function normalized (line 7) | juce::String normalized(juce::String value) function toString (line 13) | juce::String toString(BackendStatus status) function toString (line 28) | juce::String toString(JobStatus status) function toString (line 47) | juce::String toString(ModelPreset preset) function toString (line 62) | juce::String toString(QualityMode mode) function BackendStatus (line 77) | BackendStatus backendStatusFromString(const juce::String& value) function JobStatus (line 91) | JobStatus jobStatusFromString(const juce::String& value) function ModelPreset (line 113) | ModelPreset modelPresetFromString(const juce::String& value) function QualityMode (line 127) | QualityMode qualityModeFromString(const juce::String& value) FILE: plugins/acestep_vst3/src/PluginEnums.h type class (line 7) | enum class type class (line 14) | enum class type class (line 23) | enum class function QualityMode (line 30) | enum class QualityMode FILE: plugins/acestep_vst3/src/PluginMockGeneration.cpp type acestep::vst3 (line 5) | namespace acestep::vst3 function buildResultLabel (line 9) | juce::String buildResultLabel(const PluginState& state, int slotIndex) function beginMockGeneration (line 17) | bool beginMockGeneration(PluginState& state) function advanceMockGeneration (line 38) | void advanceMockGeneration(PluginState& state, int phaseIndex) FILE: plugins/acestep_vst3/src/PluginMockGeneration.h function namespace (line 5) | namespace acestep::vst3 FILE: plugins/acestep_vst3/src/PluginPreview.cpp type acestep::vst3 (line 3) | namespace acestep::vst3 FILE: plugins/acestep_vst3/src/PluginPreview.h function namespace (line 7) | namespace acestep::vst3 FILE: plugins/acestep_vst3/src/PluginProcessor.cpp type acestep::vst3 (line 5) | namespace acestep::vst3 function PluginState (line 130) | const PluginState& ACEStepVST3AudioProcessor::getState() const noexcept function PluginState (line 135) | PluginState& ACEStepVST3AudioProcessor::getMutableState() noexcept FILE: plugins/acestep_vst3/src/PluginProcessor.h type class (line 58) | enum class function final (line 67) | struct BackendTaskResult final FILE: plugins/acestep_vst3/src/PluginState.cpp type acestep::vst3 (line 3) | namespace acestep::vst3 function createStateXml (line 5) | std::unique_ptr createStateXml(const PluginState& st... function parseStateXml (line 36) | std::optional parseStateXml(const juce::XmlElement& xml) FILE: plugins/acestep_vst3/src/PluginState.h function namespace (line 12) | namespace acestep::vst3 FILE: profile_inference.py function resolve_device (line 90) | def resolve_device(device: str) -> str: function auto_detect_backend (line 103) | def auto_detect_backend(device: str) -> str: function load_env_config (line 116) | def load_env_config() -> Dict[str, str]: class PreciseTimer (line 145) | class PreciseTimer: method __init__ (line 148) | def __init__(self, device: str = "cpu"): method sync (line 153) | def sync(self): method time (line 166) | def time(self, name: str): method get_total (line 180) | def get_total(self, name: str) -> float: method get_mean (line 183) | def get_mean(self, name: str) -> float: method get_count (line 187) | def get_count(self, name: str) -> int: method reset (line 190) | def reset(self): function load_example_config (line 199) | def load_example_config( function print_time_costs_breakdown (line 265) | def print_time_costs_breakdown( function print_result_summary (line 407) | def print_result_summary(result: GenerationResult, mode: str = "profile"): function run_profile_mode (line 425) | def run_profile_mode(dit_handler, llm_handler, args, timer: PreciseTimer): function run_benchmark_mode (line 543) | def run_benchmark_mode(dit_handler, llm_handler, args, timer: PreciseTim... function _get_vram_info_str (line 721) | def _get_vram_info_str() -> str: function _run_single_tier_test (line 730) | def _run_single_tier_test( function run_tier_test_mode (line 1022) | def run_tier_test_mode(args): function _cleanup_handlers (line 1206) | def _cleanup_handlers(dit_handler, llm_handler): function _print_tier_test_summary (line 1235) | def _print_tier_test_summary(results: List[Dict]): function _print_boundary_summary (line 1307) | def _print_boundary_summary(results: List[Dict]): function _print_batch_boundary_summary (line 1395) | def _print_batch_boundary_summary(results: List[Dict]): function run_understand_mode (line 1526) | def run_understand_mode(dit_handler, llm_handler, args, timer: PreciseTi... function run_create_sample_mode (line 1577) | def run_create_sample_mode( function run_format_sample_mode (line 1628) | def run_format_sample_mode( function _print_cprofile (line 1688) | def _print_cprofile(prof): function _cleanup_dir (line 1710) | def _cleanup_dir(path: str): function initialize_handlers (line 1724) | def initialize_handlers( function build_parser (line 1799) | def build_parser() -> argparse.ArgumentParser: function main (line 2100) | def main(): FILE: scripts/check_gpu.py function print_section (line 25) | def print_section(title): function check_pytorch (line 32) | def check_pytorch(): function check_cuda_availability (line 67) | def check_cuda_availability(): function check_rocm_setup (line 100) | def check_rocm_setup(): function check_nvidia_setup (line 157) | def check_nvidia_setup(): function check_ace_step_env (line 194) | def check_ace_step_env(): function print_recommendations (line 217) | def print_recommendations(): function main (line 263) | def main(): FILE: scripts/fetch-awesome.mjs constant RAW_URL (line 9) | const RAW_URL = 'https://raw.githubusercontent.com/ace-step/awesome-ace-... constant OUTPUT (line 10) | const OUTPUT = 'docs/en/awesome.md' constant FRONTMATTER (line 12) | const FRONTMATTER = `--- function main (line 30) | async function main() { FILE: scripts/lora_data_prepare/elevenlabs_transcription.py function is_cjk (line 15) | def is_cjk(ch: str) -> bool: function smart_join (line 25) | def smart_join(word_list: List[str]) -> str: function words_to_lyrics (line 39) | def words_to_lyrics(words: List[Dict[str, Any]], line_gap: float = 1.5) ... function transcribe_elevenlabs (line 66) | def transcribe_elevenlabs( function transcribe_to_file (line 122) | def transcribe_to_file( function process_folder (line 160) | def process_folder( FILE: scripts/lora_data_prepare/gemini_caption.py class GeminiService (line 28) | class GeminiService: method __init__ (line 40) | def __init__( method _get_endpoint (line 50) | def _get_endpoint( method _get_headers (line 68) | def _get_headers(self) -> Dict[str, str]: method _encode_file_to_base64 (line 71) | def _encode_file_to_base64(self, file_path: str) -> str: method _get_mime_type (line 75) | def _get_mime_type(self, file_path: str) -> str: method upload_file (line 90) | def upload_file( method get_file_info (line 167) | def get_file_info(self, file_name: str) -> Optional[Dict[str, Any]]: method delete_file (line 180) | def delete_file(self, file_name: str) -> bool: method generate_content (line 190) | def generate_content( method stream_generate_content (line 238) | def stream_generate_content( method _build_request_body (line 286) | def _build_request_body( method extract_text (line 340) | def extract_text(self, response: Dict[str, Any]) -> Optional[str]: method analyze_audio (line 352) | def analyze_audio( method transcribe_audio (line 414) | def transcribe_audio( function get_gemini_service (line 435) | def get_gemini_service( function extract_json_from_text (line 456) | def extract_json_from_text(text: str): function analysis_audio_by_gemini (line 464) | def analysis_audio_by_gemini( function analysis_audio_to_files (line 483) | def analysis_audio_to_files( function process_folder (line 523) | def process_folder( FILE: scripts/lora_data_prepare/whisper_transcription.py function is_cjk (line 15) | def is_cjk(ch: str) -> bool: function smart_join (line 25) | def smart_join(word_list: List[str]) -> str: function words_to_lyrics (line 39) | def words_to_lyrics(words: List[Dict[str, Any]], line_gap: float = 1.5) ... function transcribe_whisper (line 66) | def transcribe_whisper( function transcribe_to_file (line 123) | def transcribe_to_file( function process_folder (line 161) | def process_folder( FILE: scripts/prepare_vae_calibration_data.py function process_audio (line 8) | def process_audio(audio_path, target_sr=48000): function main (line 38) | def main(): FILE: scripts/profile_vram.py function get_memory_stats (line 37) | def get_memory_stats() -> Dict[str, float]: function reset_memory (line 58) | def reset_memory(): function measure_cuda_context (line 69) | def measure_cuda_context() -> Dict[str, float]: function profile_dit (line 100) | def profile_dit(checkpoint_dir: str, config_path: str = "acestep-v15-tur... function profile_vae (line 228) | def profile_vae(checkpoint_dir: str) -> Dict[str, Any]: function profile_text_encoder (line 310) | def profile_text_encoder(checkpoint_dir: str) -> Dict[str, Any]: function profile_lm (line 349) | def profile_lm(checkpoint_dir: str, lm_models: Optional[List[str]] = Non... function main (line 431) | def main(): FILE: train.py function _has_subcommand (line 59) | def _has_subcommand() -> bool: function _cleanup_gpu (line 68) | def _cleanup_gpu() -> None: function _dispatch (line 79) | def _dispatch(args) -> int: function main (line 112) | def main() -> int: function _run_preprocess (line 148) | def _run_preprocess(args) -> int: function _run_estimate (line 205) | def _run_estimate(args) -> int: FILE: ui/studio_html_test.py class StudioHtmlVolumeGuardTests (line 7) | class StudioHtmlVolumeGuardTests(unittest.TestCase): method setUpClass (line 11) | def setUpClass(cls): method test_contains_trusted_event_helper (line 15) | def test_contains_trusted_event_helper(self): method test_volumechange_listener_guards_non_trusted_events (line 20) | def test_volumechange_listener_guards_non_trusted_events(self): method test_volume_defaults_on_missing_storage (line 26) | def test_volume_defaults_on_missing_storage(self):