Spaces:
Paused
Paused
Download apps/renderer/config/runtime.py from modventures/prevision: direct link, hf CLI and curl.
- Browser
- Download file 3.27 kB
-
https://huggingface.co/spaces/modventures/prevision/resolve/main/apps/renderer/config/runtime.py
- Command line
-
hf download hf://spaces/modventures/prevision/apps/renderer/config/runtime.py
-
curl -L -o runtime.py https://huggingface.co/spaces/modventures/prevision/resolve/main/apps/renderer/config/runtime.py
3.27 kB
| from config.loader import config_bool, config_value | |
| ENABLE_MOGE_GEOMETRY = config_bool("ENABLE_MOGE_GEOMETRY", "runtime", "enable_moge_geometry", "0") | |
| ENABLE_SAM_REFINEMENT = config_bool("ENABLE_SAM_REFINEMENT", "runtime", "enable_sam_refinement", "0") | |
| ENABLE_FLOOR_MASK_CLEANUP = config_bool("ENABLE_FLOOR_MASK_CLEANUP", "runtime", "enable_floor_mask_cleanup", "1") | |
| ENABLE_DEPTH_ESTIMATION = config_bool("ENABLE_DEPTH_ESTIMATION", "runtime", "enable_depth_estimation", "1") | |
| ENABLE_PLANE_FIT = config_bool("ENABLE_PLANE_FIT", "runtime", "enable_plane_fit", "1") | |
| ENABLE_MULTI_PLANE_SURFACES = config_bool("ENABLE_MULTI_PLANE_SURFACES", "runtime", "enable_multi_plane_surfaces", "1") | |
| ENABLE_WALL_SEGMENTS = config_bool("ENABLE_WALL_SEGMENTS", "runtime", "enable_wall_segments", "0") | |
| ENABLE_INTRINSIC_SHADING = config_bool("ENABLE_INTRINSIC_SHADING", "runtime", "enable_intrinsic_shading", "0") | |
| ENABLE_SHADING_TRANSFER = config_bool("ENABLE_SHADING_TRANSFER", "runtime", "enable_shading_transfer", "1") | |
| ENABLE_FAST_SHADOW_TRANSFER = config_bool( | |
| "ENABLE_FAST_SHADOW_TRANSFER", "runtime", "enable_fast_shadow_transfer", "0", | |
| ) | |
| WARM_START_MODELS = config_bool("WARM_START_MODELS", "runtime", "warm_start_models", "1") | |
| ENABLE_ONNX_INFERENCE = config_bool("ENABLE_ONNX_INFERENCE", "runtime", "enable_onnx_inference", "0") | |
| ONNX_MODEL_DIR = str(config_value( | |
| "ONNX_MODEL_DIR", "runtime", "onnx_model_dir", "onnx_models", | |
| )) | |
| BUNDLE_IMAGE_FORMAT = str(config_value( | |
| "BUNDLE_IMAGE_FORMAT", "runtime", "bundle_image_format", "jpeg", | |
| )).lower() | |
| BUNDLE_IMAGE_QUALITY = int(config_value( | |
| "BUNDLE_IMAGE_QUALITY", "runtime", "bundle_image_quality", "92", | |
| )) | |
| ROOM_UPLOAD_MAX_DIMENSION = max(720, int(config_value( | |
| "ROOM_UPLOAD_MAX_DIMENSION", "runtime", "room_upload_max_dimension", "1920", | |
| ))) | |
| INFERENCE_MAX_DIMENSION = max(512, int(config_value( | |
| "INFERENCE_MAX_DIMENSION", "runtime", "inference_max_dimension", "1024", | |
| ))) | |
| FAST_SHADOW_MAX_DIMENSION = max(256, min(1024, int(config_value( | |
| "FAST_SHADOW_MAX_DIMENSION", "runtime", "fast_shadow_max_dimension", "640", | |
| )))) | |
| ROOM_UPLOAD_JPEG_QUALITY = min(95, max(50, int(config_value( | |
| "ROOM_UPLOAD_JPEG_QUALITY", "runtime", "room_upload_jpeg_quality", "85", | |
| )))) | |
| DEBUG_ARTIFACTS_ENABLED = config_bool( | |
| "DEBUG_ARTIFACTS_ENABLED", "runtime", "debug_artifacts_enabled", "1", | |
| ) | |
| CONVERSION_TARGET_MS = max(5_000, int(config_value( | |
| "CONVERSION_TARGET_MS", "runtime", "conversion_target_ms", "30000", | |
| ))) | |
| # Conversions allowed in flight at once. GPU inference is serialised separately | |
| # (state.gpu_inference), so extra slots overlap one job's CPU stages with | |
| # another's inference; the cap bounds peak memory from full-resolution arrays. | |
| MAX_CONCURRENT_CONVERSIONS = max(1, int(config_value( | |
| "MAX_CONCURRENT_CONVERSIONS", "runtime", "max_concurrent_conversions", "2", | |
| ))) | |
| DEBUG_ARTIFACTS_MAX_DIMENSION = max(320, int(config_value( | |
| "DEBUG_ARTIFACTS_MAX_DIMENSION", "runtime", "debug_artifacts_max_dimension", "1600", | |
| ))) | |
| DEBUG_ARTIFACTS_PREVIEW_DIMENSION = max(320, int(config_value( | |
| "DEBUG_ARTIFACTS_PREVIEW_DIMENSION", "runtime", "debug_artifacts_preview_dimension", "720", | |
| ))) | |
| VISUALIZER_DATA_DIR = str(config_value( | |
| "VISUALIZER_DATA_DIR", "runtime", "data_dir", "data", | |
| )) | |