Skip to content

Commit

Permalink
improve front-end controls, remove debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
painebenjamin committed Jan 19, 2024
1 parent d74f590 commit db3402e
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/js/controller/help/02-controls.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ControlsController extends MenuController {
/**
* @var int The height of the controls window
*/
static controlsWindowHeight = 700;
static controlsWindowHeight = 800;

/**
* @var string The keyboard shortcut
Expand Down
2 changes: 1 addition & 1 deletion src/js/controller/system/03-installation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class InstallationController extends MenuController {
/**
* @var int The height of the summary window
*/
static summaryWindowHeight = 620;
static summaryWindowHeight = 960;

/**
* @var int The width of the manager window
Expand Down
2 changes: 1 addition & 1 deletion src/js/view/controls.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ControlsHelperView extends View {
/**
* @var string Text to show on mouseover
*/
static helpText = "<strong>General</strong><ul style='list-style-type: bullet; padding: 1em;'><li>Move the entire canvas (pan) by placing your cursor over it then holding down <code>Middle-Mouse-Button</code>, or alternatively <code>Ctrl+Left-Mouse-Button</code> or <code>Alt+Left-Mouse-Button</code> (<code>Option⌥+Left-Mouse-Button</code> on MacOS), and move the canvas around.</li><li>Zoom in and out using the scroll wheel or scroll gestures. You can also click the + and - icons in the bottom-right-hand corner. Click 'RESET' at any time to bring the canvas back to the initial position.</li></ul><strong>Painting</strong><ul style='list-style-type: bullet; padding: 1em;'><li>Use the scroll wheel or scroll gestures to increase or descrease the size of your brush.</li><li>Hold <code>Ctrl</code> when scrolling up/down to stop this behavior and instead perform the general behavior of zooming in/out.</li><li>Use <code>Left-Mouse-Button</code> to draw, or <code>Alt+Left-Mouse-Button</code> to erase.</li><li>After painting and releasing <code>Left-Mouse-Button</code>, hold <code>shift</code> when you begin painting again to draw a straight line between the previous final and your current position using the current brush.</li></ul><strong>Motion Vectors</strong><ul style='list-style-type: bullet; padding: 1em 1em 0 1em;'><li>Click the <code>Left-Mouse-Button</code> on an empty portion of the canvas to start selecting existing points with a rectangular selector. Hold <code>shift</code> while doing this to add the selected points to your current selection, instead of replacing it. When you left-click on a point on the canvas, it will be grabbed and moved, optionally with shift as well to move all points at once. Left-clicking on a spline instead will select and move the entire spline.</li><li>Click <code>Alt+Left-Mouse-Button</code> on an empty section of the canvas to draw a new linear motion vector. Move your mouse and release it to draw a line between those points. When you use <code>Alt</code> and left-click on a point instead of the canvas, the point will be deleted. Alt-left-clicking a spline will add a new point along the segment your mouse is over.</li><li>Hold <code>Ctrl+Shift</code> and click the left-mouse-button anywhere on the canvas to rotate all selected points about their center.</li><li>When points are selected, press <code>Delete</code> on your keyboard to delete them.</li><li>When points are selected, press <code>Ctrl+C</code> on your keyboard to copy them. You must select at least two points on a spline for it to be copied.</li><li>Holding <code>Ctrl</code> while left-clicking will resume the previous behavior of moving the canvas.</ul>";
static helpText = "<strong>General</strong><ul style='list-style-type: bullet; padding: 1em;'><li>Move the entire canvas (pan) by placing your cursor over it then holding down <code>Middle-Mouse-Button</code>, or alternatively <code>Ctrl+Left-Mouse-Button</code> or <code>Alt+Left-Mouse-Button</code> (<code>Option⌥+Left-Mouse-Button</code> on MacOS), and move the canvas around.</li><li>Zoom in and out using the scroll wheel or scroll gestures. You can also click the + and - icons in the bottom-right-hand corner. Click 'RESET' at any time to bring the canvas back to the initial position.</li></ul><strong>Painting</strong><ul style='list-style-type: bullet; padding: 1em;'><li>Use the scroll wheel or scroll gestures to increase or descrease the size of your brush.</li><li>Hold <code>Ctrl</code> when scrolling up/down to stop this behavior and instead perform the general behavior of zooming in/out.</li><li>Use <code>Left-Mouse-Button</code> to draw, or <code>Alt+Left-Mouse-Button</code> to erase.</li><li>After painting and releasing <code>Left-Mouse-Button</code>, hold <code>shift</code> when you begin painting again to draw a straight line between the previous final and your current position using the current brush.</li></ul><strong>Motion Vectors</strong><ul style='list-style-type: bullet; padding: 1em 1em 0 1em;'><li>Click the <code>Left-Mouse-Button</code> on an empty portion of the canvas to start selecting existing points with a rectangular selector. Hold <code>shift</code> while doing this to add the selected points to your current selection, instead of replacing it. When you left-click on a point on the canvas, it will be grabbed and moved, optionally with shift as well to move all points at once. Left-clicking on a spline instead will select and move the entire spline.</li><li>Click <code>Alt+Left-Mouse-Button</code> on an empty section of the canvas to draw a new linear motion vector. Move your mouse and release it to draw a line between those points. When you use <code>Alt</code> and left-click on a point instead of the canvas, the point will be deleted. Alt-left-clicking a spline will add a new point along the segment your mouse is over.</li><li>Hold <code>Ctrl+Shift</code> and click the left-mouse-button anywhere on the canvas to rotate all selected points about their center.</li><li>When points are selected, press <code>Delete</code> on your keyboard to delete them.</li><li>When points are selected, press <code>Ctrl+C</code> on your keyboard to copy them. You must select at least two points on a spline for it to be copied.</li><li>Double-Click an anchor point to convert it back-and-forth between linear and bezier. When a point is in bezier mode, there will be one or two control points that control the curvature and can be moved in the same manner as other points.</li><li>Holding <code>Ctrl</code> while left-clicking will resume the previous behavior of moving the canvas.</li><li>Press <code>Ctrl+Z</code> to undo an action, and <code>Ctrl+Y</code> to redo an action after undoing it.</ul>";

/**
* On build, add helper texts
Expand Down
2 changes: 0 additions & 2 deletions src/python/enfugue/diffusion/invocation/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1407,8 +1407,6 @@ def execute(
):
raise BadRequestError("A text prompt was required but not found. Please enter a prompt.")

else:
logger.critical(f"{invocation_kwargs}")
# Prepare the pipeline manager
self.prepare_pipeline(pipeline)
# Determine if we're doing cropped inpainting
Expand Down
1 change: 0 additions & 1 deletion src/python/enfugue/diffusion/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ def check_download_model(self, local_dir: str, remote_url: str) -> str:
get_domain_from_url(remote_url)
)
self.task_callback(f"Downloading {file_label}")
logger.critical(f"{remote_url} {output_path}")

check_download(
remote_url,
Expand Down
1 change: 0 additions & 1 deletion src/python/enfugue/interface/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ def prepare_context(self, request: Request, response: Response) -> Dict[str, Any
ui_config = {}

paths = self.configuration["server.cms.path"]
logger.warning(dict(request.headers))
if self.configuration.get("server.domain", None) is None:
scheme = request.headers.get(
"X-Forwarded-Proto",
Expand Down

0 comments on commit db3402e

Please sign in to comment.