Files
Claude 59f11da248 Fix broken nodes, modernize Gemini nodes, and speed up loading
Bug fixes:
- FilterImages used imghdr, which was removed in Python 3.13; the import
  failure stopped the whole pack from loading. Now uses Pillow, and returns
  a newline-joined string instead of a list on a STRING output.
- Dynamic Conditioning / Dynamic Image Switch crashed with no inputs
  (unbound variable).
- Dynamic Start Index never advanced because ComfyUI cached its output;
  added IS_CHANGED. Same for Load Batch From Dir increment/random modes.
- Dynamic Delay Text always output "" (its timer result went nowhere);
  Collect and Distribute Text had the same timer problem.
- People Evaluation Node returned a bare string on errors and printed the
  whole prompt to the console.
- Raw latent saver/loader only worked for 1x4x128x128 latents. Now saves
  safetensors (same layout as ComfyUI's Save Latent) and still reads old files.
- web/index.js imported the appearance script with the wrong filename case
  (breaks on Linux/macOS); the console test script was auto-loaded on every
  page load and now lives in tools/.
- Workflow chaining used a hardcoded port 8188, and gives a clear error for
  UI-format (non-API) workflow files.

Gemini:
- Shared helper for both Gemini nodes; key config now defaults to the
  bundled assets/scripts/api_keys_config.json (paths relative to it), plus
  GEMINI_API_KEY env var support.
- "disable" thinking now actually disables it on 2.5 Flash, so thinking no
  longer eats max_output_tokens and returns empty text; "enable" uses the
  previously unused DEFAULT_THINKING_BUDGET.
- Seed is passed to the API; empty/blocked responses report why.
- Retired 2.0/preview models replaced; custom_model field for new models.
- Audio WAV encoding no longer depends on torchaudio's save backend.

Optimizations:
- Index switches (model/VAE/CLIP/text) use lazy inputs, so only the
  selected branch is evaluated.
- __init__ loads modules in a loop and isolates failures per module.
- Prompt nodes share one implementation, read prompt files at run time and
  re-run when the file changes (no restart needed).
- LoRA dropdowns use ComfyUI's cached file list and refresh without a
  restart; LoRA lookup searches all LoRA folders; hashing uses 1 MB chunks;
  DB writes are atomic.
- Load Batch Images concatenates once instead of per image.
- Custom Node Manager parses files instead of executing them.
- requirements.txt drops unused pins (importlib_metadata, packaging,
  opencv-python, sounddevice, standard-imghdr).

Version 2.10.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Lm4YDXhwj49hAA1RKS58Q
2026-10-22 11:42:48 +00:00
..