Skip to content

[train_text_to_image_sdxl]Add LANCZOS as default interpolation mode for image resizing #11455

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

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

Conversation

ParagEkbote
Copy link
Contributor

@ParagEkbote ParagEkbote commented Apr 29, 2025

What does this PR do?

Refs #11390

As mentioned in the issue, I've updated LANCZOS as the default interpolation mode for the training script. Please let me know if any modifications are required and I will make the necessary changes.

Before submitting

Who can review?

@asomoza

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@asomoza asomoza left a comment

Choose a reason for hiding this comment

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

thanks, just a minor correction

interpolation = getattr(transforms.InterpolationMode, args.image_interpolation_mode.upper(), None)
if interpolation is None:
raise ValueError(f"Unsupported interpolation mode {interpolation=}.")
train_resize = transforms.Resize(args.resolution,, interpolation=interpolation)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
train_resize = transforms.Resize(args.resolution,, interpolation=interpolation)
train_resize = transforms.Resize(args.resolution, interpolation=interpolation)

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.

3 participants