-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreateMockData.ps1
More file actions
50 lines (46 loc) · 1.52 KB
/
CreateMockData.ps1
File metadata and controls
50 lines (46 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Create mock ComfyUI installation for testing
$mockPath = Join-Path $env:LOCALAPPDATA "Programs\@comfyorgcomfyui-electron"
Write-Host "Creating mock ComfyUI installation at: $mockPath" -ForegroundColor Cyan
# Create directories
New-Item -ItemType Directory -Path $mockPath -Force | Out-Null
New-Item -ItemType Directory -Path "$mockPath\models" -Force | Out-Null
New-Item -ItemType Directory -Path "$mockPath\custom_nodes" -Force | Out-Null
New-Item -ItemType Directory -Path "$mockPath\workflows" -Force | Out-Null
# Create mock files
@{
"config.json" = @"
{
"version": "1.0.0",
"settings": {
"theme": "dark",
"autoSave": true
}
}
"@
"workflow.json" = @"
{
"nodes": [],
"links": [],
"version": "0.1.0"
}
"@
"custom_nodes\test_node.py" = @"
# Test custom node
class TestNode:
def __init__(self):
pass
"@
"workflows\example.json" = '{"workflow": "example"}'
"models\test_model.safetensors" = "MOCK MODEL DATA " * 1000
"README.txt" = "This is a mock ComfyUI installation for testing the backup script."
} | ForEach-Object {
$filePath = Join-Path $mockPath $_.Key
$_.Value | Out-File -FilePath $filePath -Encoding UTF8
}
Write-Host "✓ Mock installation created successfully!" -ForegroundColor Green
Write-Host " Location: $mockPath" -ForegroundColor Yellow
Write-Host " Files created:" -ForegroundColor Yellow
Get-ChildItem -Path $mockPath -Recurse -File | ForEach-Object {
$relativePath = $_.FullName.Replace($mockPath, '')
Write-Host " - $relativePath" -ForegroundColor Gray
}