Commit Graph
40 Commits
Author SHA1 Message Date
JaredTherriault 34c1ce82dd Speed up loading of images in SubFolderExplorer contexts
-Speed up loading of images in SubFolderExplorer contexts like Input and Output (up to 6x!)
-Separate logic for loading images and gathering subdirectories
-Update some code to reflect the move to a unified usage of  "directory" rather than "folder" (WIP)
-Return more useful responses from python backend
2024-05-10 20:33:18 -07:00
JaredTherriault f0338b0c5f Batch selection, batch deletion, classifying some scripts, module manager
-Added new batch selection and batch deletion features. All imageElements now have a checkbox and each selected element is tracked within a context or folder. When you've selected all you want to delete, click the recycle button on the toolbar, then again to confirm. All checked items will be recylced/deleted. You can also click on the selection widget next to the batch delete button to toggle select/deselect all.
-Renamed ImageDrawer.js to ImageDrawerMain.js
-Separated ImageListAndSearch out into separate scripts and classes named ImageDrawerList and ImageDrawerSearch
-Changed order of some initialized functions and variables in imageElements to better accommodate batch selection
-
-Moved some scripts over to a classy architecture. More scripts will be moved over time. This will eventually allow for multiple image drawer instances in the same window.
-Added a new module script that manages all class instances. See ImageDrawerModule.js for an explanation of the new architecture. Basically, it makes cyclical dependencies impossible.
-Updated imports
-Updated various scripts to use class instances where applicable
-Updated some outdated comments
-Added option to prepend or append labels to Labeled widgets
-Parameter optimizations
-
2024-05-07 20:39:40 -07:00
JaredTherriault 2b8b864fd7 Remove width calculation from imageElements and extraNetworks as it's redundant performance loss 2024-05-05 18:32:46 -07:00
JaredTherriault 7a3d3ba30b Add delete button to imageElements flyout
-Separate much of the logic for imageElements into imageElementsUtils for a more streamlined maintenance experience
-Add button to delete an image or video from the disk and list, preferring to move it to trash/recycling before deleting directly
2024-05-05 14:33:33 -07:00
JaredTherriault 5566e237d0 Flyout improvements
-Simplify CSS
-Set layout CSS properties for flyouts from JS directly
-Apply layout rules to all flyouts
-Move imageElements flyout handle to top right rather than top left
2024-05-04 15:50:57 -07:00
JaredTherriault 1e55333ce0 Implement overflow control on x axis for image overflow menus 2024-05-03 19:54:46 -07:00
JaredTherriault 6b5207e2b9 Replace options menu on images with flyout, Highlight menu options
-Replace options menu on images with flyout
-Highlight menu options and lora/embedding commands when hovered or clicked
2024-05-03 19:39:31 -07:00
JaredTherriault b84e19b4c3 Fix automatic Upload Visual Media node sizing for videos
-Fix automatic Upload Visual Media node sizing for videos
-Infer some display data from mediaElement when image or video doesn't originate from imageDrawer drag and drop
-Linter adherence
2024-05-02 16:04:46 -07:00
JaredTherriault e4d01c1bba Sort Json Object By Keys in ImageElements 2024-05-01 22:19:50 -07:00
JaredTherriault 2172b88f35 Init DisplayData before assigning 2024-05-01 16:52:56 -07:00
JaredTherriault df8c6da431 Add DiisplayData structure to imageElement and drag and drop payload for imageElements 2024-05-01 16:28:50 -07:00
JaredTherriault 306fc985f8 Update dimensional meta data on image load if it wasn't read from python 2024-05-01 11:10:23 -07:00
JaredTherriault 7f7625855f Merge branch 'main' into Iteration-On-Upload-Video-Widget 2024-04-30 22:06:26 -07:00
JaredTherriault 219d3a8a67 Implement image aspect ratio sort type 2024-04-30 22:05:52 -07:00
JaredTherriault 811111102b Implement new sorting types: SortTypeFileSize, SortTypeImageWidth, SortTypeImageHeight, SortTypeFileType 2024-04-30 21:44:47 -07:00
JaredTherriault 073d6fe6c4 Validate playback speed input value and fix setting volume and playback speed for all videos at once
Also remove reference to setting_VideoPlaybackOptions in onScrollVideo, invertWheelSeek is now a function parameter
2024-04-29 16:36:30 -07:00
JaredTherriault f2774fb9f5 Include renaming 2024-04-22 14:51:09 -07:00
JaredTherriault 8c0920657c Add agnostic VideoControls
-Create VideoControls script for agnostic control of video elements
-Update classes to use VideoControls where appropriate
-Create jnodes_image_drawer_payload payload for drag and drop from image drawer to upload nodes
-Add href to fileInfo on imageElement creation to facilitate payload
2024-04-18 22:36:33 -07:00
JaredTherriault b1a44cf0cc Add playbackRate video option, improve menu widget options
-Add option for playback rate (speed)
-Add hotkeys for changing playback rate ( , and . )
-Add labeled number input widget
-Inherit labeled widget types from base class
-Add option for onchange to above base class
-Clamp numbers when setting numeric values on videos
-Add some helper functions to video elements
-Remove bPropagateOnChange, roll functionality into forEachElement delegate
-Add widgetType parameter to inform the widget type to be created
-Removed unnecessary and incorrect comments
2024-04-18 17:58:33 -07:00
JaredTherriault ebd1b837d6 Add function to hide tooltip in imageElements and hide tooltip on drag start 2024-04-18 10:35:48 -07:00
JaredTherriault f0e9347640 Major video update, ConfigSettings improvements, js async cancellation, load optimizations
-Roll UiSettings into SettingsManager
-Account for ConfigSettings that are objects by loading default values then loading config value son top
-Set ConfigSetting values using JSON.stringify
-Separate flyout generation into generic function
-Add video settings flyout in subfolderexplorer contexts
-Add option to control slider range value label fractional digits
-Update default slider range values to reflect 1-100 values rather than 0-1
-Rename ImageDrawerContext description to tooltip
-Update 'flex' alignment to 'normal' in context toolbars
-Automatically cancel async js operations when switching contexts
-blur or unfocus toolbar buttons on click to avoid accidental clearing or refreshing
-Get setting_ModelCardAspectRatio value as number
-Implement method to avoid lazy loading of images
-Lay some groundwork for unimplemented cancellation requests for python tasks
-Separated image list and search variables and functions to a separate script, ImageListAndSearch
-Update extra networks toolbar buttons to have a bespoke class and use specific cursor styles
-Update ImageElements 'complete' to 'bComplete' to differentiate from the img property
-Add lastSeekTime property initialization to img element
-Don't run onload if image element is already bComplete
-Sort and execute search after image is loaded (if requested). This allows search and sort to work with all of the meta data in the image.
-Click videos to pause/play
-Double click videos to toggle fullscreen
-Mute videos based on video options
-Set video volume from video options flyout
-Use scrollwheel on video to seek forward or back (seek direction depends on video options)
-Update imports
2024-04-17 14:58:59 -07:00
JaredTherriault 678550c042 Unify Video Options, add labeled checkbox factory
-Make ConfigSetting getValue and setValue functions private
-Add labeled checkbox/toggle factory
-Update some checkboxes to use the factory, probably exist some more
-Unify video options (needs an interface to interact with though)
-Preload metadata for videos now that we lazy load them
-Made some names more clear
2024-04-10 17:38:51 -07:00
JaredTherriault ba50521a85 And drawer width, refactor drawer location/anchor, code cleanup
-Separate DrawerSize into DrawerWidth and DrawerHeight
-Change Drawer Location to Drawer Anchor, now 'top-left', 'bottom-left', 'top-right', 'bottom-right'
-Add height and width to context cache class
-Image width and contained text size now based on drawer width
-Cap model info box at 90% in model contexts
-Made flyout options into a table
-Flyout button now circular border with an eyeball emoji (denoting 'view options')
-Moved DrawerAnchor widget creation to UISettings.js so UI Settings and view options flyout are now using the same widget and underlying functions
-Moved some inlined CSS out to CSS file to better facilitate different drawer anchors
-Anchor close button and flyout button to the right side of the screen when the Drawer anchor is right-affined
2024-04-10 15:09:48 -07:00
JaredTherriault 33c12309f5 Sizing, anchoring and aspect ratio updates, linter adherence,
-Update img-sz to column-count var
-Minimum width in left and right mode is now fit to the content inside of it
-Fixed anchoring of sizing menu flyout in top and bottom modes
-Made all images and videos a uniform width based on the column count and max-size
-Add error handling in ImageAndVideoObserver, remove aspect ratio patch
-Add helper function to create labeled sliders or ranges
-linter adherence updates
-Add aspect ratio slider for model contexts, affects model card aspect ratio
-Add class name to extra network cards
-Fix font scaling on model cards
-Improve info box anchoring and sizing on model cards
-Improve CSS declarations
-Fix auto aspect ratio for image and video placeholders
2024-04-09 21:06:56 -07:00
JaredTherriault 9eeb74b92a Disable tooltips when hovering images if a mouse button / touch is held 2024-04-09 12:12:27 -07:00
JaredTherriault 469bfd4dbc Update comment 2024-03-30 15:01:35 -07:00
JaredTherriault 4602523b9a Rename 'size' to 'dimensions' in file info, add 'file_size' to file info, 2024-03-29 21:59:17 -07:00
JaredTherriault ccdb779860 Isolate VideoOptions class, create config instance of it 2024-03-29 21:09:53 -07:00
JaredTherriault 5a6623c7b3 Basic video support in image list, backend organizational improvements, image loading optimizations, drag and drop lora into graph
-Change some names for clarity and capitalization linter
-Add SettingsManager to handle Config Settings
-Move some Utilities to SettingsManager
-Added images and videos are observed when they are added to the image list and unobserved when removed
-Add video support in feed and other image lists
-Optimized local image/video loading (for input and output folders and the like)
-Restore last subfolder selection on refresh of folder explorer context if possible
-Add batching code path for image loading (unused for now, needs tuning)
-Add option to drag and drop loras into graph to create lora node automatically
-Images now load in on demand (lazy loading) rather than all at once
-Try/Catch reading of image metadata
-Disable drag/drop for image href, fix issue where dragging image makes redundant toolbar button
-Add UiSettings script to handle adding UI Settings
2024-03-29 20:01:21 -07:00
JaredTherriault 0d730461e0 Update regex patterns, make unique extension identifiers, add copy ability for all image metadata keys
Update regex patterns, make unique extension identifiers, add copy ability for all image metadata keys
2024-02-24 17:02:19 -08:00
JaredTherriault 115d052931 Lay more groundwork for model config saving, add id to ImageElement buttonToolbar element 2024-02-10 22:03:25 -08:00
JaredTherriault 8745071432 Fix tooltip on webp images
Fix tooltip on webp images
2024-02-04 13:06:10 -08:00
JaredTherriault c7ed83fb30 Subfolder selection in subfolder contexts, search and replace text improvements, wider tooltip
-Made tooltip wider to accommodate longer values. Set it back with bUseWideTooltip  = false in ImageElements.js. Will eventually make this user-editable from the UI.
-JNodes_PromptEditor has become JNodes_SearchAndReplaceFromFile. Make sure you update your workflows, all two of you using it.
-Added JNodes_SearchAndReplaceFromList and JNodes_SearchAndReplace nodes to complement.
-Added JNodes_SplitAndJoin (originally for removing extra spaces and commas, but can be used to reduce anything you have too many of in a string) and JNodes_TrimAndStrip for removing leading and trailing whitespace.
-Split RemoveCommentedText out of ParseWildcards. Now the comment tokens are user-editable too.
-Added UI option for a custom batch commenting token (was previously hard-coded to '#')
-Removed 'unknown' placeholder text on some nodes
-Added subfolder selection support for SubFolderExplorer contexts. Now subfolders can be chosen in contexts like 'input' and 'output'. You can also choose to display items within a subfolder's subfolders. Make sure you're not trying to display too many items at once or the browser will crash.
-Added backend function to save user-configured model information so the end user can eventually override a lora or embedding's display name, tags, trained words and weight presets. The UI for this is not yet built.
-Added a nullptr check when checking to see if an object is empty.
-Removed setSearchTermsOnElement since it's superfluous. It takes fewer characters to just set it directly.
-Some search terms and some metadata are set now when an imageElement is first created rather than waiting for the image within to actually load. This allows sorting and search to work more properly as contexts are switched, but searching metadata obviously still won't work until the images are loaded. But you can search filename, subfolder and type until then.
2024-02-03 09:37:49 -08:00
JaredTherriault d32f9cc7c9 Sorting Optimizations
-Made waitForImageCompletion accessible and optimized
-Changed around some supported sort types per context
-Add sort option in addNewUncachedFeedImages
-Made ContextTemp  a ContextSubFolderExplorer instead of its own thing
-Moved sorting data outside of onload for imageElements
2024-01-29 15:28:02 -08:00
JaredTherriault bfe6e2c8f8 Add Sorting, user overrides and civit.ai link for extra networks, new contexts
-Subclassed ModelContext (for extra networks types), ContextRefreshable (for contexts that need a refresh button to reload data) and ContextSubFolderExplorer (for contexts that just show you images in a folder, no subfolder support yet) base types
-Implemented sorting on the backend and frontend
 * "Show Newest First" checkbox removed
 * Sorting dropdown added
 * FriendlyName, Filename, Date sort types implemented, ascending and descending
 * Support for default sort type per context
 * Sort on change context, on refresh and on image added
-Added more utils (sleep, isEmptyObject, checkIfAllImagesAreComplete)
-Added Embeddings context support (images in subfolders don't work yet)
-Tooltips are only created for images that actually have metadata to show
-Added support for user-customized info for extra networks (friendlyName, userTags, userTrainedWords, lastViewedImageIndex) that override applicable data from civit.ai. In the future there will be a way to add these in the UI. For now, you can set these by creating a json file with the same name as the model file (so 227.safetensors -> 227.info). .info, .txt, and .json types are supported.
-Added civit.ai link for extra networks
-Now the selected context controls the toolbar widgets next to the search bar
-Added drawer location option to Drawer Options flyout
-Merged metadata - > tooltip code into setMetadataAndUpdateTooltipAndSearchTerms
2024-01-29 12:22:39 -08:00
JaredTherriault 7b9ebdb7ad Split tooltip rows evenly
Split tooltip rows evenly
2024-01-20 23:18:13 -08:00
JaredTherriault 908b94682f output context
-Half-implemented output context, need to support folders
-Switched createImageElementFromImgSrc over to jnodes_view_image api call
-Added decodeReadableStream
-python image/video validation functions
-strip text when setting png info / metadata value
2024-01-20 22:53:52 -08:00
JaredTherriault 5fb0fd51e8 Sanitize trainedWords, overflow menu for imageElements (first pass)
-Sanitize and de-escape trainedWords string so you don't get stuff like '\(zelda\)'
-Move 'Copy Positive Prompt' button into an overflow menu on imageElements that will soon have more features and button. Plan to make floating next time.
2024-01-18 23:34:38 -08:00
JaredTherriault cb7f5bc9ca Copy positive_prompt from imageElement, select search text on context change, backend improvements
-Move around some functions to be shared
-Consolidate some text handling
-Select search text when switching contexts
-Add hover menu to imageElements (buttonToolbar)
-Add button to copy 'positive_prompt' value from metadata (use the positive prompt node for compatibility)
-Save metadata to imageElement
-Move some element definitions around in imageElements so functions that rely on certain elements work correctly
2024-01-16 20:10:11 -08:00
JaredTherriault 7ceb555e56 Initial Commit
-ImageDrawer (image feed, lora picker, image history, etc)
-EditAttention improvements
-Status indicators (percentage in title, favicon, progress bar on floating menu)
-Font control for textareas
-Token count node
-png_info manipulation nodes
-Synced string literals with external text files
-Parameter lists
-Save Video improvements over VHS
-Custom modal to replace lightbox
-Mouse over images to see exif/png_info
-Yet another dynamic prompts implementation with randomization controls
-Yet another Wildcards implementation
-Commenting out prompts support (just add # before each line you want to be ignored or encapsulate specific text on a line with ## on either side "## Commented text ##") built into Wildcards node, will be separated next time
-Prompt Editor (search and replace text in any text, intended for prompts to change certain trigger words, for example an embedding named '3mb3dd1n4' can be changed to 'embedding')
-Selector nodes that can be randomized based on seed (e.g. to select a random checkpoint name)
-Get Temp Directory, Get Output Directory
2024-01-15 13:36:49 -08:00