正确的导入方式应该是 from omegaconf import OmegaConf,而不是 from omegaconf import omegaconf。请检查并更正您的导入语句。 检查Python环境: 确保您正在使用的Python环境中已经安装了omegaconf模块。您可以通过运行以下命令来检查: bash pip show omegaconf 如果系统提示找不到该模块,那么说明omegaconf尚未安装。 安装...
from omegaconf import OmegaConf from funasr.download.name_maps_from_hub import name_maps_ms, name_maps_hf def download_model(**kwargs): model_hub = kwargs.get("model_hub", "ms") if model_hub == "ms": kwargs = download_from_ms(**kwargs) return kwargs def downl...
import hydra from omegaconf import OmegaConf @hydra.main(version_base=None, config_path="config文件夹", config_name="主配置文件config.yaml") def my_app(cfg) -> None: print(OmegaConf.to_yaml(cfg)) if __name__ == "__main__": my_app() 1. 2. 3. 4. 5. 6. 7. 8. 9. 运行结...
pipeline.finetune import main as train import hydra import logging from typing import Optional from dataclasses import dataclass, field from omegaconf import DictConfig, ListConfig, OmegaConf from sec_config import ModelConfig, TrainConfig, DataConfig, LogConfig, FSDPConfig @dataclass class RunConfig:...
import cv2 import numpy as np import torch # 初始化模型 import torchvision from diffusers import AutoencoderKL, DDIMScheduler from diffusers.pipelines.stable_diffusion import StableDiffusionPipeline from einops import rearrange, repeat from omegaconf import OmegaConf from PIL import Image from torchvision ...
pipeline.inference_batch import main as inference import hydra import logging from dataclasses import dataclass, field from omegaconf import DictConfig, ListConfig, OmegaConf from typing import Optional from vsr_config import ModelConfig, TrainConfig, DataConfig, LogConfig, FSDPConfig @dataclass class ...
pipeline.finetune_deepspeed import main as train from slam_llm.utils.deepspeed_utils import deepspeed_main_wrapper import logging from dataclasses import dataclass, field from omegaconf import DictConfig, ListConfig, OmegaConf from asr_config import ModelConfig, TrainConfig, DataConfig, LogConfig @...
pipeline.finetune import main as train import hydra import logging from dataclasses import dataclass, field from omegaconf import DictConfig, ListConfig, OmegaConf from vallex_config import ModelConfig, TrainConfig, DataConfig, LogConfig, FSDPConfig @dataclass class RunConfig: dataset_config: Data...
from tools.file import AUDIO_EXTENSIONS, list_files, load_filelist @click.command()2 changes: 1 addition & 1 deletion 2 tools/vqgan/extract_vq.py Original file line numberDiff line numberDiff line change @@ -17,7 +17,7 @@ from loguru import logger from omegaconf import OmegaConf from ...
utils import dist, get_device, reproducibility from datasets import load_dataset from omegaconf import DictConfig from torch.utils.data import Dataset from diffusion.evaluation.generate_images import ImageGenerator def generate(config: DictConfig) -> None: """Evaluate a model. Args: config (Dict...