Vision-language model nodes for ComfyUI using Tencent's Penguin-VL. Includes image query, video query, batch image query, and model loader nodes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
649 B
Python
27 lines
649 B
Python
"""
|
|
Path utilities for FL PenguinVL.
|
|
Handles model directory resolution.
|
|
"""
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
def get_models_directory() -> Path:
|
|
"""
|
|
Get the ComfyUI models/penguin_vl directory.
|
|
Creates the directory if it doesn't exist.
|
|
|
|
Returns:
|
|
Path to models/penguin_vl directory
|
|
"""
|
|
try:
|
|
import folder_paths
|
|
base = Path(folder_paths.models_dir)
|
|
except Exception:
|
|
# Fallback for non-ComfyUI environments
|
|
base = Path(__file__).parent.parent.parent.parent.parent / "models"
|
|
|
|
models_dir = base / "penguin_vl"
|
|
models_dir.mkdir(parents=True, exist_ok=True)
|
|
return models_dir
|