網頁

2026年11月17日 星期二

用 Cloudflare one Client 連線 ssh vnc

Cloudflare 網站
Zero Trust/Team & Resources/Devices
General profiles 選擇你的 profiles
Split tunnels 加入 Domain *.cf-ingrenn.kdns.fr

Zero Trust/Access controls/Applications
Create Application
Destinations: ssh.cf-ingrenn.kdns.fr
Allow access through browser-based RDP, SSH, or VNC sessions
Select the protocol you want to render in a web browser: SSH
Access policies: Policy details: Include Warp
Accept all available identity providers

Zero Trust/Access controls/Applications
Create Application
Destinations: vnc.cf-ingrenn.kdns.fr
Allow access through browser-based RDP, SSH, or VNC sessions
Select the protocol you want to render in a web browser: VNC
Access policies: Policy details: Include Warp
Accept all available identity providers

客戶端安裝並執行 Cloudflare one Client 連線
透過瀏覽器執行
ssh.cf-ingrenn.kdns.fr
vnc.cf-ingrenn.kdns.fr

2026年11月13日 星期五

建立 Cloudflare Tunnel

Networking/Overview
Cloudflare Tunnel 按 Create a tunnel
Tunnel name 此名可以自訂
選 Debian 64-bit
依據指示拷貝命令執行

$ systemctl status cloudflared

Networking/Tunnels
點入 tunnel 的 configure
Add route: Private hostname 
hostname: 內網主機名稱
注意: split tunnel 需加入 172.64.128.0/20
Add route: Private CIDR
內網主機所在的區網: 192.168.50.0/24

Zero Trust/Team & Resources/Devices
按 Management
Mesh connectivity
開啟 Allow all Cloudflare One traffic to reach enrolled devices

Zero Trust/Team & Resources/Devices
按 Device profiles
按 General profiles, 點選正確的 profile
按 Split tunnels
按 Add split tunnel entries
172.64.128.0/20
100.96.0.0/12

2026年11月12日 星期四

申請免費 Domain 並用 Cloudflare 代理

https://dashboard.katabump.com/auth/login
ingrenn.kdns.fr 使用 katabump 的 nameservers, 新增 Type:A, Name:@ 的 DNS records


cf-ingrenn.kdns.fr 使用 cloudflare 的 nameservers
cloudflare 網站選 Domains 按 Add domain, Add a site 要選 Connect a domain, 不是 Transfer a domain
方案選擇 Free
Replace your current nameservers with Cloudflare nameservers(用 Cloudflare 的 nameservers 替換 katabump 的 nameservers)
拷貝 Cloudflare 的 nameservers 到 katabump 的 nameservers


Cloudflare/Networking/Tunnels/Routes
Add a route 選 Published application
www.cf-ingrenn.kdns.fr: http://localhost:80(改成你的 HTTP port)
ssh.cf-ingrenn.kdns.fr: ssh://localhost:22
lssh.cf-ingrenn.kdns.fr: tcp://localhost:22
vnc.cf-ingrenn.kdns.fr: tcp://localhost:5900

C:\Program Files (x86)\cloudflared

~/.ssh/config 或 C:\users/user_name/.ssh\config 加入:
Host ssh.cf-ingrenn.kdns.fr
    ProxyCommand cloudflared access ssh --hostname %h
    User 你的使用者名
C:\>  ssh ssh.cf-ingrenn.kdns.fr

C:\> cloudflared access tcp --hostname lssh.cf-ingrenn.kdns.fr --url localhost:2222
2026-11-12T03:44:44Z INF Start Websocket listener host=localhost:2222
C:\> ssh -p 2222 spark@localhost
注意:上面是 localhost,不是 lssh.cf-ingrenn.kdns.fr

C:\> cloudflared access tcp --hostname vnc.cf-ingrenn.kdns.fr --url localhost:5900
開啟 VNC Viewer, 填入 localhost:5900
注意:上面是 localhost,不是 vnc.cf-ingrenn.kdns.fr

瀏覽器 https://www.cf-ingrenn.kdns.fr 會自動將 http 轉成 https

2026年7月27日 星期一

試著玩轉 comfyui

直到目前還不是我玩轉 comfyui 的時機,沒試過使用計費的 api, 使用在 dgx spark 上執行的 comfyui, 因為還要執行 Qwen3.6-35B-A3B-NVFP4, 所以只使用了 SDXL, 沒有使用 FLUX 1 和 FLUX 2
comfyui 版本更新快,不同版本,有不同的操作方式,不同的名稱,常常需要詢問可能的名稱,甚至需要去嘗試參數的真實作用,每次測試又需要等待長久時間,有影響的參數又非常多,甚至並不是直覺的越大越..., 越小越..., 可能是在中間的某一值,才有效果
一開始我是使用 openclaw 操作 comfyui, 浪費了很多時間才發現 Qwen3.6-35B-A3B-NVFP4 不夠聰明去操作 comfyui, 所以只能手動操作 comfyui, 不懂得問 ai

2026年6月9日 星期二

Open-webui 歷史對話過多,卡死

Admin Panel/Settings/Models
點選 模型 的編輯
點開 Advanced Params
max_tokens: 4096
num_ctx (Ollama): 32768
按 Save & Update

2026年4月27日 星期一

DGX Spark 安裝 faster-qwen3-tts

$ git clone https://github.com/andimarafioti/faster-qwen3-tts.git
$ cd faster-qwen3-tts/
$ uv venv
$ source .venv/bin/activate
$ python -c "import torch; assert torch.cuda.is_available(), 'CUDA not available'; print(f'PyTorch {torch.__version__}, CUDA {torch.version.cuda}, GPU: {torch.cuda.get_device_name(0)}')" || {
    echo ""
    echo "WARNING: CUDA not available. You may need to install a CUDA-enabled PyTorch wheel."
    echo "  uv pip install torch --index-url https://download.pytorch.org/whl/cu128 --python .venv/bin/python"
    echo "  Note: RTX 50xx / Blackwell GPUs need CUDA 12.8 wheels (PyTorch 2.7+)."
}
$ MAX_JOBS=6 uv pip install flash-attn --no-build-isolation
$ python3 -c "import flash_attn; print(f'Flash Attention version: {flash_attn.__version__}')"

$ uv pip install sounddevice
$ faster-qwen3-tts clone \
  --model /mnt/480SSD/models/Qwen3-TTS-12Hz-1.7B-Base \
  --text "你好,這是中英文語音 Zero-shot TTS 測試" \
  --language English \
  --ref-audio ref_audio.wav \
  --ref-text "I'm confused why some people have super short timelines, yet at the same time are bullish on scaling up reinforcement learning atop LLMs. If we're actually close to a human-like learner, then this whole approach of training on verifiable outcomes is doomed." \
  --output out.wav
$ faster-qwen3-tts custom --model /mnt/480SSD/models/Qwen3-TTS-12Hz-1.7B-CustomVoice --list-speakers --text aaa --output out.wav
$ faster-qwen3-tts custom \
  --model /mnt/480SSD/models/Qwen3-TTS-12Hz-1.7B-CustomVoice \
  --speaker aiden \
  --text "你好,這是中英文語音 Zero-shot TTS 測試" \
  --language English \
  --output out.wav
$ uv pip install -e ".[demo]"
$ uv pip install nano_parakeet
$ python demo/server.py --model /mnt/480SSD/models/Qwen3-TTS-12Hz-1.7B-Base
# open http://localhost:7860
$ uv pip install "faster-qwen3-tts[demo]"
$ ffmpeg -i /home/spark/DiskD/audio_llm/audio_openai/audio_openai/audio_files/6551d5b0-e35f-43ee-b262-79c55ad548ea.webm \
  -vn -acodec pcm_s16le -ar 44100 -ac 2 examples/hard_way.wav
$ python examples/openai_server.py \
    --model /mnt/480SSD/models/Qwen3-TTS-12Hz-1.7B-Base \
    --ref-audio examples/hard_way.wav \
    --ref-text "行路難,行路難,多歧路,今安在?長風破浪會有時,直掛雲帆濟滄海。" \
    --language English --port 8102
$ curl http://localhost:8102/v1/audio/speech \
    -H "Content-Type: application/json" \
    -d '{"model": "tts-1", "input": "你好,這是中英文語音 Zero-shot TTS 測試", "voice": "alloy", "response_format": "wav"}' \
    --output speech.wav

2026年4月17日 星期五

DGX Spark 安裝 VibeVoice

https://github.com/microsoft/VibeVoice/tree/main
但發現 TTS (語音合成) 的核心實作代碼已被移除。
https://github.com/vibevoice-community/VibeVoice/tree/main
https://github.com/dontriskit/VibeVoice-FastAPI/tree/main

$ git clone https://github.com/microsoft/VibeVoice.git
$ cd VibeVoice
$ uv venv --python 3.12
$ source .venv/bin/activate
$ vi pyproject.toml 移除 dependencies 下的 torch
$ uv sync
$ uv pip install --force-reinstall torch \
  --index-url https://download.pytorch.org/whl/cu130
$ uv pip install --upgrade setuptools wheel pip ninja
$ MAX_JOBS=2 uv pip install flash-attn --no-build-isolation

microsoft/VibeVoice-ASR

  --model_path microsoft/VibeVoice-Realtime-0.5B \
  --model_path microsoft/VibeVoice-1.5B \ xxx
$ python demo/realtime_model_inference_from_file.py \
  --model_path microsoft/VibeVoice-1.5B \
  --speaker_name Carter \
  --txt_path demo/text_examples/1p_vibevoice.txt

$ vi demo/vibevoice_asr_inference_from_file.py 將 dtype 改成 torch_dtype
        self.model = VibeVoiceASRForConditionalGeneration.from_pretrained(
            model_path,
            dtype=dtype,
            device_map=device if device == "auto" else None,
            attn_implementation=attn_implementation,
            trust_remote_code=True
        )
$ python demo/vibevoice_asr_inference_from_file.py \
  --model_path microsoft/VibeVoice-ASR \
  --audio_files=outputs/1p_vibevoice_generated.wav 


======================================
https://github.com/microsoft/VibeVoice/tree/main
但發現 TTS (語音合成) 的核心實作代碼已被移除。
https://github.com/vibevoice-community/VibeVoice/tree/main
https://github.com/dontriskit/VibeVoice-FastAPI/tree/main

$ git clone https://github.com/vibevoice-community/VibeVoice.git VibeVoice-community
$ cd VibeVoice-community
$ uv venv --python 3.12
$ source .venv/bin/activate
$ vi pyproject.toml 移除 dependencies 下的 torch, requires-python 改成 3.10
$ uv sync
$ uv pip install --force-reinstall torch \
  --index-url https://download.pytorch.org/whl/cu130
$ uv pip install --upgrade setuptools wheel pip ninja
$ MAX_JOBS=4 uv pip install flash-attn --no-build-isolation

#  --model_path vibevoice/VibeVoice-1.5B \
#  --model_path microsoft/VibeVoice-1.5B \ 也可使用
#  多人語音,單 speaker 可以,但多 speaker 會不清楚
$ python demo/inference_from_file.py \
  --model_path /mnt/480SSD/models/VibeVoice-1.5B \
  --speaker_name Xinran \
  --txt_path demo/text_examples/2p_yayi.txt

$ vi vibevoice/modular/modeling_vibevoice_asr.py 將 is_final_chunk 註解掉
                    # Encode chunk for acoustic tokenizer (don't sample yet)
                    acoustic_encoder_output = self.model.acoustic_tokenizer.encode(
                        chunk.unsqueeze(1),
                        cache=acoustic_encoder_cache,
                        sample_indices=sample_indices,
                        use_cache=True,
                        is_final_chunk=is_final,
                    )
                    acoustic_mean_segments.append(acoustic_encoder_output.mean)
                    
                    # Encode chunk for semantic tokenizer (take mean directly)
                    semantic_encoder_output = self.model.semantic_tokenizer.encode(
                        chunk.unsqueeze(1),
                        cache=semantic_encoder_cache,
                        sample_indices=sample_indices,
                        use_cache=True,
                        is_final_chunk=is_final,
                    )
                    semantic_mean_segments.append(semantic_encoder_output.mean)
$ vi vibevoice/modular/modular_vibevoice_text_tokenizer.py
參考 https://github.com/microsoft/VibeVoice/tree/main 的檔案,加入 VibeVoiceASRTextTokenizerFast 部分程式碼

$ python demo/vibevoice_asr_inference_from_file.py \
  --model_path /mnt/480SSD/models/VibeVoice-ASR \
  --audio_files=outputs/2p_yayi_generated.wav

$ python demo/vibevoice_asr_inference_from_file.py \
  --model_path /mnt/480SSD/models/VibeVoice-ASR \
  --audio_files=outputs/1p_Ch2EN_generated.wav

$ python demo/server.py
$ curl http://localhost:8100/v1/models
$ curl http://localhost:8100/v1/audio/voices
$ curl http://localhost:8100/v1/audio/transcriptions \
  -H "Content-Type: multipart/form-data" \
  -F "file=@/home/spark/DiskD/audio_llm/GPT-SoVITS/GPT-SoVITS/samples/output.wav" \
  -F "model=whisper-1"
$ curl http://localhost:8100/v1/audio/speech \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1",
    "input": "大家好,今天我們要測試 OpenAI 的語音合成功能。",
    "voice": "Xinran"
  }' \
  --output speech.wav
$ curl http://localhost:8100/v1/audio/voices

==========================================
建立安裝 wheel
$ uv pip install build
$ python -m build --wheel
$ ls dist
$ uv pip install path_to/VibeVoice-community/dist/vibevoice-0.1.0-py3-none-any.whl

$ python demo/tts_server.py