Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib_layerdiffusion/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ def estimate_augmented(self, pixel, latent):
in gpu vram with dimensions higher than 4, we move it to cpu, call torch.median()
and then move the result back to gpu.
'''
median = torch.median(result.cpu(), dim=0).values
result_cpu = result.cpu().float() # Convert to float32 on CPU
median = torch.median(result_cpu, dim=0).values
median = median.to(device=self.load_device, dtype=self.dtype)
else:
median = torch.median(result, dim=0).values
Expand Down