UI PostProcess - Zuntan03/EasyWan22 GitHub Wiki
This is post-processing for improving the quality of videos that hit the jackpot during seed gacha afterwards.
Please note that performing post-processing such as upscaling and frame interpolation during seed gacha is very inefficient.
The samples have post-processing enabled for generation reproduction purposes, so please be careful when using them as reference.
Basic procedure for post-processing with PostProcess and LoadWebpVideo
- Disable
PostProcessandLoadWebpVideoinPostProcessSourceand search for hits with seed gacha. - Drag and drop the hit
*.webpfile to the blank area of ComfyUI to open it as a workflow. - Enable
LoadWebpVideoinPostProcessSourceand open the*.webpfile again withLoadWebpVideo. - Enable
PostProcessandExecute.- By default, Refiner, upscaling, and frame interpolation are enabled.
Refiner
The refiner enlarges the video while finishing details with LowNoise.
Stepsspecifies the number of rewrite steps.UseUpscalerenlarges with an upscaler before rewriting. Recommended to enable.LongSidespecifies the size of the enlarged video by the number of pixels on the long side.
Usea * 1.5ora * 2.0to make it 1.5x or 2x larger. You can also specify the pixel count directly like1280.AdditionalSeedadds this value to the normal seed for refinement.- Load the seed gacha hit from normal video generation with
LoadWebpVideoinPostProcessSource, setAdditionalSeedtoincrement, andExecute (Immediate)to perform Refiner seed gacha. - When you hit the jackpot with Refiner's seed gacha, load the Refiner's hit video with
LoadWebpVideoand disableRefineragain to continue applyingDetailer,Upscale, andFrameInterpolation.
- Load the seed gacha hit from normal video generation with
Detailer
Automatically detects faces and other features to enhance them at high resolution with detailed refinement similar to Refiner.
Stepsspecifies the amount of rewriting.
For finishing without changing the image much, specify1~2. For changing expressions etc. with region-specific prompts described later, specify4~.LongSidespecifies the maximum long side after enlargement in pixels.
Making it larger within the range that doesn't overflow VRAM will result in cleaner finishing.Timingallows you to specify whether to apply Detailer before or afterRefiner.- When applying Detailer before Refiner, Refiner will make the boundary lines of the rewrite area less noticeable.
- When applying Detailer after Refiner, it becomes easier to preserve the results of region-specific prompt instructions.
AdditionalSeedadds this value to the normal seed for applying Detailer.- Load the seed gacha hit from normal video generation with
LoadWebpVideoinPostProcessSource, setAdditionalSeedtoincrement, andExecute (Immediate)to perform Detailer seed gacha. - When you hit the jackpot with Detailer's seed gacha, load the Detailer's hit video with
LoadWebpVideoand disableDetaileragain to continue applyingUpscaleandFrameInterpolation.
- Load the seed gacha hit from normal video generation with
Upscaleuses upscaler during enlargement when enabled.
Recommended to enable unless there are specific problems.
Detector
Detection methods for body parts and region-specific prompt specification are available.
Modelselects YOLO-based detection models.
Add detection models underModel/ultralytics/to use them after pressingrkey or reloading.Thresholdspecifies the detection score.
Lower values increase detection count, allowing previously undetected items to be detected, but also increase false positives.
Conversely, higher values reduce detection count and suppress false positives, but may prevent detection.TakeTargetspecifies the sorting method for detected parts, andTakeOrderallows choosing between ascending or descending order. You can sort by area, width and height, vertical or horizontal position, and detection confidence.TakeStartandTakeCountspecify which detected parts (from which number and how many) to apply Detailer to.
By settingTakeCountto1and shiftingTakeStart, then loading theAsset.webpafterDetailerwithLoadWebpVideo, you can finish multiple faces one by one.- In the prompt input field, you can apply prompts for each detected part separated by
,commas.
Note that commas cannot be used within the prompt content itself.
Usage Examples
- For simply improving part quality, set
Stepsto2and useDetailer ⇨ Refiner. - For changing appearance like expressions with prompts, set
Stepsto4and useDetailer ⇨ Refiner.- Reducing
RefinerStepsfrom2to1makes it easier to maintain changes.
- Reducing
- For rendering parts at maximum resolution, use
Refiner ⇨ DetailerwithStepsset to2~4- Whether boundary lines are noticeable depends on luck, so use
AdditionalSeed.
- Whether boundary lines are noticeable depends on luck, so use
Trim
Trim(Start|End)Frames cuts the specified number of frames from the (beginning|end).
ColorMatch
Matches the colors of the start image and video.
ColorCorrect
Adjusts video colors with brightness, contrast, saturation, gamma, hue, and color shift.
RepeatFade
Cuts the first few frames of the video and cross-fades them at the end of the video.
This is for those who don't like the sharp switching when looping.
The video becomes shorter by the amount of cross-fade.
RepeatFadeFrames specifies the number of frames to cross-fade.
This is not a function to make videos loop cleanly.
Upscale
Upscales to 2x size.
While there are minor discrepancies, the average quality improves, so it's recommended for finishing post-processing.
AddLabel
Can display text strings at the top and bottom of the video. Japanese text is supported.
When AddLabelPreview is enabled, the video is changed to only 2 frames, allowing you to quickly check the label display results.
AppendVideo
Set a pre-prepared video to PreviousWebpVideo and concatenate the post-processed video.
TrimEndFrames can cut the end of the previous video.
When generating a video from the EndFrame of the previous video, duplicate frames can be removed.
If you want to remove the starting frame of the appended post-processing side, use TrimStartFrames.
AppendTiming allows you to select the timing for video concatenation.
PreUpscale: Use when you want to concatenate videos and then upscale them together.PreAddLabel: Concatenate before adding labels. Use when you want to set the same label for both videos.PreInterpolation: Concatenate before frame interpolation. Use when the previous video already has labels set and you want to specify different label content in post-processing.
FrameInterpolation
Interpolates between video frames to make them smoother. Recommended for finishing post-processing.
Choose from three types: 60FPS, 60FPS x1.3 Speed, 30FPS.
While not normally used, you can also directly specify FPS and frame interpolation multiplier with FrameRate and FrameMultiplier in VFI-Param.
FAQ
Post-processing has no effect even when enabled
To enable post-processing, you need to enable each function such as Refiner, Upscale, VideoFrameInterpolation, and also enable PostProcess which can toggle all post-processing on/off at once.
Post-processing includes the following functions on the right side of the workflow (in processing order):
Refiner, Trim, ColorMatch, PointMosaic, AutoMosaic, MaskMosaic, ColorCorrect, RepeatFade, Upscale, AddLabel, AppendVideo, VideoFrameInterpolation