Remove retired Seed-VC integration and retain SoulX-Singer
This commit is contained in:
1 parent
d88d1d556b
commit
8c10ccc8ec
31 files changed
+54
-753
No files matched your search
+3
-3
@@ -17,12 +17,12 @@ COPY deploy/image-requirements.lock /app/deploy/image-requirements.lock
|
||||
COPY deploy/acestep-requirements.lock /app/deploy/acestep-requirements.lock
|
||||
COPY deploy/tts-requirements.lock /app/deploy/tts-requirements.lock
|
||||
COPY deploy/ltx-original-requirements.lock /app/deploy/ltx-original-requirements.lock
|
||||
COPY seed_vc.py seed_vc_runtime.py seed_vc_sources.json seed-vc-ui.js cuda_overlay.py remix.py remix_runtime.py remix_worker.py remix_sources.json clearvoice_worker.py xvc.py xvc_runtime.py xvc_sources.json xvc-ui.js applio.py applio_runtime.py applio_worker.py applio-ui.js acestep_models.py acestep.py acestep_worker.py acestep_runtime.py acestep-ui.js embeddings.py voxcpm_test.py voxcpm_worker.py voxcpm_runtime.py separator_sources.json separator.py separator_runtime.py separator_worker.py music.py audio_cpp_runtime.py ltx_original_runtime.py ltx_original_entry.py video_original.py backup.py backup_codec.py audio_policy.py prompt_enhancer.py prompt_enhancer_worker.py api_compat.py responses_compat.py stt.py execution_setup.py tts_runtime.py tts_test.py tts_worker.py auto_test.py chat_test.py endpoint.py inference.py docker_support.py image_encoder_node.py image_runtime.py image_test.py image_upload.py profiles.py capacity.py server.py runtime.py video.py video_proxy.py video_comfy.py video_comfy_node.py video_comfy_proxy.py catalog.py hub_auth.py auth.py collect_hardware.py dashboard_data.py dashboard_history.py /app/
|
||||
COPY soulx_singer.py soulx_singer_runtime.py soulx-singer-ui.js cuda_overlay.py remix.py remix_runtime.py remix_worker.py remix_sources.json clearvoice_worker.py xvc.py xvc_runtime.py xvc_sources.json xvc-ui.js applio.py applio_runtime.py applio_worker.py applio-ui.js acestep_models.py acestep.py acestep_worker.py acestep_runtime.py acestep-ui.js embeddings.py voxcpm_test.py voxcpm_worker.py voxcpm_runtime.py separator_sources.json separator.py separator_runtime.py separator_worker.py music.py audio_cpp_runtime.py ltx_original_runtime.py ltx_original_entry.py video_original.py backup.py backup_codec.py audio_policy.py prompt_enhancer.py prompt_enhancer_worker.py api_compat.py responses_compat.py stt.py execution_setup.py tts_runtime.py tts_test.py tts_worker.py auto_test.py chat_test.py endpoint.py inference.py docker_support.py image_encoder_node.py image_runtime.py image_test.py image_upload.py profiles.py capacity.py server.py runtime.py video.py video_proxy.py video_comfy.py video_comfy_node.py video_comfy_proxy.py catalog.py hub_auth.py auth.py collect_hardware.py dashboard_data.py dashboard_history.py /app/
|
||||
COPY voice-ui.js voxcpm-ui.js separator-ui.js music-ui.js audio-cpp-ui.js ltx-original-ui.js backup-ui.js video-ui.js stt-ui.js tts-ui.js auto-test-ui.js chat-test-ui.js endpoint-ui.js docker-ui.js image-test-ui.js profiles-ui.js dashboard-ui.js index.html app.js studio.js runtime-ui.js catalog-ui.js style.css dashboard.css themes.css login.html login.js access-ui.js network-ui.js /app/
|
||||
COPY deploy/docker_backup.py /app/deploy/docker_backup.py
|
||||
COPY deploy/xvc-requirements.lock /app/deploy/xvc-requirements.lock
|
||||
COPY deploy/seed-vc-requirements.lock /app/deploy/seed-vc-requirements.lock
|
||||
COPY deploy/seed-vc-web /app/deploy/seed-vc-web
|
||||
COPY deploy/soulx-singer-web /app/deploy/soulx-singer-web
|
||||
COPY deploy/soulx-singer-svc /app/deploy/soulx-singer-svc
|
||||
COPY deploy/xvc-web /app/deploy/xvc-web
|
||||
COPY deploy/applio-requirements.lock /app/deploy/applio-requirements.lock
|
||||
COPY deploy/applio-web /app/deploy/applio-web
|
||||
|
||||
@@ -4,6 +4,7 @@ USER root
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends python3-cryptography ffmpeg libsndfile1 libportaudio2 && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /app
|
||||
COPY app/ /app/
|
||||
RUN rm -f /app/seed_vc.py /app/seed_vc_runtime.py /app/seed_vc_sources.json /app/seed-vc-ui.js /app/deploy/prepare_seed_vc.py /app/deploy/seed-vc-requirements.lock && rm -rf /app/deploy/seed-vc-web
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 HOME=/tmp \
|
||||
CUDA_CACHE_PATH=/var/lib/deck/cache/cuda TORCHINDUCTOR_CACHE_DIR=/var/lib/deck/cache/torchinductor \
|
||||
DECK_BIND_HOST=0.0.0.0 DECK_STATE_DIR=/var/lib/deck \
|
||||
|
||||
@@ -136,8 +136,8 @@ mit eigener Deck-UID/GID und optional `--allow-install`. Dadurch kann Docker sp
|
||||
root-eigener Dienst mit festem Aktionsumfang. Kein Docker-Socket im Webserver.
|
||||
Siehe `docs/DOCKER_SERVICES.md`; frischer Debian-Ende-zu-Ende-Test noch erforderlich.
|
||||
|
||||
Seed-VC Gesang benötigt eine eigene Python-venv, CUDA-12.8-PyTorch, FFmpeg und
|
||||
libsndfile; Installation und Inferenz sind native Deck-Aufgaben. Alle Modell-
|
||||
und Zusatzgewichte haben feste Originalquellen/Prüfsummen. Der optionale
|
||||
Container ist ausschließlich ein CPU-Proxy. Kein Bootstrap aus dem alten Router.
|
||||
Siehe [Seed-VC-Rezept](seed-vc-web/README.md). GPU-/Hörabnahme steht noch aus.
|
||||
SoulX-Singer-SVC nutzt eine eigene Python-venv, CUDA-12.8-PyTorch, FFmpeg und
|
||||
libsndfile. Gewichte und Zusatzkomponenten stammen aus fest hinterlegten
|
||||
Originalquellen mit Prüfsummen. Inferenz läuft nativ unter Decks GPU-Steuerung;
|
||||
der optionale Container ist ausschließlich ein CPU-Proxy. Siehe
|
||||
[SoulX-Singer-Rezept](soulx-singer-svc/README.md). Seed-VC wurde entfernt.
|
||||
+12
-14
@@ -53,7 +53,7 @@ def export(manager):
|
||||
try:relative=str(Path(source).relative_to(deck))
|
||||
except ValueError:pass
|
||||
mounts.append(dict(index=i,target=m['Destination'],read_only=not m['RW'],deck_path=relative,files=config_files(source,m['Destination']),was_file=Path(source).is_file()))
|
||||
result.append(dict(name=row['name'],image=c['Image'],registry=registry,application=c.get('Labels',{}).get(APP,''),labels={k:v for k,v in (c.get('Labels') or {}).items() if k.startswith('io.athena-deck.')},env=c.get('Env') or [],entrypoint=c.get('Entrypoint'),cmd=c.get('Cmd'),uid=app_uid(row['id'],c.get('User') or ''),user=c.get('User') or '',workdir=c.get('WorkingDir') or '',network=h['NetworkMode'],ports=h.get('PortBindings') or {},restart=h.get('RestartPolicy',{}).get('Name') or 'no',memory=h.get('Memory') or 0,nanocpus=h.get('NanoCpus') or 0,running=x['State']['Running'],mounts=mounts,build_recipe='swarm-ui' if row['name']=='athena-swarm-ui' else 'ladypoly' if row['name']=='athena-ladypoly' else 'separator-web' if row['name']=='athena-separator-web' else 'soulx-singer-web' if row['name']=='athena-soulx-singer-web' else 'seed-vc-web' if row['name']=='athena-seed-vc-web' else 'xvc-web' if row['name']=='athena-xvc-web' else 'applio-web' if row['name']=='athena-applio-web' else 'acestep-web' if row['name']=='athena-acestep-web' else 'voice-web' if row['name'] in ('athena-voxcpm2-web','athena-omnivoice-web') else None,unsupported=bool(h.get('Privileged') or h.get('DeviceRequests') or h.get('Devices') or h.get('CapAdd'))))
|
||||
result.append(dict(name=row['name'],image=c['Image'],registry=registry,application=c.get('Labels',{}).get(APP,''),labels={k:v for k,v in (c.get('Labels') or {}).items() if k.startswith('io.athena-deck.')},env=c.get('Env') or [],entrypoint=c.get('Entrypoint'),cmd=c.get('Cmd'),uid=app_uid(row['id'],c.get('User') or ''),user=c.get('User') or '',workdir=c.get('WorkingDir') or '',network=h['NetworkMode'],ports=h.get('PortBindings') or {},restart=h.get('RestartPolicy',{}).get('Name') or 'no',memory=h.get('Memory') or 0,nanocpus=h.get('NanoCpus') or 0,running=x['State']['Running'],mounts=mounts,build_recipe='swarm-ui' if row['name']=='athena-swarm-ui' else 'ladypoly' if row['name']=='athena-ladypoly' else 'separator-web' if row['name']=='athena-separator-web' else 'soulx-singer-web' if row['name']=='athena-soulx-singer-web' else 'xvc-web' if row['name']=='athena-xvc-web' else 'applio-web' if row['name']=='athena-applio-web' else 'acestep-web' if row['name']=='athena-acestep-web' else 'voice-web' if row['name'] in ('athena-voxcpm2-web','athena-omnivoice-web') else None,unsupported=bool(h.get('Privileged') or h.get('DeviceRequests') or h.get('Devices') or h.get('CapAdd'))))
|
||||
return {'services':result,'configured':bool(deck)}
|
||||
|
||||
def validate(c):
|
||||
@@ -61,10 +61,9 @@ def validate(c):
|
||||
if any(c.get('labels',{}).get(k)!=v for k,v in LABELS.items()):raise ValueError('Nur ausdrücklich Deck zugeordnete Anwendungscontainer erlaubt.')
|
||||
if c.get('unsupported'):raise ValueError('GPU-/privilegierter Container benötigt manuelle Einrichtung.')
|
||||
if c.get('network') not in ('bridge','default','host'):raise ValueError('Benutzerdefiniertes Docker-Netzwerk benötigt manuelle Einrichtung.')
|
||||
if c.get('network')=='host' and c['name'] not in ('athena-swarm-ui','ltx-deskweb','athena-ladypoly','athena-separator-web','athena-voxcpm2-web','athena-omnivoice-web','athena-acestep-web','athena-applio-web','athena-xvc-web','athena-seed-vc-web','athena-soulx-singer-web'):raise ValueError('Host-Netzwerk nur für bekannte Deck-Oberflächen erlaubt.')
|
||||
recipes={'soulx-singer-web':('athena-soulx-singer-web','athena-soulx-singer-web:0.1.0'),'seed-vc-web':('athena-seed-vc-web','athena-seed-vc-web:0.1.0-deck2'),'xvc-web':('athena-xvc-web','athena-xvc-web:0.1.0-deck1'),'applio-web':('athena-applio-web','athena-applio-web:3.6.5-deck1'),'acestep-web':('athena-acestep-web','athena-acestep-web:1.0.0'),'separator-web':('athena-separator-web','athena-separator-web:0.1.0'),'swarm-ui':('athena-swarm-ui','athena-swarm-ui:de7b834'),'ladypoly':('athena-ladypoly','athena-ladypoly:3960afc-deck1')}
|
||||
if c.get('build_recipe')=='seed-vc-web' and c['name']=='athena-seed-vc-web' and c.get('image') in ('athena-seed-vc-web:0.1.0-deck1','athena-seed-vc-web:0.1.0-deck2'):pass
|
||||
elif c.get('build_recipe')=='voice-web' and c['name'] in ('athena-voxcpm2-web','athena-omnivoice-web') and c.get('image') in ('athena-voice-web:0.2.1-deck1','athena-voice-web:0.2.1-deck2'):pass
|
||||
if c.get('network')=='host' and c['name'] not in ('athena-swarm-ui','ltx-deskweb','athena-ladypoly','athena-separator-web','athena-voxcpm2-web','athena-omnivoice-web','athena-acestep-web','athena-applio-web','athena-xvc-web','athena-soulx-singer-web'):raise ValueError('Host-Netzwerk nur für bekannte Deck-Oberflächen erlaubt.')
|
||||
recipes={'soulx-singer-web':('athena-soulx-singer-web','athena-soulx-singer-web:0.1.0'),'xvc-web':('athena-xvc-web','athena-xvc-web:0.1.0-deck1'),'applio-web':('athena-applio-web','athena-applio-web:3.6.5-deck1'),'acestep-web':('athena-acestep-web','athena-acestep-web:1.0.0'),'separator-web':('athena-separator-web','athena-separator-web:0.1.0'),'swarm-ui':('athena-swarm-ui','athena-swarm-ui:de7b834'),'ladypoly':('athena-ladypoly','athena-ladypoly:3960afc-deck1')}
|
||||
if c.get('build_recipe')=='voice-web' and c['name'] in ('athena-voxcpm2-web','athena-omnivoice-web') and c.get('image') in ('athena-voice-web:0.2.1-deck1','athena-voice-web:0.2.1-deck2'):pass
|
||||
elif c.get('build_recipe') is not None and recipes.get(c['build_recipe'])!=(c['name'],c.get('image')):raise ValueError('Unbekanntes Build-Rezept.')
|
||||
ref=c.get('registry') or c.get('image','')
|
||||
if not isinstance(ref,str) or not re.fullmatch(r'[A-Za-z0-9][A-Za-z0-9._/@:-]{0,300}',ref):raise ValueError('Ungültige Image-Referenz.')
|
||||
@@ -95,15 +94,14 @@ def validate(c):
|
||||
if m.get('index')!=i or type(m.get('read_only')) is not bool or type(m.get('was_file')) is not bool:raise ValueError('Ungültige Volume-Einstellung.')
|
||||
rel=m.get('deck_path')
|
||||
media={'video/original-work/remote-inputs/deskweb':('/data/inputs',False),'video/original-work/outputs':('/data/outputs',True)}
|
||||
native_seed_vc=rel=='seed_vc-data/bridge-key' and c['name']=='athena-seed-vc-web' and target=='/run/secrets/seed-vc-bridge' and m['read_only'] and m['was_file']
|
||||
native_soulx_singer=rel=='soulx_singer-data/bridge-key' and c['name']=='athena-soulx-singer-web' and target=='/run/secrets/soulx-singer-bridge' and m['read_only'] and m['was_file']
|
||||
native_xvc=rel=='xvc-data/bridge-key' and c['name']=='athena-xvc-web' and target=='/run/secrets/xvc-bridge' and m['read_only'] and m['was_file']
|
||||
native_applio=rel=='applio-data/bridge-key' and c['name']=='athena-applio-web' and target=='/run/secrets/applio-bridge' and m['read_only'] and m['was_file']
|
||||
native_media=rel in media and c['name']=='ltx-deskweb' and (target,m['read_only'])==media[rel] and not m['was_file']
|
||||
if rel is not None and not native_media and not native_applio and not native_xvc and not native_seed_vc and not native_soulx_singer and (rel not in ('models','video/comfy-work/models','video/comfy-client-token') or not m['read_only']):raise ValueError('Deck-Volume nicht freigegeben; nur bekannte Modell-/Tokenpfade und LTX-Medienordner erlaubt.')
|
||||
if rel is not None and not native_media and not native_applio and not native_xvc and not native_soulx_singer and (rel not in ('models','video/comfy-work/models','video/comfy-client-token') or not m['read_only']):raise ValueError('Deck-Volume nicht freigegeben; nur bekannte Modell-/Tokenpfade und LTX-Medienordner erlaubt.')
|
||||
for name,data in m.get('files',{}).items():
|
||||
allowed=('file','Settings.fds','Backends.fds')
|
||||
if c['name'] in ('athena-ladypoly','athena-separator-web','athena-voxcpm2-web','athena-omnivoice-web','athena-acestep-web','athena-applio-web','athena-xvc-web','athena-seed-vc-web','athena-soulx-singer-web') and m['target']=='/data':allowed+=('settings.json','deck-connection.json')
|
||||
if c['name'] in ('athena-ladypoly','athena-separator-web','athena-voxcpm2-web','athena-omnivoice-web','athena-acestep-web','athena-applio-web','athena-xvc-web','athena-soulx-singer-web') and m['target']=='/data':allowed+=('settings.json','deck-connection.json')
|
||||
if name not in allowed:raise ValueError('Unbekannte Konfigurationsdatei.')
|
||||
if not isinstance(data,str) or len(base64.b64decode(data,validate=True))>MAX_FILE:raise ValueError('Ungültige Konfigurationsdatei.')
|
||||
return c
|
||||
@@ -121,9 +119,9 @@ def restore(manager,c):
|
||||
# Never replace or restart an existing service during a restore.
|
||||
if x['Config']['Image'] not in (c['image'],c.get('registry')):raise ValueError('Vorhandener Container verwendet ein anderes Image; manuell prüfen.')
|
||||
return {'state':'reused','message':'Vorhandener markierter Container unverändert übernommen.'}
|
||||
if c['name'] in ('athena-ladypoly','athena-separator-web','athena-voxcpm2-web','athena-omnivoice-web','athena-acestep-web','athena-applio-web','athena-xvc-web','athena-seed-vc-web','athena-soulx-singer-web'):
|
||||
with socket.socket() as probe:probe.bind(('127.0.0.1',{'athena-ladypoly':8127,'athena-separator-web':8128,'athena-voxcpm2-web':8129,'athena-omnivoice-web':8130,'athena-acestep-web':8131,'athena-applio-web':8132,'athena-xvc-web':8133,'athena-seed-vc-web':8136,'athena-soulx-singer-web':8138}[c['name']]))
|
||||
if c.get('build_recipe') in ('swarm-ui','ladypoly','separator-web','voice-web','acestep-web','applio-web','xvc-web','seed-vc-web','soulx-singer-web'):
|
||||
if c['name'] in ('athena-ladypoly','athena-separator-web','athena-voxcpm2-web','athena-omnivoice-web','athena-acestep-web','athena-applio-web','athena-xvc-web','athena-soulx-singer-web'):
|
||||
with socket.socket() as probe:probe.bind(('127.0.0.1',{'athena-ladypoly':8127,'athena-separator-web':8128,'athena-voxcpm2-web':8129,'athena-omnivoice-web':8130,'athena-acestep-web':8131,'athena-applio-web':8132,'athena-xvc-web':8133,'athena-soulx-singer-web':8138}[c['name']]))
|
||||
if c.get('build_recipe') in ('swarm-ui','ladypoly','separator-web','voice-web','acestep-web','applio-web','xvc-web','soulx-singer-web'):
|
||||
source=Path(__file__).parent/c['build_recipe']
|
||||
if not (source/'Dockerfile').is_file():raise ValueError('Gepinntes Swarm-Build-Rezept fehlt im Systemhelfer.')
|
||||
if c['build_recipe']=='voice-web':
|
||||
@@ -151,7 +149,7 @@ def restore(manager,c):
|
||||
if base.is_symlink():raise ValueError('Unsicheres Dienstverzeichnis.')
|
||||
base.mkdir(parents=True,exist_ok=True,mode=0o700)
|
||||
args=['create','--name',name,'--network',c['network'],'--restart',c['restart'],'--cap-drop','ALL','--security-opt','no-new-privileges:true','--pids-limit','256']
|
||||
if c['name'] in ('athena-ladypoly','athena-separator-web','athena-voxcpm2-web','athena-omnivoice-web','athena-acestep-web','athena-applio-web','athena-xvc-web','athena-seed-vc-web','athena-soulx-singer-web'):
|
||||
if c['name'] in ('athena-ladypoly','athena-separator-web','athena-voxcpm2-web','athena-omnivoice-web','athena-acestep-web','athena-applio-web','athena-xvc-web','athena-soulx-singer-web'):
|
||||
args+=['--read-only','--tmpfs','/tmp:rw,noexec,nosuid,size='+('1g' if c['name']=='athena-separator-web' else '128m')+',uid=65534,gid=65534']
|
||||
if c['memory']:args+=['--memory',str(c['memory'])]
|
||||
if c['nanocpus']:args+=['--cpus',str(c['nanocpus']/1e9)]
|
||||
@@ -167,10 +165,10 @@ def restore(manager,c):
|
||||
source=deck/m['deck_path'] if m['deck_path'] is not None else base/str(i)
|
||||
if source.is_symlink():raise ValueError('Unsicheres Volume-Verzeichnis.')
|
||||
if m['deck_path']:
|
||||
if m['deck_path'] in ('video/comfy-client-token','applio-data/bridge-key','xvc-data/bridge-key','seed_vc-data/bridge-key','soulx_singer-data/bridge-key') and not source.exists():
|
||||
if m['deck_path'] in ('video/comfy-client-token','applio-data/bridge-key','xvc-data/bridge-key','soulx_singer-data/bridge-key') and not source.exists():
|
||||
import secrets
|
||||
source.parent.mkdir(parents=True,exist_ok=True);source.write_text(secrets.token_urlsafe(48)+'\n');source.chmod(0o600);os.chown(source,65534,65534)
|
||||
elif m['deck_path'] not in ('video/comfy-client-token','applio-data/bridge-key','xvc-data/bridge-key','seed_vc-data/bridge-key','soulx_singer-data/bridge-key'):
|
||||
elif m['deck_path'] not in ('video/comfy-client-token','applio-data/bridge-key','xvc-data/bridge-key','soulx_singer-data/bridge-key'):
|
||||
source.mkdir(parents=True,exist_ok=True)
|
||||
if m['deck_path'].startswith('video/original-work/'):
|
||||
is_input=m['deck_path'].endswith('/deskweb');os.chown(source,1000 if is_input else 65534,65534);source.chmod(0o2770 if is_input else 0o2750)
|
||||
|
||||
+2
-4
@@ -20,8 +20,6 @@ FILES = ['assets/tts-presets/bundle.safetensors','assets/tts-presets/bundle.json
|
||||
|
||||
FILES += ['soulx_singer.py','soulx_singer_runtime.py','soulx-singer-ui.js','deploy/prepare_soulx_singer.py']
|
||||
FILES += sorted(str(p.relative_to(ROOT)) for folder in ('soulx-singer-web','soulx-singer-svc') for p in (ROOT/'deploy'/folder).rglob('*') if p.is_file() and '__pycache__' not in p.parts)
|
||||
FILES += ['seed_vc.py','seed_vc_runtime.py','seed_vc_sources.json','seed-vc-ui.js','deploy/seed-vc-requirements.lock','deploy/prepare_seed_vc.py']
|
||||
FILES += sorted(str(p.relative_to(ROOT)) for p in (ROOT/'deploy/seed-vc-web').rglob('*') if p.is_file() and '__pycache__' not in p.parts)
|
||||
FILES += ['xvc.py','xvc_runtime.py','xvc_sources.json','xvc-ui.js','deploy/xvc-requirements.lock','deploy/prepare_xvc.py']
|
||||
FILES += ['cuda_overlay.py','remix.py','remix_runtime.py','remix_worker.py','remix_sources.json','clearvoice_worker.py','deploy/ladypoly/patch_remix.py']
|
||||
FILES += ['speech_text.py']
|
||||
@@ -149,8 +147,8 @@ def launch(config):
|
||||
'-p','127.0.0.1:'+str(config['port'])+':8108',
|
||||
'--health-cmd', 'python3 -c "import urllib.request,json; assert json.load(urllib.request.urlopen(\'http://127.0.0.1:8108/api/v1/auth/status\',timeout=3))[\'initialized\']"',
|
||||
'--health-interval','30s','--health-timeout','5s','--health-retries','3']
|
||||
if config['port'] in (8134,8135,8137,8139) or set(config.get('api_ports',[])) & {8134,8135,8137,8139}:raise RuntimeError('Ports 8134/8135/8137 sind für interne Stimmwerkzeug-Brücken reserviert.')
|
||||
args+=['-p','127.0.0.1:8134:8134','-p','127.0.0.1:8135:8135','-p','127.0.0.1:8137:8137','-p','127.0.0.1:8139:8139']
|
||||
if config['port'] in (8134,8135,8139) or set(config.get('api_ports',[])) & {8134,8135,8139}:raise RuntimeError('Ports 8134/8135/8139 sind für interne Stimmwerkzeug-Brücken reserviert.')
|
||||
args+=['-p','127.0.0.1:8134:8134','-p','127.0.0.1:8135:8135','-p','127.0.0.1:8139:8139']
|
||||
if config.get('api_ports'):
|
||||
args+=['-e','DECK_API_BIND=0.0.0.0','-e','DECK_API_PORTS='+','.join(map(str,config['api_ports']))]
|
||||
for port in config['api_ports']:args+=['-p',f'127.0.0.1:{port}:{port}']
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
"""Prepare Seed-VC without starting services; merge its inactive profile only after Deck stops."""
|
||||
import hashlib,json,os,secrets,subprocess,sys,time,uuid
|
||||
from pathlib import Path
|
||||
sys.path.insert(0,str(Path(__file__).resolve().parent.parent))
|
||||
from catalog import Catalog
|
||||
from seed_vc_runtime import SeedVCRuntime
|
||||
|
||||
def prepare(state,create_container=True):
|
||||
state=Path(state).resolve();runtime=SeedVCRuntime(state/'seed_vc-runtime',None)
|
||||
python,source=runtime.paths()
|
||||
# The venv interpreter targets Deck's bundled Python, which lives inside its image.
|
||||
if not (python.exists() or python.is_symlink()) or not (source/'app_svc.py').is_file():raise ValueError('Seed-VC-Laufzeit zuerst installieren.')
|
||||
from seed_vc_runtime import ASSETS,REPO,MODEL_REVISION
|
||||
ident=hashlib.sha256((REPO+MODEL_REVISION+ASSETS[0]['file']).encode()).hexdigest();pending=state/'seed_vc-profile-pending.json'
|
||||
if pending.exists():
|
||||
row=json.loads(pending.read_text())
|
||||
if row.get('model_id')!=ident or row.get('api_id')!='seed-vc-singing':raise ValueError('Abweichendes vorbereitetes Seed-VC-Profil prüfen.')
|
||||
else:
|
||||
row=dict(id=uuid.uuid4().hex,revision=1,name='Seed-VC Gesang',api_id='seed-vc-singing',api_aliases=[],kind='voice',model_id=ident,parameters={},components={},presets=[],prompt_enhancer=None,updated_at=time.time())
|
||||
pending.write_text(json.dumps(row,indent=2));os.chown(pending,65534,65534)
|
||||
root=state/'seed_vc-data';root.mkdir(parents=True,exist_ok=True);os.chown(root,65534,65534)
|
||||
settings=root/'settings.json'
|
||||
if not settings.exists():settings.write_text(json.dumps({'device':'5080'}));os.chown(settings,65534,65534)
|
||||
key=root/'bridge-key'
|
||||
if not key.exists():key.write_text(secrets.token_urlsafe(48));key.chmod(0o600);os.chown(key,65534,65534)
|
||||
if not create_container:
|
||||
print('Seed-VC: inaktives Profil vorbereitet; kein Container gestartet oder registriert.');return
|
||||
name='athena-seed-vc-web';found=subprocess.run(['docker','inspect',name],capture_output=True,text=True)
|
||||
if found.returncode==0:
|
||||
row=json.loads(found.stdout)[0];labels=row['Config'].get('Labels') or {}
|
||||
if labels.get('io.athena-deck.managed')!='true' or labels.get('io.athena-deck.application')!='seed-vc-web':raise ValueError('Containername anderweitig belegt.')
|
||||
if row['State']['Running']:raise ValueError('Vorhandene Seed-VC-UI läuft bereits; Vorbereitung verändert sie nicht.')
|
||||
else:
|
||||
subprocess.run(['docker','create','--name',name,'--network','host','--restart','unless-stopped','--label','io.athena-deck.managed=true','--label','io.athena-deck.role=application','--label','io.athena-deck.application=seed-vc-web','--read-only','--cap-drop','ALL','--security-opt','no-new-privileges:true','--pids-limit','128','--memory','512m','--cpus','1','--tmpfs','/tmp:rw,noexec,nosuid,size=128m,uid=65534,gid=65534','--mount','type=bind,src='+str(key)+',dst=/run/secrets/seed-vc-bridge,readonly','athena-seed-vc-web:0.1.0-deck2'],check=True,stdout=subprocess.DEVNULL)
|
||||
print('Seed-VC: inaktives Profil vorbereitet, UI-Container gestoppt. Keine Endpunktfreigabe geändert.')
|
||||
|
||||
def apply_profile(state,deck='athena-deck-dev'):
|
||||
from profiles import Profiles
|
||||
result=subprocess.run(['docker','inspect',deck],capture_output=True,text=True,check=True)
|
||||
if json.loads(result.stdout)[0]['State']['Running']:raise ValueError('Deck läuft: Profil erst im späteren Wartungsfenster übernehmen.')
|
||||
state=Path(state);SeedVCRuntime(state/'seed_vc-runtime',None).ensure_library();row=json.loads((state/'seed_vc-profile-pending.json').read_text());profiles=Profiles(state/'profiles.json',Catalog(state/'models'))
|
||||
existing=next((p for p in profiles.rows if p.get('api_id')==row['api_id']),None)
|
||||
if existing:
|
||||
if existing['model_id']!=row['model_id']:raise ValueError('Seed-VC API-ID bereits anders belegt.')
|
||||
else:profiles.save(dict(id=None,revision=0,name=row['name'],api_id=row['api_id'],kind='voice',model_id=row['model_id'],parameters={}))
|
||||
os.chown(state/'profiles.json',65534,65534)
|
||||
print('Inaktives Seed-VC-Profil übernommen; Betriebsart und Freigaben unverändert.')
|
||||
if __name__=='__main__':
|
||||
if '--apply-profile' in sys.argv:apply_profile(sys.argv[1])
|
||||
else:prepare(sys.argv[1],create_container='--no-container' not in sys.argv)
|
||||
@@ -23,7 +23,7 @@ def key():
|
||||
return KEY.read_bytes().strip()+b'\n'
|
||||
|
||||
def sources():
|
||||
names=('soulx_singer-data','seed_vc-data','legacy-userdata','applio-data','xvc-data','voice-tests','music-jobs','acestep-jobs','separator-tests','image-tests','tts-tests')
|
||||
names=('soulx_singer-data','legacy-userdata','applio-data','xvc-data','voice-tests','music-jobs','acestep-jobs','separator-tests','image-tests','tts-tests')
|
||||
roots=[(STATE/n,'deck/'+n) for n in names]+[(STATE/'video/original-work/outputs','deck/video/original-work/outputs'),(STATE/'video/original-work/remote-inputs','deck/video/original-work/remote-inputs'),(STATE/'video/original-work/deskweb','deck/video/original-work/deskweb'),(Path('/opt/athena-ladypoly/data'),'services/ladypoly'),(Path('/opt/athena-deck-docker-apps'),'services/web-studios')]
|
||||
# Private locally-trained voices have no public replacement source.
|
||||
for p in (STATE/'models').glob('*/entry.json'):
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
absl-py==2.5.0
|
||||
aiofiles==24.1.0
|
||||
annotated-doc==0.0.5
|
||||
annotated-types==0.8.0
|
||||
anyio==4.15.1
|
||||
argbind==0.3.9
|
||||
asttokens==3.0.2
|
||||
audioread==3.1.0
|
||||
brotli==1.2.0
|
||||
certifi==2026.7.22
|
||||
cffi==2.1.1
|
||||
charset-normalizer==3.5.2
|
||||
click==8.5.0
|
||||
cloudpickle==3.1.2
|
||||
contourpy==1.3.3
|
||||
cycler==0.12.1
|
||||
decorator==5.3.1
|
||||
descript-audio-codec==1.0.0
|
||||
descript-audiotools==0.7.2
|
||||
docstring_parser==0.18.0
|
||||
einops==0.8.0
|
||||
executing==2.2.1
|
||||
fastapi==0.142.2
|
||||
ffmpy==1.0.0
|
||||
filelock==3.32.3
|
||||
fire==0.7.1
|
||||
flatten-dict==0.5.0
|
||||
fonttools==4.66.1
|
||||
fsspec==2026.7.0
|
||||
gradio==5.49.1
|
||||
gradio_client==1.13.3
|
||||
groovy==0.1.2
|
||||
grpcio==1.84.0
|
||||
h11==0.16.0
|
||||
hf-xet==1.6.0
|
||||
httpcore==1.0.9
|
||||
httpx==0.28.1
|
||||
huggingface-hub==0.36.0
|
||||
idna==3.20
|
||||
importlib_resources==7.1.0
|
||||
ipython==9.17.1
|
||||
ipython_pygments_lexers==1.1.1
|
||||
jedi==0.20.0
|
||||
Jinja2==3.1.6
|
||||
joblib==1.6.0
|
||||
julius==0.2.8
|
||||
kiwisolver==1.5.1
|
||||
lazy-loader==0.6
|
||||
librosa==0.10.2
|
||||
llvmlite==0.50.0
|
||||
Markdown==3.11
|
||||
markdown-it-py==4.2.0
|
||||
markdown2==2.5.5
|
||||
MarkupSafe==3.0.3
|
||||
matplotlib==3.9.4
|
||||
matplotlib-inline==0.2.2
|
||||
mdurl==0.1.2
|
||||
mpmath==1.3.0
|
||||
msgpack==1.2.3
|
||||
munch==4.0.0
|
||||
narwhals==2.26.0
|
||||
networkx==3.6.1
|
||||
numba==0.68.0
|
||||
numpy==1.26.4
|
||||
nvidia-cublas-cu12==12.8.4.1
|
||||
nvidia-cuda-cupti-cu12==12.8.90
|
||||
nvidia-cuda-nvrtc-cu12==12.8.93
|
||||
nvidia-cuda-runtime-cu12==12.8.90
|
||||
nvidia-cudnn-cu12==9.10.2.21
|
||||
nvidia-cufft-cu12==11.3.3.83
|
||||
nvidia-cufile-cu12==1.13.1.3
|
||||
nvidia-curand-cu12==10.3.9.90
|
||||
nvidia-cusolver-cu12==11.7.3.90
|
||||
nvidia-cusparse-cu12==12.5.8.93
|
||||
nvidia-cusparselt-cu12==0.7.1
|
||||
nvidia-nccl-cu12==2.27.3
|
||||
nvidia-nvjitlink-cu12==12.8.93
|
||||
nvidia-nvtx-cu12==12.8.90
|
||||
opentelemetry-api==1.45.0
|
||||
orjson==3.12.0
|
||||
packaging==26.3
|
||||
pandas==2.3.3
|
||||
parso==0.8.7
|
||||
pexpect==4.9.0
|
||||
pillow==11.3.0
|
||||
platformdirs==4.12.3
|
||||
pooch==1.9.0
|
||||
prompt_toolkit==3.0.53
|
||||
protobuf==3.19.6
|
||||
psutil==7.2.2
|
||||
ptyprocess==0.7.0
|
||||
pure_eval==0.2.4
|
||||
pycparser==3.0
|
||||
pydantic==2.11.10
|
||||
pydantic_core==2.33.2
|
||||
pydub==0.25.1
|
||||
Pygments==2.21.0
|
||||
pyloudnorm==0.2.0
|
||||
pyparsing==3.3.3
|
||||
pystoi==0.4.1
|
||||
python-dateutil==2.9.0.post0
|
||||
python-multipart==0.0.32
|
||||
pytz==2026.5
|
||||
PyYAML==6.0.2
|
||||
randomname==0.2.1
|
||||
regex==2026.9.29
|
||||
requests==2.34.2
|
||||
rich==15.0.0
|
||||
ruff==0.16.10
|
||||
safehttpx==0.1.7
|
||||
safetensors==0.8.0
|
||||
scikit-learn==1.9.1
|
||||
scipy==1.13.1
|
||||
semantic-version==2.10.0
|
||||
setuptools==78.1.0
|
||||
shellingham==1.5.4
|
||||
six==1.17.0
|
||||
soundfile==0.12.1
|
||||
soxr==1.1.0
|
||||
stack-data==0.6.3
|
||||
starlette==0.52.1
|
||||
sympy==1.14.0
|
||||
tensorboard==2.20.0
|
||||
tensorboard-data-server==0.7.2
|
||||
termcolor==3.3.0
|
||||
threadpoolctl==3.7.0
|
||||
tokenizers==0.20.3
|
||||
tomlkit==0.13.3
|
||||
torch==2.8.0+cu128
|
||||
torch-stoi==0.2.3
|
||||
torchaudio==2.8.0+cu128
|
||||
tqdm==4.70.1
|
||||
traitlets==5.16.1
|
||||
transformers==4.46.3
|
||||
triton==3.4.0
|
||||
typer==0.27.2
|
||||
typing-inspection==0.4.4
|
||||
typing_extensions==4.16.0
|
||||
tzdata==2026.5
|
||||
urllib3==2.8.0
|
||||
uvicorn==0.34.2
|
||||
wcwidth==0.9.2
|
||||
websockets==15.0.1
|
||||
Werkzeug==3.1.9
|
||||
@@ -1,6 +0,0 @@
|
||||
FROM python:3.12-slim-bookworm
|
||||
RUN pip install --no-cache-dir fastapi==0.115.12 uvicorn==0.34.2 httpx==0.28.1
|
||||
WORKDIR /ui
|
||||
COPY proxy.py ./
|
||||
USER 65534:65534
|
||||
CMD ["python","-m","uvicorn","proxy:app","--host","127.0.0.1","--port","8136","--no-access-log"]
|
||||
@@ -1,81 +0,0 @@
|
||||
# Seed-VC Gesang
|
||||
|
||||
Testintegration für reine Gesangsaufnahme plus Referenzstimme, ohne Training.
|
||||
Code: https://github.com/Plachtaa/seed-vc (archiviert am 21. November 2025).
|
||||
Verwendet ausschließlich das originale F0-konditionierte 44,1-kHz-Gesangsmodell,
|
||||
nicht das V2-Sprach-/Akzentmodell. Quelle, Melodie und Timing stammen aus dem
|
||||
Gesang; die Referenz liefert die Zielstimme. Qualität muss mit Nutzeraufnahmen
|
||||
beurteilt werden; eine technische Prüfung ist kein Hörtest.
|
||||
|
||||
## Native Ausführung
|
||||
|
||||
Der Modellworker ist ein unprivilegierter Unterprozess von Deck. Kein Docker-
|
||||
oder alter Router-Pfad ist für die Inferenz nötig. Die Umgebung enthält
|
||||
PyTorch/Torchaudio 2.8.0 mit CUDA 12.8 für RTX 3060/5080 und das vollständige
|
||||
Rezept in `deploy/seed-vc-requirements.lock`. Quellcode-Revision sowie neun
|
||||
Gewichts-/Konfigurationsdateien mit Hub-Revision, Größe und Prüfsumme stehen
|
||||
in `seed_vc_runtime.py` und `seed_vc_sources.json`.
|
||||
|
||||
Voraussetzungen des nativen Debian-Dienstes: Git, Python mit venv/pip (getestete
|
||||
Laufzeit Python 3.12), FFmpeg, libsndfile1, NVIDIA-Treiber mit CUDA-12.8-Support,
|
||||
Schreibrechte für die konfigurierte Deck-Zustandswurzel. Einrichtung über
|
||||
Laufzeiten → Seed-VC Gesang; alternativ als Dienstbenutzer aus dem Git-Checkout:
|
||||
|
||||
```sh
|
||||
python3 seed_vc_runtime.py --state-root /PFAD/ZUR/DECK-ZUSTANDSWURZEL
|
||||
```
|
||||
|
||||
Die Installation nutzt keine GPU und startet kein Modell. 15 GiB freier Platz
|
||||
werden vorab geprüft; gemessener Datenbedarf der ersten Umgebung ca. 10 GiB.
|
||||
Inferenz liest ausschließlich die geprüften lokalen Dateien (Hub offline).
|
||||
Der bestehende Gesamtinstaller ist weiterhin Docker-basiert; eine komplette
|
||||
Neuinstallation als nativer Deck-Dienst bleibt offen, siehe
|
||||
`deploy/NATIVE_INSTALL_REQUIREMENTS.md`.
|
||||
|
||||
## Steuerung und Oberfläche
|
||||
|
||||
Ein Profil `Seed-VC Gesang` vom Typ Stimmwerkzeug mit Architektur `seed_vc` und
|
||||
API-ID `seed-vc-singing` anlegen. Nur das jeweils gewählte Stimmprofil wird
|
||||
freigegeben. Kein TTS-Modell: es wird nicht in `/v1/audio/speech/models` angeboten.
|
||||
Nach Aktivierung Steuerung → Stimmwerkzeuge starten. Erst bei einem Auftrag
|
||||
wird eine GPU-Lease angefordert und das Modell geladen. Beim Moduswechsel
|
||||
wird der Worker entladen. Keine parallele Umgehung von Decks GPU-Steuerung.
|
||||
|
||||
Die kleine deutsche Gradio-Oberfläche bietet Gesang-/Referenz-Upload, Vorschau
|
||||
und WAV-Download. Standard: 40 Diffusionsschritte, unveränderte Länge, CFG 0,7,
|
||||
keine automatische F0-Anpassung, kein Tonhöhenversatz. Die Quelle wird vollständig
|
||||
in Abschnitten verarbeitet. Wie im Original werden nur die ersten 25 Sekunden
|
||||
der Referenz verwendet; die Oberfläche erklärt das ausdrücklich.
|
||||
|
||||
Optionaler, CPU-only UI-Proxy als registrierter Container unter Weitere Dienste:
|
||||
`athena-seed-vc-web`, Port 8136, Image `athena-seed-vc-web:0.1.0-deck2`.
|
||||
Native interne Oberfläche Port 8137; per Brückenschlüssel geschützt. Container
|
||||
enthält keine Gewichte und erhält keinen GPU-Zugriff. Falls die bestehende
|
||||
Containerinstallation noch läuft, bereitet `deploy/prepare_seed_vc.py` nur ein
|
||||
inaktives Profil und einen gestoppten Proxy vor. Mit `--no-container` wird auch die Registrierung des Proxys zurückgestellt,
|
||||
damit ein noch nicht aktualisierter Backup-Helfer unverändert arbeiten kann.
|
||||
Profilübernahme erst im
|
||||
Wartungsfenster mit `--apply-profile`; laufende Profile werden nicht überschrieben.
|
||||
|
||||
## Sicherung und Restore
|
||||
|
||||
Konfigurationsbackup: GPU-Einstellung, Profil, Originalgewicht-Metadaten,
|
||||
Quellcode-/Asset-Rezept und reproduzierbarer Proxy-Build. Eigene Referenzen und
|
||||
Ergebnisse unter `seed_vc-data` gehören in die verschlüsselte Nutzdatensicherung.
|
||||
`deploy/scheduled_backup.py` enthält diesen Ordner. Laufzeiten werden aus den
|
||||
Originalquellen mit festen Revisionen wiederbeschafft. Brückenschlüssel wird
|
||||
bei fehlendem Bestand lokal neu erzeugt. Auf dem Zielhost den Docker-Systemhelfer
|
||||
mit `deploy/setup_docker_helper.py` aktualisieren, damit das Proxy-Rezept vorhanden
|
||||
ist. Host-Pfade werden aus der Zustandswurzel abgeleitet.
|
||||
|
||||
## Prüfstand
|
||||
|
||||
Profil-, Lease-, Quellprüfsummen- und Restore-Tests in `test_seed_vc.py` und
|
||||
`test_backup.py`. Offline-CPU-Ladetest prüft alle tatsächlich genutzten Modellparameter und
|
||||
alle Zusatzmodelle. GPU- und Hörtest stehen bis zur bewussten Freigabe auf Athena
|
||||
noch aus. Ein vorbereitetes App-Image darf den laufenden Deck-Dienst nicht
|
||||
ungefragt ersetzen.
|
||||
|
||||
UI-Proxy deck2 erhält den Content-Encoding-Header bei komprimierten Gradio-Assets.
|
||||
Ohne ihn blieb der Browser trotz HTTP 200 leer. Deck und Modellworker benötigen
|
||||
für dieses Proxy-Update keinen Neustart; alte deck1-Sicherungen bleiben lesbar.
|
||||
@@ -1,92 +0,0 @@
|
||||
"""Small singing UI: pinned upstream SVC, lazy GPU load under Deck's voice lease."""
|
||||
import json,os,secrets,socket,threading,time,uuid
|
||||
from pathlib import Path
|
||||
from types import SimpleNamespace
|
||||
import gradio as gr
|
||||
import numpy as np
|
||||
import soundfile as sf
|
||||
from fastapi import FastAPI,Request
|
||||
from fastapi.responses import JSONResponse
|
||||
import uvicorn
|
||||
|
||||
LOCK=threading.RLock()
|
||||
ENGINE=None
|
||||
ASSETS=Path(os.environ['SEED_VC_ASSETS'])
|
||||
OUTPUT=Path(os.environ['SEED_VC_OUTPUT'])
|
||||
|
||||
def load_engine(device='cuda'):
|
||||
import app_svc as engine
|
||||
import torch,yaml
|
||||
engine.device=torch.device(device)
|
||||
original_load=engine.load_checkpoint
|
||||
def verified_load(model,optimizer,path,**kwargs):
|
||||
weights=torch.load(path,map_location='cpu',weights_only=True)['net']
|
||||
for key,module in model.items():
|
||||
saved={name.removeprefix('module.'):value for name,value in weights[key].items()}
|
||||
invalid=[name for name,param in module.named_parameters() if name not in saved or saved[name].shape!=param.shape]
|
||||
if invalid:raise RuntimeError('Seed-VC-Gewicht passt nicht zur Inferenzarchitektur: '+', '.join(invalid[:5]))
|
||||
del weights
|
||||
return original_load(model,optimizer,path,**kwargs)
|
||||
engine.load_checkpoint=verified_load
|
||||
# All model reads use the locally verified asset set, including auxiliary models.
|
||||
def local_model(repo,model_filename='pytorch_model.bin',config_filename=None):
|
||||
base=ASSETS/repo.replace('/','--')
|
||||
return (str(base/model_filename),str(base/config_filename)) if config_filename else str(base/model_filename)
|
||||
engine.load_custom_model_from_hf=local_model
|
||||
main=ASSETS/'Plachta--Seed-VC'
|
||||
config=yaml.safe_load((main/'config_dit_mel_seed_uvit_whisper_base_f0_44k.yml').read_text())
|
||||
config['model_params']['vocoder']['name']=str(ASSETS/'nvidia--bigvgan_v2_44khz_128band_512x')
|
||||
config['model_params']['speech_tokenizer']['name']=str(ASSETS/'openai--whisper-small')
|
||||
config_path=OUTPUT/'local-config.yml';config_path.write_text(yaml.safe_dump(config))
|
||||
args=SimpleNamespace(fp16=device.startswith('cuda'),checkpoint=str(main/'DiT_seed_v2_uvit_whisper_base_f0_44k_bigvgan_pruned_ft_ema_v2.pth'),config=str(config_path))
|
||||
(engine.model_f0,engine.semantic_fn,engine.vocoder_fn,engine.campplus_model,
|
||||
engine.to_mel_f0,engine.mel_fn_args,engine.f0_fn)=engine.load_models(args)
|
||||
engine.max_context_window=engine.sr//engine.hop_length*30
|
||||
engine.overlap_wave_len=engine.overlap_frame_len*engine.hop_length
|
||||
return engine
|
||||
|
||||
def convert(source,reference,steps=40,pitch=0,progress=gr.Progress()):
|
||||
global ENGINE
|
||||
if not source or not reference:raise gr.Error('Gesangsdatei und Referenzstimme hochladen.')
|
||||
with LOCK:
|
||||
connection=socket.socket(socket.AF_UNIX)
|
||||
try:
|
||||
connection.connect(os.environ['SEED_VC_LEASE_SOCKET']);connection.sendall(b'{"action":"reserve"}\n')
|
||||
with connection.makefile('rb') as stream:reply=json.loads(stream.readline(8193))
|
||||
if not reply.get('ok'):raise gr.Error(reply.get('error','Deck-Ressourcen nicht verfügbar.'))
|
||||
if reply['gpu']!=os.environ['CUDA_VISIBLE_DEVICES']:raise gr.Error('GPU-Auswahl geändert; Seed-VC erneut öffnen.')
|
||||
progress(0,desc='Gesangsmodell laden')
|
||||
if ENGINE is None:ENGINE=load_engine()
|
||||
started=time.monotonic();result=None
|
||||
progress(None,desc='Gesang umwandeln')
|
||||
for _,wave in ENGINE.voice_conversion(source,reference,int(steps),1.0,0.7,False,int(pitch)):
|
||||
if wave is not None:result=wave
|
||||
if result is None:raise gr.Error('Seed-VC lieferte keine vollständige Audiodatei.')
|
||||
sr,audio=result
|
||||
if sr!=44100 or not np.isfinite(audio).all():raise gr.Error('Ungültige Seed-VC-Audioausgabe.')
|
||||
path=OUTPUT/('Gesang-'+uuid.uuid4().hex[:12]+'.wav');sf.write(path,audio,sr,subtype='PCM_16')
|
||||
return str(path),str(path),f'Fertig · 44,1 kHz WAV · {time.monotonic()-started:.1f} s Verarbeitung'
|
||||
finally:connection.close()
|
||||
|
||||
with gr.Blocks(title='Seed-VC · Gesang') as demo:
|
||||
gr.Markdown('# Gesang mit deiner Referenzstimme\nGesangsdatei und Zielstimme hochladen. Melodie und Timing bleiben erhalten; kein Stimmtraining nötig. Die Qualität hängt von beiden Aufnahmen ab.')
|
||||
with gr.Row():
|
||||
source=gr.Audio(label='Reiner Gesang',type='filepath',sources=['upload'])
|
||||
reference=gr.Audio(label='Referenzstimme',type='filepath',sources=['upload','microphone'])
|
||||
gr.Markdown('Die Referenz wird wie im Original auf die ersten 25 Sekunden begrenzt. Der vollständige Quellgesang wird in Abschnitten verarbeitet. Verwende eine klare Einzelstimme ohne Begleitmusik.')
|
||||
run=gr.Button('Gesang umwandeln',variant='primary')
|
||||
with gr.Accordion('Einstellungen',open=False):
|
||||
steps=gr.Slider(1,200,value=40,step=1,label='Qualität / Diffusionsschritte')
|
||||
pitch=gr.Slider(-24,24,value=0,step=1,label='Tonhöhe verschieben (Halbtöne)')
|
||||
output=gr.Audio(label='Ergebnis',type='filepath');download=gr.File(label='WAV herunterladen');report=gr.Markdown()
|
||||
run.click(convert,[source,reference,steps,pitch],[output,download,report],api_name='convert')
|
||||
app=FastAPI()
|
||||
@app.middleware('http')
|
||||
async def protect(request:Request,call_next):
|
||||
key=Path(os.environ['SEED_VC_BRIDGE_KEY_FILE']).read_text().strip()
|
||||
if not secrets.compare_digest(request.headers.get('X-Seed-VC-Bridge',''),key):return JSONResponse({'detail':'Deck-Brücke erforderlich.'},status_code=403)
|
||||
return await call_next(request)
|
||||
@app.get('/health')
|
||||
def health():return {'status':'ready','model_loaded':ENGINE is not None}
|
||||
app=gr.mount_gradio_app(app,demo.queue(default_concurrency_limit=1),path='/',allowed_paths=[str(OUTPUT)])
|
||||
if __name__=='__main__':uvicorn.run(app,host='0.0.0.0',port=8137,access_log=False)
|
||||
@@ -1,24 +0,0 @@
|
||||
"""CPU-only forwarding UI; the native Deck backend owns model and GPU access."""
|
||||
from pathlib import Path
|
||||
import httpx
|
||||
from fastapi import FastAPI,Request
|
||||
from fastapi.responses import JSONResponse,StreamingResponse
|
||||
from starlette.background import BackgroundTask
|
||||
app=FastAPI();KEY=Path('/run/secrets/seed-vc-bridge')
|
||||
@app.api_route('/{path:path}',methods=['GET','POST','PUT','DELETE','PATCH','HEAD','OPTIONS'])
|
||||
async def proxy(path:str,request:Request):
|
||||
if request.method not in ('GET','HEAD','OPTIONS'):
|
||||
origin=request.headers.get('origin','');host=request.headers.get('host','')
|
||||
if origin.split('://',1)[-1]!=host and request.headers.get('X-SEED-VC-UI')!='1':return JSONResponse({'detail':'Same-origin control required.'},status_code=403)
|
||||
if int(request.headers.get('content-length','0'))>512*1024**2:return JSONResponse({'detail':'Upload zu groß.'},status_code=413)
|
||||
client=httpx.AsyncClient(timeout=180)
|
||||
try:
|
||||
headers={'X-SEED-VC-Bridge':KEY.read_text().strip(),'Host':request.headers.get('host','127.0.0.1:8136')}
|
||||
if request.headers.get('content-type'):headers['Content-Type']=request.headers['content-type']
|
||||
req=client.build_request(request.method,'http://127.0.0.1:8137/'+path,params=request.query_params,headers=headers,content=request.stream())
|
||||
response=await client.send(req,stream=True)
|
||||
async def close():await response.aclose();await client.aclose()
|
||||
safe={k:v for k,v in response.headers.items() if k in ('content-type','content-length','content-encoding','location','content-disposition')};safe['Cache-Control']='no-store'
|
||||
return StreamingResponse(response.aiter_raw(),status_code=response.status_code,headers=safe,background=BackgroundTask(close))
|
||||
except (OSError,httpx.HTTPError):
|
||||
await client.aclose();return JSONResponse({'detail':'Seed-VC ist vorbereitet, aber noch nicht gestartet. In Deck ein Seed-VC-Profil aktivieren und Stimmwerkzeuge starten.'},status_code=503)
|
||||
@@ -34,7 +34,7 @@ def main():
|
||||
(base/'acestep-web').mkdir(exist_ok=True)
|
||||
for name in ('Dockerfile','app.py','index.html'):
|
||||
shutil.copyfile(Path(__file__).parent/'acestep-web'/name,base/'acestep-web'/name)
|
||||
shutil.copytree(Path(__file__).parent/'seed-vc-web',base/'seed-vc-web',dirs_exist_ok=True,ignore=shutil.ignore_patterns('__pycache__'))
|
||||
shutil.copytree(Path(__file__).parent/'soulx-singer-web',base/'soulx-singer-web',dirs_exist_ok=True,ignore=shutil.ignore_patterns('__pycache__'))
|
||||
shutil.copytree(Path(__file__).parent/'xvc-web',base/'xvc-web',dirs_exist_ok=True,ignore=shutil.ignore_patterns('__pycache__'))
|
||||
shutil.copytree(Path(__file__).parent/'applio-web',base/'applio-web',dirs_exist_ok=True,ignore=shutil.ignore_patterns('__pycache__'))
|
||||
(base/'voice-web').mkdir(exist_ok=True)
|
||||
|
||||
Reference in new issue
Block a user