AI 教材
AIGC 教材
GenAI-projects 教材
PC軟體安裝
範例程式: git clone https://github.com/rkuo2000/GenAI
ComfyUI Now Supports Stable Diffusion 3.5!
- https://www.ismartta.com/
- https://www.vidwud.com/free-face-swap.html
- https://aifaceswap.io/#face-swap-playground
- https://remaker.ai/face-swap-free/
- https://www.swapface.org/
- download flux1-dev-fp8.safetensors
- download t5xxl_fp8_e4m3fn.safetensors
- download clip_l.safetensors
- download ae.safetensors
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
mv ~/Downloads/flux1-dev-fp8.safetensors ~/ComfyUI/models/unet/
mv ~/Downloads/t5xxl_fp8_e4m3fn.safetensors ~/ComfyUI/models/clip/
mv ~/Downloads/clip_l.safetensors ~/ComfyUI/models/clip/
mv ~/Downloads/ae.safetensors ~/ComfyUI/models/vae/
python main.py
-
open Browser at
http:127.0.0.1:8188
-
drag flux_dev_fp8_example.png to browser window to generate the work-flow chart
- edit text in
CLIP Text Encode (Positive Prompt)
- click
Queue Prompt
to generate image
pretty Asian woman was holding the flowers in her hands, Korean Model, real photo style, full body shot.
One girl, long hair, model, white background, white shirt, khaki Capri pants, khaki loafers, sitting on a stool, lazy pose, slightly tilting head, smiling, Asian beauty, loose-ting clothes, inting clothes , slightly raised foot, half-body shot, Canon R5 camera style, blurred background, indoor, natural light, some sunlight shining on the face,9 : 16.
- 建築設計提示詞
A modern office building design with 6 floors. The design language of the building is organic volume, curve design elements, natural leave or flower symbols.
gTranslate + SDXL-Lightning + TripoSR + Blender
- https://www.kaggle.com/code/rkuo2000/zero123plus
- https://www.kaggle.com/code/rkuo2000/zero123-controlnet
Kaggle: https://www.kaggle.com/code/rkuo2000/triposr
Code: https://github.com/apple/ml-depth-pro
Kaggle: https://www.kaggle.com/code/rkuo2000/depth-pro
SV4D
SV4D was trained to generate 40 frames (5 video frames x 8 camera views) at 576x576 resolution
musk_musetalk.mp4
Paper: Music Source Separation in the Waveform Domain
Code: facebookresearch/demucs
Kaggle: https://www.kaggle.com/code/rkuo2000/demucs
"Retrieval-based Voice Conversion" 和 "SoftVC VITS Singing Voice Conversion" 是兩種聲音轉換技術的不同變種。以下是它們之間的一些區別:
1.方法原理:
Retrieval-based Voice Conversion:這種方法通常涉及使用大規模的語音資料庫或語音庫,從中檢索與輸入語音相似的聲音樣本,並將輸入語音轉換成與檢索到的聲音樣本相似的聲音。它使用檢索到的聲音作為目標來進行聲音轉換。
SoftVC VITS Singing Voice Conversion:這是一種基於神經網路的聲音轉換方法,通常使用變分自動編碼器(Variational Autoencoder,VAE)或其他神經網路架構。專注於歌聲轉換,它的目標是將輸入歌聲樣本轉換成具有不同特徵的歌聲,例如性別、音調等。
2.應用領域:
Retrieval-based Voice Conversion 通常用於語音轉換任務,例如將一個人的語音轉換成另一個人的語音。它也可以用於歌聲轉換,但在歌聲轉換方面通常不如專門設計的方法表現出色。
SoftVC VITS Singing Voice Conversion 主要用於歌聲轉換任務,特別是針對歌手之間的音樂聲音特徵轉換,例如將男性歌手的聲音轉換成女性歌手的聲音,或者改變歌曲的音調和音樂特徵。
3.技術複雜性:
Retrieval-based Voice Conversion 的實現通常較為簡單,因為它主要依賴於聲音樣本的檢索和聲音特徵的映射。
SoftVC VITS Singing Voice Conversion 更複雜,因為它需要訓練深度神經網路模型,可能需要大量的數據和計算資源。
Blog: GPT-SoVITS 用 AI 快速複製你的聲音,搭配 Colab 免費入門
Code: https://github.com/RVC-Boss/GPT-SoVITS/
Kaggle: https://www.kaggle.com/code/rkuo2000/so-vits-svc-5-0
-
python gTTS.py "How are you" en
: generate gTTS.mp3 -
python gT2T.py "How are you" fr
: deep-translator -
python gSpeak.py "How are you" fr
: deep-translator, gTTS & Mpg123 -
Parler TTS:
python parler.py
-
Bark TTA:
python bark_en.py
,python bark_cn.py
-
Coqui TTS:
python coqui_en.py
,python coqui_zh.py
-
text-to-speech:
python text_to_speech.py
-
gTTS:
python gTTS.py "你好?" zh
-
gTranslate:
python gTranslate.py
Blog: 語音辨識API
- run server on local PC (with GPU):
python whisper_llm_server.py
- Generate audio file:
python ../gTTS.py "Hello, how are you?" en
- Post Audio to Server:
python post_audio.py
Large Language Models 教材
Prompt Engineering 教材
git clone https://github.com/rkuo2000/GenAI
cd GenAI/Text-to-Text
python gpt4free.py
(gpt-3.5-turbo)python gpt4all_prompting.py
python LLM_prompting.py
- colab_LLM_prompting.ipynb (on Colab T4)
python llm_server.py
(on GPU)python post_text.py
(on PC)
- colab_pyNgrok_LLM_server (on Colab T4)
- post-text client (on PC)
- Open colab to run pyngrok_Whisper_LLM_Server.ipynb on Colab T4
- Generate audio file:
python ../gTTS.py "Hello, how are you?" en
- Post Audio to Server:
python post_audio.py
ollama list
ollama run llama3.2
ollama run tinyllama
python ollama_chat.py
python ollama_stream.py
(print text in streaming mode)python ollama_curl.py
python ollama_speak.py
(ollama generated text, gTTS to speech, then mpg123 to speak)python ollama_speak_t2t.py
(ollama generated text, gTTS to speech, deep-translator to zh-TW, mpg123 to speak)
MIT App Inventor 2 example for using Google Gemini
-
Download Gemini_Talk.aia , import to [ai2.mit](https://ai2.appinventor.mit.edu/)
-
Get API Key and put into the
blank
(三星手機使用三星文字轉語音引擎應用程式, 語言設繁體中文會講不出話, 要改成簡體中文, 或使用英文)
fine-tune-gemma-7b-it-for-sentiment-analysis
fine-tune-llama-3-for-sentiment-analysis
fine-tune-gemma-models-in-keras-using-lora
- https://www.kaggle.com/code/tommyadams/fine-tuning-tinyllama
- https://www.kaggle.com/code/ejaz22/finetune-tinyllama-addr-extraction
- https://www.kaggle.com/code/schock/training-tinyllama-for-tool-calling
- python llava-1.5-7b-hf.py
- python llava-1.6-7b-hf.py
- forence-2.py
- phi-3.5-vision.py
- pixtral.py
- llama-3.2-vision.py
For running server, (use one of the following)
python llava_server.py
python llava_next_server.py
python phi3-vision_server.py
For running client, (post image & text to VLM server)
python post_imgtxt.py images/barefeet1.jpg
python whisper_llava_server.py
python ../gTTS.py "這是什麼有名的台南美食?" zh
(TTS)python post_imgau.py
(client)
python gemini_image.py
python gemini_jpg2csv.py
Kaggle: rkuo2000/swarm-llama3-groq
Colab: colab_Swarm_Llama3_Groq.ipynb
- 中二技能翻譯
這是一個 LangChain 練習專案,透過 LLM 結合 Riot API 取得的英雄技能翻譯,以 Few-Shot Prompt 的方式獲得中二的技能翻譯。