feat: remove GPU support and simplify to CPU-only architecture
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m35s
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m35s
This commit is contained in:
@@ -83,7 +83,7 @@ class RealESRGANBridge:
|
||||
tile=settings.tile_size,
|
||||
tile_pad=settings.tile_pad,
|
||||
pre_pad=0,
|
||||
half=('cuda' in settings.get_execution_providers()),
|
||||
half=False,
|
||||
)
|
||||
|
||||
self.current_model = model_name
|
||||
@@ -134,7 +134,7 @@ class RealESRGANBridge:
|
||||
tile=settings.tile_size,
|
||||
tile_pad=settings.tile_pad,
|
||||
pre_pad=0,
|
||||
half=('cuda' in settings.get_execution_providers()),
|
||||
half=False,
|
||||
)
|
||||
|
||||
self.current_model = model_name
|
||||
@@ -198,15 +198,6 @@ class RealESRGANBridge:
|
||||
return self.upsampler.scale
|
||||
return 4
|
||||
|
||||
def clear_memory(self) -> None:
|
||||
"""Clear GPU memory if available."""
|
||||
try:
|
||||
import torch
|
||||
torch.cuda.empty_cache()
|
||||
logger.debug('GPU memory cleared')
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
# Global instance
|
||||
_bridge: Optional[RealESRGANBridge] = None
|
||||
|
||||
Reference in New Issue
Block a user