Video Generation Pipeline 구조 분리 기록
·
Python
Avatar 영상 생성 파이프라인을 분석하다 보니모델 로딩과 영상 생성 로직이 하나의 스크립트에 결합된 구조였다이 구조에서는 영상 하나를 생성할 때마다수 분이 걸리는 모델 로딩이 반복되는 문제가 있어보였다👀(물론 현재 테스트하는데는 문제가 없지만, 여러개의 영상을 생성하기 위해 테스트를 하게 되면..?) > 모델 로딩과 영상 생성 로직을 분리하여 서버형 구조로 리팩토링 기존 구조 파일run_demo_avatar_single_audio_to_video.py (단일 파일) 실행방식torchrun --nproc_per_node=1 run_demo_avatar_single_audio_to_video.py \ --input_json assets/avatar/single_example_1.json \ --c..
LongCat Avatar: num_segments 자동 계산 로직 추가
·
Python
오디오와 이미지를 기반으로 영상을 생성하는 모델을 테스트하던 중 이상한 현상을 발견했다.11초짜리 음성을 넣었는데 생성된 영상은 5.8초? 정도였다. 처음에는 모델 문제인 줄 알았는데, 코드를 확인해보니 --num_segments 파라미터를 계산해서 전달해야 했다. 예를 들어서 11초 짜리 음성을 넣으면 다음과 같이 실행해야했다. torchrun run_demo_avatar_single_audio_to_video.py \ --checkpoint_dir=./weights/LongCat-Video-Avatar \ --stage_1=ai2v \ --input_json=assets/avatar/single_example_1.json \ --num_segments=3 문제는 이 3이라는 값을 직접 계산..
pthread_setaffinity_np failed for thread ... Invalid argument. Specify the number of threads explicitly so the affinity is not set.
·
Python
로컬에서 아래 오픈소스를 테스트해보던 중... https://github.com/meituan-longcat/LongCat-Video GitHub - meituan-longcat/LongCat-VideoContribute to meituan-longcat/LongCat-Video development by creating an account on GitHub.github.com 실행을 시켰는데, 빨간 에러?가 무섭게 주를글그르그그르그ㅡㄹㄱ륵 났다 서치 해보니까 실행하는 데는 문제가 없고, 오류보다는 워닝 같은 로그라고 한다. 정리해 보자면.. 1. 이게 뭔가?ONNXRuntime(음성에서 보컬을 분리하는 Kim_Vocal_2.onnx 모델 실행 시 사용)이 CPU 스레드를 특..
Fish-speech tts 테스트 및 문제 해결(3)
·
Python
문제텍스트를 청크 단위로 나눠서 생성한 뒤 이어붙이도록 작업을 했는데,청크 사이에 쉼이 전혀 없어서 숨도 안 쉬고 한 문장처럼 쭉 읽는 느낌.. 원인이전에 모든 청크의 오디오를 np.concatenate로 그냥 이어붙이도록 작업이전 작업 글 : https://jinnycoding.tistory.com/107 # 수정 전: 별도로 쉬거나 하는 로직 없이 바로바로 연결combined = np.concatenate(all_segments, axis=0) 수정 내용 (1) split_text() 함수에서 구두점 종류를 함께 반환하도록 변경파일: tools/webui/inference.py:18-63 기존 split_text()는 텍스트 청크만 반환했지만, 수정 후에는 (텍스트, 구두점 종류) 튜플을 반..
Fish-speech - torchaudio 호환성 문제 해결
·
Python
원인일부 환경에서 torchaudio 버전에 따라 list_audio_backends() 메서드가 존재하지 않거나, torchaudio.load()의 backend 파라미터가 지원되지 않아 오디오 로딩 자체가 실패하는 문제 발생 기존 코드파일: fish_speech/inference_engine/reference_loader.py # 기존 코드# 생성자에서 backend 설정backends = torchaudio.list_audio_backends() # ← 메서드 없으면 에러if "ffmpeg" in backends: self.backend = "ffmpeg"else: self.backend = "soundfile"# load_audio에서 오디오 로딩waveform, original_s..
Fish-speech tts 테스트 및 문제 해결(2)
·
Python
github : https://github.com/fishaudio/fish-speech GitHub - fishaudio/fish-speech: SOTA Open Source TTSSOTA Open Source TTS. Contribute to fishaudio/fish-speech development by creating an account on GitHub.github.com 사용 모델 : s1-minihttps://huggingface.co/fishaudio/s1-mini fishaudio/s1-mini · Hugging FaceWe’re on a journey to advance and democratize artificial intelligence through open source and..