diff --git a/installer.py b/installer.py index 54b4d1971..52d476f22 100644 --- a/installer.py +++ b/installer.py @@ -112,7 +112,7 @@ def setup_logging(): })) logging.basicConfig(level=logging.ERROR, format='%(asctime)s | %(name)s | %(levelname)s | %(module)s | %(message)s', handlers=[logging.NullHandler()]) # redirect default logger to null pretty_install(console=console) - traceback_install(console=console, extra_lines=1, max_frames=10, width=console.width, word_wrap=False, indent_guides=False, suppress=[]) + traceback_install(console=console, extra_lines=1, max_frames=16, width=console.width, word_wrap=False, indent_guides=False, suppress=[]) while log.hasHandlers() and len(log.handlers) > 0: log.removeHandler(log.handlers[0]) diff --git a/modules/errors.py b/modules/errors.py index f3bf4319e..c4d66c351 100644 --- a/modules/errors.py +++ b/modules/errors.py @@ -17,7 +17,7 @@ console = Console(log_time=True, tab_size=4, log_time_format='%H:%M:%S-%f', soft })) pretty_install(console=console) -traceback_install(console=console, extra_lines=1, width=console.width, word_wrap=False, indent_guides=False) +traceback_install(console=console, extra_lines=1, width=console.width, word_wrap=False, indent_guides=False, max_frames=16) already_displayed = {} @@ -38,7 +38,7 @@ def print_error_explanation(message): def display(e: Exception, task, suppress=[]): log.error(f"{task or 'error'}: {type(e).__name__}") - console.print_exception(show_locals=False, max_frames=10, extra_lines=1, suppress=suppress, theme="ansi_dark", word_wrap=False, width=console.width) + console.print_exception(show_locals=False, max_frames=16, extra_lines=1, suppress=suppress, theme="ansi_dark", word_wrap=False, width=console.width) def display_once(e: Exception, task): @@ -56,7 +56,7 @@ def run(code, task): def exception(suppress=[]): - console.print_exception(show_locals=False, max_frames=10, extra_lines=2, suppress=suppress, theme="ansi_dark", word_wrap=False, width=min([console.width, 200])) + console.print_exception(show_locals=False, max_frames=16, extra_lines=2, suppress=suppress, theme="ansi_dark", word_wrap=False, width=min([console.width, 200])) def profile(profiler, msg: str): diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py index aff3bda47..6a19d90cc 100644 --- a/modules/sd_samplers.py +++ b/modules/sd_samplers.py @@ -78,7 +78,7 @@ def create_sampler(name, model): shared.log.warning(f'AlphaVLLM-Lumina: sampler="{name}" unsupported') return None if not hasattr(model, 'scheduler_config'): - model.scheduler_config = sampler.sampler.config.copy() + model.scheduler_config = sampler.sampler.config.copy() if hasattr(sampler.sampler, 'config') else {} model.scheduler = sampler.sampler if hasattr(model, "prior_pipe") and hasattr(model.prior_pipe, "scheduler"): model.prior_pipe.scheduler = sampler.sampler diff --git a/modules/vdm/__init__.py b/modules/vdm/__init__.py index 903888984..543b29ff3 100644 --- a/modules/vdm/__init__.py +++ b/modules/vdm/__init__.py @@ -406,8 +406,8 @@ class VDMScheduler(SchedulerMixin, ConfigMixin): sqrt_alpha_prod = torch.sqrt(torch.sigmoid(gamma)) sqrt_one_minus_alpha_prod = torch.sqrt(torch.sigmoid(-gamma)) # sqrt(sigma) - noisy_samples = sqrt_alpha_prod * original_samples + sqrt_one_minus_alpha_prod * noise - return noisy_samples + noisy_samples = original_samples * sqrt_alpha_prod + noise * sqrt_one_minus_alpha_prod + return noisy_samples.to(original_samples.dtype) def get_velocity(self, sample: torch.Tensor, noise: torch.Tensor, timesteps: torch.Tensor) -> torch.Tensor: gamma = self.log_snr(timesteps).to(sample.device)