Port manual Save Image action to current image controls#1286
Open
Reaper176 wants to merge 7 commits intomcmonkeyprojects:masterfrom
Open
Port manual Save Image action to current image controls#1286Reaper176 wants to merge 7 commits intomcmonkeyprojects:masterfrom
Reaper176 wants to merge 7 commits intomcmonkeyprojects:masterfrom
Conversation
| buttonsChoice = defaultButtonChoices; | ||
| } | ||
| else if (buttonsChoice.toLowerCase().replaceAll(' ', '') == 'useasinit,editimage,star,reuseparameters') { | ||
| buttonsChoice = `${buttonsChoice},Save Image`; |
Member
There was a problem hiding this comment.
this is ... weird. Overriding user preference like this should not happen
| }, (metaParsed.is_starred ? ' star-button button-starred-image' : ' star-button'), 'Toggles this image as starred - starred images get moved to a separate folder and highlighted'); | ||
| } | ||
| includeButton('Reuse Parameters', copy_current_image_params, '', 'Copies the parameters used to generate this image to the current generation settings'); | ||
| if (!isVideo && !isAudio) { |
Member
There was a problem hiding this comment.
this should only apply when isDataImage is true
| showError('Manual save is only supported for images.'); | ||
| return; | ||
| } | ||
| if (button?.dataset.saving == 'true') { |
Member
There was a problem hiding this comment.
redundant, disabled has it covered
| requestData.image = imageData; | ||
| genericRequest('AddImageToHistory', requestData, res => { | ||
| releaseButton(); | ||
| if (!res || res.error) { |
| imageFullView.showImage(saved.image, savedMetadata, imageFullView.currentBatchId); | ||
| imageFullView.pasteState(state); | ||
| } | ||
| if (typeof imageHistoryBrowser !== 'undefined' && imageHistoryBrowser?.lightRefresh) { |
Member
There was a problem hiding this comment.
this if check will never be false
| finish(img.src); | ||
| } | ||
| else { | ||
| toDataURL(img.src, finish); |
Member
There was a problem hiding this comment.
this is only applicable to data url images, so the check is not needed
Author
|
@mcmonkey4eva This look good? |
…wer writes so that the refresh does not miss new images from refreshing before they are writen
| /// <param name="thresholdMax">Optional maximum value of the threshold.</param> | ||
| /// <returns>(boundsNode, croppedMask, maskedLatent, scaledImage).</returns> | ||
| public ImageMaskCropData CreateImageMaskCrop(JArray mask, JArray image, int growBy, JArray vae, T2IModel model, double threshold = 0.01, double thresholdMax = 1) | ||
| public ImageMaskCropData CreateImageMaskCrop(JArray mask, JArray image, int growBy, JArray vae, T2IModel model, double threshold = 0.01, double thresholdMax = 1, int scaleWidth = 0, int scaleHeight = 0, bool canShrink = true) |
Member
There was a problem hiding this comment.
this file edit is out of place
| if (g.UserInput.TryGet(T2IParamTypes.MaskShrinkGrow, out int shrinkGrow)) | ||
| { | ||
| g.MaskShrunkInfo = g.CreateImageMaskCrop(g.FinalMask, g.FinalInputImage, shrinkGrow, g.FinalVae, g.FinalLoadedModel); | ||
| g.MaskShrunkInfo = g.CreateImageMaskCrop(g.FinalMask, g.FinalInputImage, shrinkGrow, g.FinalVae, g.FinalLoadedModel, |
src/Text2Image/T2IParamTypes.cs
Outdated
|
|
||
| public static T2IRegisteredParam<string> Prompt, NegativePrompt, AspectRatio, BackendType, RefinerMethod, FreeUApplyTo, FreeUVersion, PersonalNote, VideoFormat, VideoResolution, UnsamplerPrompt, ImageFormat, MaskBehavior, ColorCorrectionBehavior, RawResolution, SeamlessTileable, SD3TextEncs, BitDepth, Webhooks, Text2VideoFormat, WildcardSeedBehavior, SegmentSortOrder, SegmentTargetResolution, SegmentApplyAfter, TorchCompile, VideoExtendFormat, ExactBackendID, OverridePredictionType, OverrideOutpathFormat, Text2AudioTimeSignature, Text2AudioLanguage, Text2AudioKeyScale, Text2AudioStyle; | ||
| public static T2IRegisteredParam<int> Images, Steps, Width, Height, SideLength, BatchSize, VAETileSize, VAETileOverlap, VAETemporalTileSize, VAETemporalTileOverlap, ClipStopAtLayer, VideoFrames, VideoMotionBucket, VideoFPS, VideoSteps, RefinerSteps, CascadeLatentCompression, MaskShrinkGrow, MaskBlur, MaskGrow, SegmentMaskBlur, SegmentMaskGrow, SegmentMaskOversize, SegmentSteps, Text2VideoFrames, TrimVideoStartFrames, TrimVideoEndFrames, VideoExtendFrameOverlap; | ||
| public static T2IRegisteredParam<int> Images, Steps, Width, Height, SideLength, BatchSize, VAETileSize, VAETileOverlap, VAETemporalTileSize, VAETemporalTileOverlap, ClipStopAtLayer, VideoFrames, VideoMotionBucket, VideoFPS, VideoSteps, RefinerSteps, CascadeLatentCompression, MaskShrinkGrow, MaskBlur, MaskGrow, InitImageScaleForMPWidth, InitImageScaleForMPHeight, SegmentMaskBlur, SegmentMaskGrow, SegmentMaskOversize, SegmentSteps, Text2VideoFrames, TrimVideoStartFrames, TrimVideoEndFrames, VideoExtendFrameOverlap; |
REVERTED
REVERTED
REVERTED
Member
|
you did not actually address any of the last 3 comments you just broke the line attach |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.