Skip to content

Fix upscale model loader export bootstrap#148

Merged
pydn merged 7 commits intomainfrom
codex/issue-143-upscale-model-loader
Mar 28, 2026
Merged

Fix upscale model loader export bootstrap#148
pydn merged 7 commits intomainfrom
codex/issue-143-upscale-model-loader

Conversation

@pydn
Copy link
Copy Markdown
Owner

@pydn pydn commented Mar 21, 2026

This PR fixes the UpscaleModelLoader export/runtime path for current ComfyUI builds and updates the docs to reflect the current install and export flow.

What changed

  • initialize extra/custom nodes when a workflow references node types that are not yet loaded in the current runtime
  • prefer COMFYUI_PATH and keep the resolved ComfyUI path at the front of sys.path
  • defer loading NODE_CLASS_MAPPINGS until needed so exporter tests can inject fake mappings without importing the full ComfyUI runtime
  • make generated scripts include the helper needed to resolve COMFYUI_PATH at runtime
  • fall back to NODE_CLASS_MAPPINGS[...] for node classes that exist in the runtime but are not importable from a normal dotted module path
  • treat mapping-based node initialization as requiring the custom-node import path

Regression coverage

  • adds focused coverage for an upscale workflow using UpscaleModelLoader in tests/test_upscale_model_loader_export.py

Documentation updates

  • rewrites the README around the current supported usage modes:
    • Web UI export via File -> Save As Script
    • CLI export from API-format workflows
  • clarifies that Web UI support requires the repo to be discoverable through ComfyUI custom_nodes
  • documents COMFYUI_PATH more clearly for CLI/exported-script usage
  • updates screenshots/assets referenced by the README
  • adds clearer troubleshooting guidance for:
    • missing Save As Script
    • ComfyUI Desktop prompt() limitations
    • ComfyUI path resolution
    • runtime model/path issues

Verification

  • targeted regression passes locally:
    • uv run python -m unittest tests.test_upscale_model_loader_export -v

Scope

This PR intentionally includes the README/docs refresh already present on the branch along with the #143 fix. It does not include the separate runtime harness / E2E validation work or agent/spec scaffolding.

@pydn pydn marked this pull request as ready for review March 28, 2026 17:49
@pydn pydn force-pushed the codex/issue-143-upscale-model-loader branch from 433a987 to 62728cc Compare March 28, 2026 18:07
@pydn pydn force-pushed the codex/issue-143-upscale-model-loader branch from 62728cc to 380e701 Compare March 28, 2026 18:08
@pydn pydn merged commit cb5917e into main Mar 28, 2026
@pydn pydn deleted the codex/issue-143-upscale-model-loader branch March 28, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant