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

Add diffuser tests for optimized sdxl flow on HPU #1554

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sushildubey171
Copy link
Contributor

To add diffuser tests for sdxl optimized flow for both bf16 and fp8 mode, verified and run locally
jira: SW-211820
use case PR #1519

**kwargs,
)
logger = logging.get_logger(sd_pipe.__module__)
logger.setLevel(level=diffusers.logging.INFO)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this only needed for the two calls to logger.info below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can just replace these calls with print to not add more complexity to this test


original_dir = os.getcwd()
config_dir = os.path.dirname(os.path.abspath("../examples/stable-diffusion/quantization"))
os.chdir(config_dir)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this absolutely necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, this is required to avoid file not found error because we are executing inside from tests/, for below measurement file, it is present in examples/stable-diffusion/quantization
https://github.com/huggingface/optimum-habana/blob/main/examples/stable-diffusion/quantization/quant_config.json#L6

in the end I do restore the original directory

Copy link
Collaborator

Choose a reason for hiding this comment

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

Which method needs that? It's not possible to just pass the path as an argument?

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