Commit Graph
9 Commits
Author SHA1 Message Date
Jason Hoku 1f77100ea8 refactor(remote_vae): delete remote_decode_hf, route worker through facade
- Deletes the urllib-based remote_decode_hf() function (moved to companion).
- Deletes the 'from .network_utils import huggingface_vae_decode...' import.
- RemoteVAEDecodeWorker._worker() now calls _companion_decode() instead.

The worker class (threading, manifest writing, dashboard events) is unchanged.
Only the network atom is forwarded to ComfyUI-USCG-RemoteVAE companion.
2026-05-19 13:14:15 -07:00
Jason Hoku e5f690eae5 feat(remote_vae): add facade for ComfyUI-USCG-RemoteVAE companion
Adds is_remote_vae_available(), get_endpoint_names(), _companion_decode()
plus INSTALL_INSTRUCTIONS constant. Lazy try-import of the companion module
returns a clear error if not installed. Old code paths still active; the
remote_decode_hf -> _companion_decode swap lands in the next task.

Also updates tests/conftest.py to load the real remote_vae module (via
importlib.util) so facade tests exercise actual code rather than a stub.
Adds network_utils real-load and diffusers/diffusers.image_processor stubs
to satisfy the remote_vae.py import chain in the test environment.
2026-05-19 13:08:27 -07:00
Jason HokuandClaude Opus 4.7 1f5adeb799 fix: extend image_format plumbing to remote VAE / upscales / distributed
Commit 490c519 added a webp/png/jpg dropdown but only flush_batch_with_vae
honored it. Three other save sites still hardcoded WEBP:
- flush_batch_with_remote_vae (image_generation.py)
- upscale_runner.py (3 sites in inline + deferred upscale paths)
- distribution_worker.py (PIL bytes shipped back to master)

Now all save sites read image_format from session_settings (orchestrator)
or the job spec (distributed) and match the format/extension.

Changes:
- remote_vae.py: RemoteVAEDecodeWorker accepts image_format kwarg; _worker
  uses it to pick format/extension at save time (the real save site for the
  remote VAE path — flush_batch_with_remote_vae only queues to the worker)
- generation_orchestrator.py: passes image_format to all RemoteVAEDecodeWorker
  constructors (initialize_remote_vae + 3 per-config sites); adds image_format
  to all 8 existing_data["meta"] writes so upscale_runner can read it from disk
- upscale_runner.py: reads image_format from manifest meta at thread start;
  uses _fmt/_ext locals at all 3 save sites (seedvr2, latent-decode, PIL)
- distribution_manager.py: injects _session_image_format into worker job
  config alongside existing _session_cooldown passthrough
- distribution_worker.py: reads _session_image_format from config; encodes
  bytes in the chosen format; stamps _image_ext on meta so master uses it
- distribution_routes.py: pops _image_ext from meta to build filename with
  correct extension before writing bytes to disk

Default behavior unchanged: all paths fall back to webp if image_format
is absent or unrecognised.

Code review found this in 490c519.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 13:29:52 -07:00
Jason HokuandClaude Opus 4.6 a413f3b722 refactor: migrate remote_vae.py to network gateway, remove urllib
HF_ENDPOINTS now imported from network_utils as single source of truth.
Tensor serialization and query string construction moved to gateway.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 02:17:54 -07:00
Jason HokuandClaude Opus 4.6 9ad8108fe9 fix: graceful fallback when diffusers is missing or outdated
Remove diffusers from requirements.txt to avoid conflicts with other
custom nodes that may pin older versions. Wrap the import in remote_vae.py
with try/except so the node loads fully even without diffusers — only
Remote VAE features are unavailable, with a clear error message guiding
users on how to fix it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 22:52:30 -07:00
JasonHoku 67a8cf65dd Integrate New Security Rules From Comfy Registry Scans. 2026-02-16 16:03:05 -08:00
JasonHoku 30894c4c82 Massive Overhaul, Config Builder Updates, Fixes, Smarter Optional Caching, UI Improvements, Filter Improvements & More! 2026-02-10 16:30:10 -08:00
JasonHoku 9d1afab458 Major Refactor, Optimizations & New Features: Move & MetaPack Favorited, Random Lora Selection, Lora & Model Entire Folder Loading, Smart JSON Node, WIP Config Builder 2026-02-06 00:07:47 -08:00
JasonHoku 5900fb20f2 Better Filters, Consolidated Top Bar, More Sorting Options, Improved Prompt Iteration Abilities, & Better Session Handling 2026-01-24 22:57:50 -08:00