f8d4d77b0d
CLIP weights are inference tensors from ComfyUI loading. inference_mode is thread-local, so the worker thread can't use CLIP even with a context manager. Pre-compute all text embeddings in the main thread (where inference_mode IS active), clone+detach to normal tensors, and pass them to the worker via text_clip_cache dict. CLIP no longer needs to be on GPU during pre-generation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>