- Create README.md with project overview and setup instructions - Implement CI workflow for linting and testing across multiple Python versions - Add VS Code configuration files for development environment - Define NativeImageSizesNode with size presets and dynamic class mappings - Create utility functions for node registration in registry.py - Set up project metadata in pyproject.toml and requirements-dev.txt - Implement Windows helper script for linking to ComfyUI - Add tests for NativeImageSizesNode functionality and dynamic mappings
35 lines
956 B
PowerShell
35 lines
956 B
PowerShell
param(
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$ComfyUIPath,
|
|
|
|
[switch]$Force
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
$repoRoot = Split-Path -Parent $PSScriptRoot
|
|
$customNodesPath = Join-Path $ComfyUIPath "custom_nodes"
|
|
$targetPath = Join-Path $customNodesPath "comfyui_plugins"
|
|
|
|
if (-not (Test-Path $customNodesPath)) {
|
|
throw "Could not find custom_nodes at: $customNodesPath"
|
|
}
|
|
|
|
if (Test-Path $targetPath) {
|
|
if (-not $Force) {
|
|
throw "Target already exists: $targetPath. Re-run with -Force to replace it."
|
|
}
|
|
|
|
Remove-Item -Path $targetPath -Recurse -Force
|
|
}
|
|
|
|
try {
|
|
New-Item -ItemType SymbolicLink -Path $targetPath -Target $repoRoot | Out-Null
|
|
Write-Host "Created symlink: $targetPath -> $repoRoot"
|
|
}
|
|
catch {
|
|
Write-Warning "Symbolic link failed. Falling back to junction."
|
|
New-Item -ItemType Junction -Path $targetPath -Target $repoRoot | Out-Null
|
|
Write-Host "Created junction: $targetPath -> $repoRoot"
|
|
}
|