Instructions to use IgorGent/Vid with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use IgorGent/Vid with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf IgorGent/Vid:BF16 # Run inference directly in the terminal: llama cli -hf IgorGent/Vid:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf IgorGent/Vid:BF16 # Run inference directly in the terminal: llama cli -hf IgorGent/Vid:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf IgorGent/Vid:BF16 # Run inference directly in the terminal: ./llama-cli -hf IgorGent/Vid:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf IgorGent/Vid:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf IgorGent/Vid:BF16
Use Docker
docker model run hf.co/IgorGent/Vid:BF16
- LM Studio
- Jan
- Ollama
How to use IgorGent/Vid with Ollama:
ollama run hf.co/IgorGent/Vid:BF16
- Unsloth Desktop
- Docker Model Runner
How to use IgorGent/Vid with Docker Model Runner:
docker model run hf.co/IgorGent/Vid:BF16
- Lemonade
How to use IgorGent/Vid with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull IgorGent/Vid:BF16
Run and chat with the model
lemonade run user.Vid-BF16
List all available models
lemonade list
- Atomic Chat
Upload send_to_backend.py
Browse files- send_to_backend.py +55 -0
send_to_backend.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
+
class SendVideoToBackend:
|
| 5 |
+
@classmethod
|
| 6 |
+
def INPUT_TYPES(s):
|
| 7 |
+
return {
|
| 8 |
+
"required": {
|
| 9 |
+
"filenames": ("VHS_FILENAMES",),
|
| 10 |
+
"url": ("STRING", {"default": "http://your-backend.com/api/upload"}),
|
| 11 |
+
"field_name": ("STRING", {"default": "video"}),
|
| 12 |
+
},
|
| 13 |
+
"optional": {
|
| 14 |
+
"auth_token": ("STRING", {"default": ""}),
|
| 15 |
+
}
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
RETURN_TYPES = ("STRING",)
|
| 19 |
+
FUNCTION = "send_video"
|
| 20 |
+
OUTPUT_NODE = True
|
| 21 |
+
CATEGORY = "Backend"
|
| 22 |
+
|
| 23 |
+
def send_video(self, filenames, url, field_name, auth_token=""):
|
| 24 |
+
# Ищем именно mp4 файл в списке путей
|
| 25 |
+
file_path = None
|
| 26 |
+
for path in filenames[1]:
|
| 27 |
+
if path.lower().endswith(".mp4"):
|
| 28 |
+
file_path = path
|
| 29 |
+
break
|
| 30 |
+
|
| 31 |
+
# Если mp4 не нашли, берем первый доступный файл
|
| 32 |
+
if file_path is None:
|
| 33 |
+
file_path = filenames[1][0]
|
| 34 |
+
|
| 35 |
+
if not os.path.exists(file_path):
|
| 36 |
+
return (f"Error: File {file_path} not found",)
|
| 37 |
+
|
| 38 |
+
headers = {}
|
| 39 |
+
if auth_token:
|
| 40 |
+
headers["Authorization"] = f"Bearer {auth_token}"
|
| 41 |
+
|
| 42 |
+
# Определяем правильный MIME-тип в зависимости от расширения
|
| 43 |
+
mime_type = 'video/mp4' if file_path.lower().endswith(".mp4") else 'image/png'
|
| 44 |
+
|
| 45 |
+
with open(file_path, 'rb') as f:
|
| 46 |
+
files = {field_name: (os.path.basename(file_path), f, mime_type)}
|
| 47 |
+
response = requests.post(url, files=files, headers=headers)
|
| 48 |
+
|
| 49 |
+
if response.status_code == 200:
|
| 50 |
+
return (f"Success: {response.text}",)
|
| 51 |
+
else:
|
| 52 |
+
return (f"Error {response.status_code}: {response.text}",)
|
| 53 |
+
|
| 54 |
+
NODE_CLASS_MAPPINGS = {"SendVideoToBackend": SendVideoToBackend}
|
| 55 |
+
NODE_DISPLAY_NAME_MAPPINGS = {"SendVideoToBackend": "🚀 Send Video to Backend"}
|