Skip to content

Animated color match + sync 2D/3D camera directions - #229

Merged
pharmapsychotic merged 8 commits into
anima_stablefrom
pharma/animated-color-match
May 10, 2023
Merged

pharmapsychotic merged 8 commits into
anima_stablefrom
pharma/animated-color-match

Conversation

@pharmapsychotic

Copy link
Copy Markdown
Contributor

No description provided.

- Update clip_guidance default to None to match docs
- Update DATA_GENERATOR name that goes in saved settings files
- Give example prompt for "3D warp rotate" preset and use pure MiDaS for better result
- Fix Project import and delete and give Confirm button before deleting
- Handle exceptions from `create_video_from_frames`
… it says desired movement of camera instead of movement of image plane so that settings match between 2D and 3D
Comment thread src/stability_sdk/animation.py Outdated
prev, next, tween = self.get_key_frame_tween(frame_idx)

if prev not in self.color_match_images:
self.color_match_images[prev] = self._span_render_frame(prev, self.args.seed)

@kostarion kostarion May 10, 2023 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You use _span_render_frame just because it incapsulates all the cumbersome generation parameter setup that you need, right? Should it be called differently then? Smth like just _generate_frame? I worry it might confuse since it's used not only in the span_cadence mode now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think that's a good idea_span_render_frame -> _render_frame standalone simple frame render function used internally.

width, height, tile_size = blended.width, blended.height, 64
for y in range(0, height, tile_size):
for x in range(0, width, tile_size):
cut = next_match.crop((x, y, x + int(tile_size * tween), y + int(tile_size * tween)))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hm, why not just the weighted sum of prev_match and next_match?

And maybe add an in-code comment also, because it doesn't seem obvious.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That would introduce new colors in between the palettes instead of transitioning from colors of one to colors of the other. The blended image here has only RGB values that are present in either no new colors introduced this way.

@sonarqubecloud

Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell B 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@pharmapsychotic
pharmapsychotic merged commit 1e193ba into anima_stable May 10, 2023
@pharmapsychotic
pharmapsychotic deleted the pharma/animated-color-match branch May 10, 2023 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants