Skip to content

Runs out of memory on 128Gb Mac after processing compete due to buffer management issue #595

Description

@RDouglasSharp

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions