We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dhofheinz/mcp-comfyui-flux'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test-hf-api.sh•1.57 kB
#!/bin/bash
# Test script to demonstrate dynamic file size fetching from Hugging Face
set -e
# Colors
GREEN='\033[0;32m'
CYAN='\033[0;36m'
YELLOW='\033[1;33m'
NC='\033[0m'
echo -e "${CYAN}Testing Hugging Face API file size fetching...${NC}\n"
# Test fetching file size using HEAD request
test_file_size() {
local url=$1
local name=$2
echo -e "${YELLOW}Testing: $name${NC}"
echo "URL: $url"
# Get size using curl HEAD request
if command -v curl &> /dev/null; then
local size=$(curl -sI -L "$url" 2>/dev/null | grep -i "content-length" | tail -1 | awk '{print $2}' | tr -d '\r')
if [ -n "$size" ] && [ "$size" -gt 0 ]; then
# Convert to human readable
local size_gb=$(awk "BEGIN {printf \"%.2f\", $size/1073741824}")
echo -e "${GREEN}✓ File size: ${size} bytes (${size_gb} GB)${NC}"
else
echo "Failed to get size"
fi
fi
echo ""
}
# Test a few Qwen model files
echo -e "${CYAN}=== Testing Qwen Model File Sizes ===${NC}\n"
test_file_size \
"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors" \
"Qwen VAE"
test_file_size \
"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors" \
"Qwen Text Encoder"
echo -e "${CYAN}Test complete!${NC}"
echo "This demonstrates that the script fetches actual file sizes dynamically,"
echo "not using hardcoded values that could become outdated."