#connect core.py with zluda on applio

1 messages · Page 1 of 1 (latest)

jaunty flame
#

so, the problem here is that my gpu is amd, well, igpu to be corrected: 780m. I install applio in my windows laptop and setup zluda succesfully. i tried to run with core.py cli so that i can automate some tasks, but it run on cpu instead. Now i tried to find a way to run zluda inside cli core.py, or something similar as long as i can use my amd gpu while connect to applio through api. As for via gradio api... that sucks

crisp dew
#

your setup doesn't seem powerful

#

cloud would be easier and faster for you

jaunty flame
#

it's true that cloud would be much easier, but it lack the fun of it

jaunty flame
#

haizz, try to run it with the rock: fail

crisp dew
jaunty flame
#

well, i don't even run heavy model, it should be fine, cuz i don't train

crisp dew
jaunty flame
runic raft
#

@jaunty flame there are torch builds for windows now for gfx1103

#

although for for gfx1103 specifically

runic raft
#

@jaunty flame also when you run core.py cli you need to run it using zluda\zluda -- env\python core.py

#

see run-applio-amd.bat

jaunty flame
# runic raft env\python -m pip install --index-url https://rocm.nightlies.amd.com/v2/gfx110X-...

interesting, i using https://github.com/scottt/rocm-TheRock/releases/tag/v6.5.0rc-pytorch-gfx110x from this, but not try to use that before

GitHub

Self-contained Pytorch wheels for gfx1100, gfx1101, gfx1102, gfx1103, gfx1151, and gfx1201 GPUs for Python 3.12 on Windows by @jammm

Mainly tested and known to run fast on the Strix Halo (gfx1151)...

runic raft
#

those are pretty old

jaunty flame
#

well, i'll try it out

jaunty flame
# runic raft env\python -m pip install --index-url https://rocm.nightlies.amd.com/v2/gfx110X-...

(C:\AI\Paimon\Applio\env) C:\AI\Paimon\Applio>python -m pip install --index-url https://rocm.nightlies.amd.com/v2/gfx110X-dgpu/ --pre torch torchaudio torchvision
Looking in indexes: https://rocm.nightlies.amd.com/v2/gfx110X-dgpu/
Requirement already satisfied: torch in c:\ai\paimon\applio\env\lib\site-packages (2.7.0a0+git3f903c3)
Requirement already satisfied: torchaudio in c:\ai\paimon\applio\env\lib\site-packages (2.7.0a0+52638ef)
Requirement already satisfied: torchvision in c:\ai\paimon\applio\env\lib\site-packages (0.22.0+9eb57cd)
Requirement already satisfied: filelock in c:\ai\paimon\applio\env\lib\site-packages (from torch) (3.19.1)
Requirement already satisfied: typing-extensions>=4.10.0 in c:\ai\paimon\applio\env\lib\site-packages (from torch) (4.15.0)
Requirement already satisfied: sympy>=1.13.3 in c:\ai\paimon\applio\env\lib\site-packages (from torch) (1.14.0)
Requirement already satisfied: networkx in c:\ai\paimon\applio\env\lib\site-packages (from torch) (3.5)
Requirement already satisfied: jinja2 in c:\ai\paimon\applio\env\lib\site-packages (from torch) (3.1.6)
Requirement already satisfied: fsspec in c:\ai\paimon\applio\env\lib\site-packages (from torch) (2025.9.0)
Requirement already satisfied: numpy in c:\ai\paimon\applio\env\lib\site-packages (from torchvision) (1.26.4)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in c:\ai\paimon\applio\env\lib\site-packages (from torchvision) (11.3.0)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\ai\paimon\applio\env\lib\site-packages (from sympy>=1.13.3->torch) (1.3.0)
Requirement already satisfied: MarkupSafe>=2.0 in c:\ai\paimon\applio\env\lib\site-packages (from jinja2->torch) (3.0.3)
Hmm, it's the same

runic raft
#

you need to uninstall old packages

jaunty flame
#

oh right, forgot it

runic raft
#

6.4.2 that one

jaunty flame
jaunty flame
jaunty flame
#

C:\AI\Paimon\Applio\env>"C:\AI\Paimon\Applio\env\python.exe" -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.device_count())"
True
1
hmm

#

what do i miss here

#

C:\AI\Paimon\Applio\env>"C:\AI\Paimon\Applio\env\python.exe" -c "import torch; print('CUDA/ZLUDA Available:', torch.cuda.is_available()); print('Number of GPUs:', torch.cuda.device_count()); print('GPU Name:', torch.cuda.get_device_name(0))"
CUDA/ZLUDA Available: True
Number of GPUs: 1
GPU Name: AMD Radeon 780M Graphics
welp, it does recognize my gpu though

#

what is wrong here i supposed

runic raft
#

set HIP_VISIBLE_DEVICES="0"
set ZLUDA_COMGR_LOG_LEVEL=1
SET DISABLE_ADDMM_CUDA_LT=1
zluda\zluda.exe -- env\python.exe

#

if you're using theRock wheels you should not be using zluda

#

to see the actual error you need to look at the console window that shows the error stack

jaunty flame
jaunty flame
runic raft
#

okay, so it probably says something about miopen and not being able to find kernels

jaunty flame
#

the miopen

runic raft
#

okay, use zluda method then

#

at least there are libraries available

jaunty flame
#

yeah, i'm on it right now

jaunty flame
#

big first step
C:\AI\Paimon>call conda activate paimon
[INFO] Starting TTS server in the background...
[INFO] Waiting for TTS server to initialize... (This may take a minute on first run)
✅ [INFO] TTS server is running and ready.
[INFO] Starting RVC server (Zluda/ROCm) in the background...
[INFO] Waiting for RVC server to initialize models... (This is the long wait!)

✅ [INFO] RVC server is running and models are loaded.

==================================================
🚀 RVC ENVIRONMENT CHECK 🚀
Status: READY
Model Loaded: ✅ Yes
Zluda/ROCm Env: Detected
Status: RVC is running successfully under Zluda/ROCm emulation.

jaunty flame
#

fuck, when i try to run this but the pitch extraction method doesn't allow using zluda/rocm emulation, or else it has error RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED

#

the pitch extraction method bring my entire code to force back to cpu

#

haizzzz

jaunty flame
#

i run out of option now, either run my entire code on cpu or nothing

jaunty flame
runic raft
#

every applio functionality can be ran using core.py

#

or directly

#

env\python rvc\train\preprocess\preprocess.py X:\Applio\logs\Book G:\Training\book3 32000 4 Simple False False 0 3.0 0.3 post

#

env\python rvc\train\extract\extract.py X:\Applio\logs\book rmvpe 4 0 32000 spin none 2

#

`env\python rvc\train\train.py VCTK_32k_spin_retune 5 50 rvc\models\pretraineds\hifi-gan\f0G32k_emb129.pth rvc\models\pretraineds\hifi-gan\f0D32k.pth 0 16 32000 False True False False 5 False "HiFi-GAN" False

`

#

example

jaunty flame
#

Yeah, but the problem here is the pitch extraction is tied to cuDNN, and i can't run it even with zluda

#

I even try to seperate pitch extraction to run with cpu, the rest run on zluda but it doesn't work either

#

I even manually edit the pipeline.py, but it creates more problem

#

I can't even run core.py without pitch extraction, because it's in the core of applio

runic raft
#

that's the purpose of rvc\lib\zluda.py

#

torch.backends.cudnn.enabled = False

#

rvc\train\extract\extract.py includes that file

#

with latest zluda you need to replace zluda.py with a shorter patch

jaunty flame
#

i haven't try that

#

well, no use

#

oh wait

#

seem about right, because my zluda file is exactly like this when the error occur

#

and i need to modify the extract.py to run the pitch extraction on only cpu

#

intesting, i'll try it later

jaunty flame
runic raft
#

with hip sdk 6.2.4+ you need a simple version of zluda,py from the text file above

jaunty flame
#

no, for send a text generate by llm to my rvc v2 model, and let applio send me a voice

runic raft
#

okay, so just a voice change

#

import zluda.py before you do from rvc.infer.infer import VoiceConverter

jaunty flame
#

well, speech to speech, i say something, it send to llm, llm answer, the answer tranfer to rvc

#

and it will generate a voice based on that text through tts and my rvc model

#

already done that, still, it's mandatory to include pitch extraction

runic raft
#

no

jaunty flame
runic raft
#
import rvc.lib.zluda

from rvc.infer.infer import VoiceConverter
infer_pipeline = VoiceConverter()

pth_path = r"logs\BillBurr\billbur.pth"
index_path = r""
input_path = r"X:\Applio\assets\audios\test_sample.wav"
embedder_model = "contentvec"
sid = 0

output_path = r"T:\test2.wav"
torch.manual_seed(1234)
infer_pipeline.convert_audio(audio_input_path=input_path,audio_output_path=output_path,model_path=pth_path,index_path=index_path,embedder_model=embedder_model,sid=sid)
jaunty flame
#

hmm

runic raft
#

like this

jaunty flame
#

yeah, that's voice changer for sure

runic raft
#

edge tts

#
import asyncio
import edge_tts

#tts settings
input_text = "tts.txt"
speaker = "en-GB-LibbyNeural"
rate = 0
input_path = "edge_out.wav"

async def main():
    rates = f"+{rate}%" if rate >= 0 else f"{rate}%"
    start_time1 = time.time()
    await edge_tts.Communicate(
        text,
        speaker,
        rate=rates,
    ).save(input_path)
    elapsed_time = time.time() - start_time1
    print(f"TTS gen time in {elapsed_time:.2f} seconds.")

if __name__ == "__main__":

    with open(input_text, 'r') as file:
        text = file.read()

    asyncio.run(main())
jaunty flame
#

but like i said, my procedure is i speak to my micro, then use stt to transfer it to text then send to llm, groq api to be exact, then the anwser of that llm will send back to tts model to became voice, then from that voice i changed it to my preference voice using my rvc model

#

or is there any smarter ways to do that?

runic raft
#

that's about right

jaunty flame
#

oh wait, actually i don't really need that pitch extraction

#

damn it, i have been so focusing on this problem that i took so long to realize that i don't need pitch extraction, i can you different method to yield similar result

jaunty flame
runic raft
#

pitch extraction is done in the pipeline automatically

#

you dont need anything else

jaunty flame
runic raft
#

a tts with voice cloning, depends on the language you need

#

edge tts requires internet connection and everything is going to Microsoft for processing

jaunty flame
jaunty flame
#

haizzz

#

whether i like it or not, it always use pitch extraction by default, which my gpu doesn't like at all

runic raft
#

i gave you an example how to do VC without core.py

jaunty flame
runic raft
#

yes

jaunty flame
#

yeah, i know it, but it have pipeline.py on it, whenever my code encounter with pipeline, it crash

#

fuck pitch extraction

runic raft
#

it should not, as long as you've imported torch and disabled cudnn before impoting vc

jaunty flame
#

haizz, it's no use though

#

i changed to gradio api, and unfortunely it works, while cli doesn't

#

how irony

runic raft
#

what is the error? you're doing something wrong

jaunty flame