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

[Image generation] Non public API changes for image generation #1146

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ilya-lavrenov
Copy link
Contributor

@ilya-lavrenov ilya-lavrenov commented Nov 5, 2024

Now, LCM image to image generation works correctly.

Public API will be later

@github-actions github-actions bot added category: text to image Text 2 image pipeline category: visual language Visual language pipeline category: continuous batching Continuous batching category: sampling Sampling / Decoding algorithms category: Python API Python API for GenAI category: samples GenAI samples labels Nov 5, 2024
OPENVINO_ASSERT(shape[0] == 1, "Batch size must be 1");
shape[1] /= 2;

m_mean = ov::Tensor(parameters.get_element_type(), shape, parameters.data());
Copy link
Collaborator

Choose a reason for hiding this comment

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

m_mean doesn't own parameters's data. If parameters is destroyed after DiagonalGaussianDistribution construction, sample()would read garbage from mean_data. You are just lucky to call sample() immediately.

}

ov::Tensor sample(std::shared_ptr<Generator> generator) const {
ov::Tensor rand_tensor = generator->randn_tensor(m_mean.get_shape());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
ov::Tensor rand_tensor = generator->randn_tensor(m_mean.get_shape());
ov::Tensor rand_tensor = generator->randn_tensor(m_mean.get_shape());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: continuous batching Continuous batching category: Python API Python API for GenAI category: samples GenAI samples category: sampling Sampling / Decoding algorithms category: text to image Text 2 image pipeline category: visual language Visual language pipeline
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants