Skip to content

Commit

Permalink
Merge pull request #278 from Capsize-Games/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
w4ffl35 committed Jul 11, 2023
2 parents 4db4379 + c0c1183 commit 82469a3
Show file tree
Hide file tree
Showing 15 changed files with 1,193 additions and 857 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ RUN ln -s /usr/share/tcltk/tcl8.6 /usr/share/tcltk/tcl8
FROM fix_tcl as install_apps
RUN python3 -c "from accelerate.utils import write_basic_config; write_basic_config(mixed_precision='fp16')"
RUN pip uninstall nvidia-cublas-cu11 nvidia-cublas-cu12 -y
RUN pip uninstall xformers -y

FROM install_apps as more_env
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='airunner',
version="2.0.5",
version="2.1.0",
author="Capsize LLC",
description="A Stable Diffusion GUI",
long_description=open("README.md", "r", encoding="utf-8").read(),
Expand Down
1 change: 1 addition & 0 deletions src/airunner/cursors/circle_brush.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@


def CircleCursor(outline_color, fill_color, pixmap_size=32):
pixmap_size = int(pixmap_size)
# create a pixmap with the desired size for the cursor shape
pixmap = QPixmap(pixmap_size, pixmap_size)
pixmap.fill(Qt.GlobalColor.transparent) # make the background of the pixmap transparent
Expand Down
23 changes: 18 additions & 5 deletions src/airunner/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import pickle
import sys
import traceback
from functools import partial
import psutil
import torch
Expand Down Expand Up @@ -210,12 +211,12 @@ def tqdm_callback(self, step, total, action, image=None, data=None):
else:
if self.progress_bar_started and not self.tqdm_callback_triggered:
self.tqdm_callback_triggered = True
self.tabs[action].progressBar.setRange(0, 100)
self.generator_tab_widget.data[action]["progressBar"].setRange(0, 100)
try:
current = (step / total)
except ZeroDivisionError:
current = 0
self.tabs[action].progressBar.setValue(int(current * 100))
self.generator_tab_widget.set_progress_bar_value(action, int(current * 100))

@property
def is_windows(self):
Expand Down Expand Up @@ -363,7 +364,7 @@ def show_update_popup(self):

def reset_settings(self):
logger.info("Resetting settings...")
GeneratorMixin.reset_settings(self)
# GeneratorMixin.reset_settings(self)
self.canvas.reset_settings()

def on_state_changed(self, state):
Expand All @@ -386,9 +387,9 @@ def set_stylesheet(self):
self.footer_widget.set_stylesheet()

def initialize(self):
self.initialize_settings_manager()
self.instantiate_widgets()
self.initialize_saved_prompts()
self.initialize_settings_manager()
self.initialize_tqdm()
self.initialize_handlers()
self.initialize_window()
Expand Down Expand Up @@ -755,7 +756,19 @@ def display_splash_screen(app):
splash = display_splash_screen(app)

def show_main_application(splash):
window = MainWindow()
try:
window = MainWindow()
except Exception as e:
# print a stacktrace to see where the original error occurred
# we want to see the original error path using the traceback
traceback.print_exc()

print(e)
splash.finish(None)
sys.exit("""
An error occurred while initializing the application.
Please report this issue on GitHub or Discord."
""")
splash.finish(window)
window.raise_()

Expand Down
2 changes: 1 addition & 1 deletion src/airunner/mixins/canvas_active_grid_area_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def draw_active_grid_area_container(self, painter):
)
painter.drawRect(rect)

# draw a thirder black border in the center of the two rectangles
# draw a third black border in the center of the two rectangles
pen = QPen(
QColor(0, 0, 0),
self.settings_manager.settings.line_width.get() + 1
Expand Down
Loading

0 comments on commit 82469a3

Please sign in to comment.