You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UI-wise, I believe turning it into a decoupled, specific property would be better: say, "brownian_tree_rng=cpu" instead of "brownian_tree_cpu". Then, we could consider if having a "brownian_tree_rng" implies turning on "brownian_tree". Either way sounds fine to me, so it'd be up to leejet.
Code-wise, the name -> subclass mapping is replicating StableDiffusionGGML::get_rng functionality; we should probably have instead a virtual constructor somewhere (src/core/rng.hpp would be natural for the declaration, but would need to be implemented elsewhere to avoid running into a chicken-and-egg issue with the hierarchy; so probably util.h would be a better place), and convert the name first with str_to_rng_type.
About the functionality itself... to be honest, I'm not sure what would be the best approach. Note that the BrownianTreeNoiseSampler::bridge member also creates an internal generator, and is recursive 🙂 I would suggest just either passing the secondary rng type to the Brownian tree constructor, and let it do its own thing as it is right now, or (as fszontagh suggested) add a virtual clone() to the rng class and duplicate the original generator edit: I see you are already copying the generator, so it'd be enough to copy the main one on bridge as well..
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
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.
Addition for leejet#1899.