Skip to content

Commit

Permalink
remove logs and debugs, fix gpu index
Browse files Browse the repository at this point in the history
  • Loading branch information
painebenjamin committed Jan 18, 2024
1 parent 6d3b431 commit 04b73b3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/python/enfugue/api/controller/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_settings(self, request: Request, response: Response) -> Dict[str, Any]:
inpainting = "never"

settings = {
"gpu": self.configuration.get("enfugue.gpu", 0),
"gpu": self.configuration.get("enfugue.gpu.index", 0),
"safe": self.configuration.get("enfugue.safe", True),
"auth": not (self.configuration.get("enfugue.noauth", True)),
"max_queued_invocations": self.configuration.get("enfugue.queue", self.manager.DEFAULT_MAX_QUEUED_INVOCATIONS),
Expand Down Expand Up @@ -194,7 +194,7 @@ def update_settings(self, request: Request, response: Response) -> None:
self.user_config["enfugue.downloads.concurrent"] = request.parsed["max_concurrent_downloads"]

if "gpu" in request.parsed:
self.user_config["enfugue.gpu"] = int(request.parsed["gpu"])
self.user_config["enfugue.gpu.index"] = int(request.parsed["gpu"])

for controlnet in self.CONTROLNETS:
if controlnet in request.parsed:
Expand Down
2 changes: 1 addition & 1 deletion src/python/enfugue/diffusion/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def device(self) -> torch.device:
if not hasattr(self, "_device"):
from enfugue.diffusion.util import get_optimal_device

self._device = get_optimal_device(self.configuration.get("enfugue.gpu", None))
self._device = get_optimal_device(self.configuration.get("enfugue.gpu.index", None))
return self._device

@device.setter
Expand Down
2 changes: 0 additions & 2 deletions src/python/enfugue/diffusion/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2017,7 +2017,6 @@ def predict_noise_residual(
kwargs: Dict[str, Any] = {}
if added_cond_kwargs is not None:
kwargs["added_cond_kwargs"] = added_cond_kwargs
self.debug_tensors(**added_cond_kwargs)
if motion_attention_mask is not None:
kwargs["motion_attention_mask"] = motion_attention_mask
return self.unet(
Expand Down Expand Up @@ -2306,7 +2305,6 @@ def denoise_unchunked(
)
motion_attention_mask = torch.ones_like(motion_attention_audio_mask) * motion_attention_min
motion_attention_mask += motion_attention_audio_mask * (motion_attention_max - motion_attention_min)
logger.critical(motion_attention_mask)
else:
motion_attention_mask = None

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import Tuple, Any, TYPE_CHECKING
from typing import Tuple, Any, Optional, TYPE_CHECKING

if TYPE_CHECKING:
from torch import device as Device
Expand Down
2 changes: 1 addition & 1 deletion src/python/enfugue/interface/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def prepare_context(self, request: Request, response: Response) -> Dict[str, Any
ui_config = self.configuration.get("enfugue.ui.app", {})
if not isinstance(ui_config, dict):
ui_config = {}
logger.critical(self.configuration.get("server.secure", False))

paths = self.configuration["server.cms.path"]
if not self.configuration.get("server.secure", False) and self.configuration.get("server.domain", None) is None:
root = f"http://{request.host}/"
Expand Down

0 comments on commit 04b73b3

Please sign in to comment.