Skip to content

Unable to install extensions; THESE PACKAGES DO NOT MATCH THE HASHES #175

Closed as not planned

Description

@MrAshFar
Image

Activity

  1. yeshansachithak commented on Aug 2, 2026

    @yeshansachithak
    Image I am getting the same. Tried so many ways.
  2. yeshansachithak commented on Aug 3, 2026

    @yeshansachithak

    After so many tries. Here what I did as a workaround.

    1. First I cloned extensions manually

    cd ~/modly/output/extensions
    
    # Clone official extensions
    git clone https://github.com/lightningpixel/modly-hunyuan3d-mini-extension.git
    git clone https://github.com/lightningpixel/modly-hunyuan3d-mini-turbo-extension.git
    git clone https://github.com/lightningpixel/modly-hunyuan3d-mini-fast-extension.git
    git clone https://github.com/lightningpixel/modly-triposg-extension.git
    git clone https://github.com/lightningpixel/modly-trellis2-gguf-extension.git
    
    # Then run the setup script to configure them
    cd ~/modly
    

    2. Then, I run below script to create and set permission to the bash script file

    cat > ~/modly/setup-all-extensions.sh << 'EOF'
    #!/bin/bash
    
    # ============================================================
    # Modly Extensions Setup Script (Interactive)
    # ============================================================
    
    # Colors
    RED='\033[0;31m'
    GREEN='\033[0;32m'
    YELLOW='\033[1;33m'
    BLUE='\033[0;34m'
    CYAN='\033[0;36m'
    MAGENTA='\033[0;35m'
    BOLD='\033[1m'
    NC='\033[0m'
    
    EXTENSIONS_DIR="/home/yeshan/modly/output/extensions"
    PYTHON_EXE="/home/yeshan/.config/Modly/venv/bin/python"
    GPU_SM=120
    CUDA_VERSION=128
    LOG_FILE="/tmp/modly-setup-all.log"
    
    > $LOG_FILE
    
    # Functions
    print_header() { echo -e "${BOLD}${CYAN}$1${NC}" | tee -a $LOG_FILE; }
    print_success() { echo -e "${GREEN}✅ $1${NC}" | tee -a $LOG_FILE; }
    print_error() { echo -e "${RED}❌ $1${NC}" | tee -a $LOG_FILE; }
    print_warning() { echo -e "${YELLOW}⚠️  $1${NC}" | tee -a $LOG_FILE; }
    print_info() { echo -e "${BLUE}ℹ️  $1${NC}" | tee -a $LOG_FILE; }
    print_step() { echo -e "${MAGENTA}🔧 $1${NC}" | tee -a $LOG_FILE; }
    print_separator() { echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" | tee -a $LOG_FILE; }
    
    # Get extension status
    get_ext_status() {
        local ext_dir=$1
        if [ ! -f "$ext_dir/setup.py" ]; then
            echo "no_setup"
        elif [ ! -d "$ext_dir/venv" ]; then
            echo "missing"
        elif [ ! -f "$ext_dir/.modly/setup/setup-status.json" ]; then
            echo "missing_status"
        else
            status=$(grep -o '"status":"[^"]*"' "$ext_dir/.modly/setup/setup-status.json" 2>/dev/null | cut -d'"' -f4)
            if [ "$status" = "ready" ] || [ "$status" = "needs_weights" ]; then
                echo "ready"
            else
                echo "needs_repair"
            fi
        fi
    }
    
    # Show header
    clear
    print_separator
    print_header "  Modly Extensions Setup (Interactive)"
    print_separator
    echo -e "${BOLD}GPU SM:${NC} $GPU_SM (RTX 5060 Ti - Blackwell)" | tee -a $LOG_FILE
    echo -e "${BOLD}CUDA Version:${NC} $CUDA_VERSION" | tee -a $LOG_FILE
    echo -e "${BOLD}Extensions Dir:${NC} $EXTENSIONS_DIR" | tee -a $LOG_FILE
    print_separator
    echo ""
    
    # Build extension list
    declare -a ext_names=()
    declare -a ext_status=()
    declare -a ext_dirs=()
    
    for ext_dir in "$EXTENSIONS_DIR"/*/; do
        ext_name=$(basename "$ext_dir")
        status=$(get_ext_status "$ext_dir")
        
        if [ "$status" != "no_setup" ]; then
            ext_names+=("$ext_name")
            ext_dirs+=("$ext_dir")
            ext_status+=("$status")
        fi
    done
    
    # Show extensions with status
    echo -e "${BOLD}Available Extensions:${NC}"
    echo ""
    for i in "${!ext_names[@]}"; do
        status="${ext_status[$i]}"
        case $status in
            "ready")
                status_display="${GREEN}✓ Ready${NC}"
                ;;
            "missing"|"missing_status"|"needs_repair")
                status_display="${YELLOW}⚠ Needs Setup${NC}"
                ;;
            *)
                status_display="${RED}? Unknown${NC}"
                ;;
        esac
        printf "  %2d. ${BOLD}%s${NC} [%b]\n" $((i+1)) "${ext_names[$i]}" "$status_display"
    done
    
    echo ""
    print_separator
    echo ""
    
    # Selection options
    echo -e "${BOLD}Selection Options:${NC}"
    echo "  a - Select ALL extensions"
    echo "  m - Select MULTIPLE extensions (comma-separated numbers)"
    echo "  s - Select SINGLE extension (by number)"
    echo "  q - Quit without setting up"
    echo ""
    
    read -p "Enter your choice [a/m/s/q]: " choice
    
    case $choice in
        a|A)
            echo ""
            print_info "Selected ALL extensions for setup"
            selected_indices=()
            for i in "${!ext_names[@]}"; do
                if [ "${ext_status[$i]}" != "ready" ]; then
                    selected_indices+=($i)
                fi
            done
            ;;
        m|M)
            echo ""
            read -p "Enter extension numbers (comma-separated, e.g., 1,3,5): " input
            IFS=',' read -ra selected_nums <<< "$input"
            selected_indices=()
            for num in "${selected_nums[@]}"; do
                idx=$((num-1))
                if [ $idx -ge 0 ] && [ $idx -lt ${#ext_names[@]} ]; then
                    if [ "${ext_status[$idx]}" != "ready" ]; then
                        selected_indices+=($idx)
                    else
                        print_warning "Extension ${ext_names[$idx]} is already ready (skipping)"
                    fi
                else
                    print_error "Invalid number: $num"
                fi
            done
            ;;
        s|S)
            echo ""
            read -p "Enter extension number: " num
            idx=$((num-1))
            if [ $idx -ge 0 ] && [ $idx -lt ${#ext_names[@]} ]; then
                if [ "${ext_status[$idx]}" != "ready" ]; then
                    selected_indices=($idx)
                else
                    print_warning "Extension ${ext_names[$idx]} is already ready"
                    selected_indices=()
                fi
            else
                print_error "Invalid number: $num"
                selected_indices=()
            fi
            ;;
        q|Q)
            echo ""
            print_info "Exiting without setup"
            exit 0
            ;;
        *)
            print_error "Invalid choice"
            exit 1
            ;;
    esac
    
    # Check if any extensions selected
    if [ ${#selected_indices[@]} -eq 0 ]; then
        echo ""
        print_warning "No extensions selected for setup (or all are already ready)"
        exit 0
    fi
    
    # Show selected extensions
    echo ""
    print_separator
    print_info "Extensions to be set up:"
    for idx in "${selected_indices[@]}"; do
        echo "  - ${ext_names[$idx]}"
    done
    print_separator
    echo ""
    
    read -p "Proceed with setup? [y/N]: " confirm
    if [[ ! "$confirm" =~ ^[Yy]$ ]]; then
        print_info "Setup cancelled"
        exit 0
    fi
    
    echo ""
    print_separator
    print_header "  Running Setup..."
    print_separator
    echo ""
    
    # Setup selected extensions
    TOTAL=0
    SETUP=0
    FAILED=0
    
    for idx in "${selected_indices[@]}"; do
        ext_name="${ext_names[$idx]}"
        ext_dir="${ext_dirs[$idx]}"
        TOTAL=$((TOTAL + 1))
        
        echo ""
        print_separator
        print_step "Setting up $ext_name..."
        print_separator
        cd "$ext_dir"
        
        # Clean up
        if [ -d "venv" ]; then
            rm -rf venv
            print_info "Removed old venv"
        fi
        if [ -d ".modly/setup" ]; then
            rm -rf .modly/setup
            print_info "Removed old setup status"
        fi
        
        # Special handling for pi3
        if [ "$ext_name" = "pi3" ]; then
            print_warning "Using extended timeout for pi3 (slow downloads)..."
            export PIP_TIMEOUT=600
            export PIP_RETRIES=20
        fi
        
        print_info "Running setup (this may take a few minutes)..."
        echo "" | tee -a $LOG_FILE
        
        # Run setup
        $PYTHON_EXE setup.py "{\"python_exe\":\"$PYTHON_EXE\",\"ext_dir\":\"$ext_dir\",\"gpu_sm\":$GPU_SM,\"cuda_version\":$CUDA_VERSION}" 2>&1 | tee -a $LOG_FILE
        
        if [ ${PIPESTATUS[0]} -eq 0 ]; then
            echo "" | tee -a $LOG_FILE
            print_success "$ext_name - Setup completed successfully"
            SETUP=$((SETUP + 1))
        else
            echo "" | tee -a $LOG_FILE
            print_error "$ext_name - Setup FAILED"
            FAILED=$((FAILED + 1))
        fi
        print_separator
    done
    
    # Summary
    echo ""
    print_separator
    print_header "  Setup Summary"
    print_separator
    echo -e "${BOLD}Total processed:${NC} $TOTAL" | tee -a $LOG_FILE
    print_success "Successfully configured: $SETUP"
    if [ $FAILED -gt 0 ]; then
        print_error "Failed: $FAILED"
    else
        print_success "Failed: 0"
    fi
    print_separator
    echo -e "${BOLD}Full log:${NC} $LOG_FILE" | tee -a $LOG_FILE
    
    if [ $FAILED -gt 0 ]; then
        echo ""
        print_warning "Some extensions failed. Retry individually:"
        for idx in "${selected_indices[@]}"; do
            if [ "${ext_status[$idx]}" != "ready" ]; then
                echo -e "  ${CYAN}cd ${ext_dirs[$idx]}${NC}" | tee -a $LOG_FILE
                echo -e "  ${CYAN}$PYTHON_EXE setup.py '{\"python_exe\":\"$PYTHON_EXE\",\"ext_dir\":\"${ext_dirs[$idx]}\",\"gpu_sm\":$GPU_SM,\"cuda_version\":$CUDA_VERSION}'${NC}" | tee -a $LOG_FILE
            fi
        done
    fi
    
    echo ""
    print_success "Done! Run Modly with: npm run dev"
    echo ""
    
    EOF
    
    chmod +x ~/modly/setup-all-extensions.sh
    

    3. After that I simply did run

    # Run the script
    cd ~/modly
    ./setup-all-extensions.sh
    
    # Then choose:
    # a - Set up ALL extensions that need it
    # m - Set up specific extensions (e.g., 1,3,5)
    # s - Set up one extension (e.g., 10 for trellis-text)
    # q - Quit
    

    Now I can see it is downloading without an issue. Waiting for it to complete to test the Modly.

    Hope this might help us.

    Preview of the script

    Image
  3. lightningpixel commented on Nov 14, 2026

    @lightningpixel
    Owner

    Extension installs are more reliable since v0.4.1. Reopen with the setup log if it still happens on the latest version.

  4. moved this from Backlog to Done in Modly Boardon Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions