Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ WebUI/external/service/
WebUI/external/workflows_intel/
WebUI/external/workflows_bak/

7zr.exe
*.7z
*.whl
hijacks/
Expand Down
5 changes: 2 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1923,9 +1923,8 @@ const monitorWorkflowPerformance = (workflow: ComfyUIWorkflow) => {
cd WebUI
npm install

# Prepare Python environment
npm run fetch-build-resources -- --conda_env_dir=<path_to_conda_env>
npm run prepare-build
# Fetch build resources
npm run fetch-build-resources

# Start development mode
npm run dev
Expand Down
10 changes: 1 addition & 9 deletions WebUI/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@
## Fetch remote dependencies for build

1. run `npm install`
2. aquire windows libuv dlls, e.g. via miniforge:
- Install miniforge: https://github.com/conda-forge/miniforge
- Create a reference conda environment with libuv installed
```
conda create -n cp311_libuv python=3.11 libuv -y
# copy the path to this conda env
conda env list | findstr cp311_libuv
```
3. run `npm run fetch-build-resources -- --conda_env_dir=$PATH_TO_CONDA_ENV`
2. run `npm run fetch-build-resources`

## decide for offline or online installer

Expand Down
5 changes: 4 additions & 1 deletion WebUI/electron/subprocesses/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ export abstract class GenericServiceImpl implements GenericService {

readonly appLogger = appLoggerInstance
readonly baseDir = aipgBaseDir()
readonly buildResourcesDir = app.isPackaged
? aipgBaseDir()
: path.join(aipgBaseDir(), 'build', 'resources')

constructor(name: string) {
this.name = name
Expand Down Expand Up @@ -383,7 +386,7 @@ export class GitService extends ExecutableService {
'https://github.com/git-for-windows/git/releases/download/v2.51.2.windows.1/PortableGit-2.51.2-64-bit.7z.exe'
readonly sha256 = 'f5764d546ff9a2511b50ec4e20424c5f4669de1695abc3fa4128e7f7d4a7b2cd'
readonly zipPath = path.resolve(path.join(this.baseDir, 'portable-git.7z.exe'))
readonly unzipExePath = path.resolve(path.join(this.baseDir, '7zr.exe'))
readonly unzipExePath = path.resolve(path.join(this.buildResourcesDir, '7zr.exe'))

private async checkGitZip(): Promise<boolean> {
if (!filesystem.existsSync(this.zipPath)) {
Expand Down
25 changes: 4 additions & 21 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,31 +67,14 @@ cd WebUI
npm install
```

### Prepare Python Environment
### Prepare Development Environment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check for other places where conda and the likes are mentioned?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 9ba814c. Removed conda references from AGENTS.md and WebUI/build/README.md. All documentation now reflects the simplified uv-based workflow.


1. Install Miniforge to manage your Conda environment: https://github.com/conda-forge/miniforge

2. Create a Conda environment with Python 3.11 and libuv:
```
conda create -n cp311_libuv python=3.11 libuv -y
```

3. Locate the path to your newly created Conda environment:
```
conda env list | findstr cp311_libuv
```

4. In the `WebUI` directory, execute the `fetch-build-resources` script, replacing `<path_to_cp311_libuv_conda_env>` with the actual path you copied in the previous step:
```
npm run fetch-build-resources -- --conda_env_dir=<path_to_cp311_libuv_conda_env>
```

5. Run the `prepare-build` script:
1. In the `WebUI` directory, run the `fetch-build-resources` script to download required build resources:
```
npm run prepare-build
npm run fetch-build-resources
```

You should now have a basic Python environment located at `build-envs\online\prototype-python-env`.
This will download `uv` (Python package manager) and other required tools to the `build/resources/` directory.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot
This is correct, but you still missed an important point. If set up like this, the following doesn't work as expected:

  • I open the App,
  • click "Install" on the "Ai Playground Setup" page in the "Ai Playground" row, and
  • Status: Failed
    And in the dev tools I can see:
    [ai-backend] Set up of service failed due to Error: Unzip error: Error: Command failed:
    and
    ai-playground\7zr.exe"' is not recognized as an internal or external command, operable program or batch file.
    I am sure it looks for 7zr in the wrong path. That is what was meant by that "adjust path" comment in the original ticket.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 24514e1. The GitService was looking for 7zr.exe in the repo root, but fetch-build-resources downloads it to build/resources/7zr.exe. I've added a buildResources() helper function (same pattern as in uv.ts) to correctly resolve the path to build/resources/7zr.exe in development mode and to the packaged resources path in production.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iirc there is some entry in the .gitignore, which should no longer be needed now.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit a400b82. Removed the obsolete 7zr.exe entry from .gitignore since the file is now at build/resources/7zr.exe, which is already covered by the /build/ entry on line 7.


### Launch the application

Expand Down