1. ComfyUI output conversion — triple copy spike (video_upscaler.py L516-530)
sample = ctx['final_video'] # Reference, no copy yet
sample = sample.cpu() # NEW copy on CPU (fp16). GPU copy still alive via ctx.
sample = sample.to(torch.float32) # NEW copy on CPU (fp32). Old CPU fp16 still alive.
# PEAK: GPU fp16 + CPU fp16 + CPU fp32 = ~3x video size simultaneously
Please fix this triple buffer issue. My mac has completed upscaling, and then the memory blows up due to 3 copies being made sending the result back to ComfyUI!
1. ComfyUI output conversion — triple copy spike (
video_upscaler.pyL516-530)