Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hybrid Video Compositing #198

Merged

Conversation

reallybigname
Copy link
Member

I made a fresh fork and manually redid all my changes, and now it all works! I think whatever problem I had with 2D mode was temporary and fixed by some commit. From what I can tell, it's all working...

I think the only thing that will cause an error is using DenseRLOF or SF optical flow. But, that's only until you update AUTOMATIC1111 and/or switch to contrib version of cv2.

@kabachuha kabachuha self-requested a review January 4, 2023 15:11
@kabachuha kabachuha added enhancement New feature or request video input labels Jan 4, 2023
Copy link
Member

@kabachuha kabachuha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Tested it in multiple modes and it works just perfectly!

Thanks for your contribution!

Though I'd like to hear @Funofabot 's opinion whether it's better to merge it now or after the settings system rework

@Funofabot
Copy link
Contributor

Awesome! Tested it in multiple modes and it works just perfectly!

Thanks for your contribution!

Though I'd like to hear @Funofabot 's opinion whether it's better to merge it now or after the settings system rework

I would like changes like this to be added sooner than later, that way if the author has issues to address, then they are more likely to have the exposure to find them. Testing every portion of this is difficult.

I will probably not have settings fully tested for compatibility for a few days and adding this probably will not affect them as the new settings system uses the dicts and not direct kwargs. I will make time to review it in the next couple hours.

I vote to add it sir.!


#@markdown ####**Coherence:**
histogram_matching = True #@param {type:"boolean"}
color_coherence = 'Match Frame 0 LAB' #@param ['None', 'Match Frame 0 HSV', 'Match Frame 0 LAB', 'Match Frame 0 RGB'] {type:'string'}
color_coherence = 'Match Frame 0 LAB' #@param ['None', 'Match Frame 0 HSV', 'Match Frame 0 LAB', 'Match Frame 0 RGB', 'Video Input'] {type:'string'}
color_coherence_video_every_N_frames = 1 #@param {type:"integer"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this addition. It is something that I feel helps. It allows the histogram matching to be applied on nth frame basis.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And you can use it with alpha at 0, not using video at all!

color_coherence_video_every_N_frames will make the color flicker on that frame if you use it on a normal video. It's intended more for sequences where you're doing like, precisely 3 second scene changes. That way it can grab the new color scheme once per scene.

# Clip values that fall outside the range [0, 255]
image = np.clip(image, 0, 255)

return image
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its wonderful that you created a source to work directly on these changes.
Big stars for this!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function was made by ChatGPT, lol

Copy link
Contributor

@Funofabot Funofabot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the code, I don't see any reason to not merge. This is a featured packed update and will undoubtedly have some conflicts in some cases. However, this project will evolve and since we do declare very much a beta state, I cannot see a negative consequence. Great that we are using more source files to split functionality.

@kabachuha kabachuha merged commit d1715bc into deforum-art:automatic1111-webui Jan 5, 2023
stride-srl pushed a commit to stride-srl/sd-webui-deforum that referenced this pull request Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request video input
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants