Skip to content

Update diffusers default snippets to be complete. #907

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

Merged
merged 6 commits into from
Sep 18, 2024

Conversation

Vaibhavs10
Copy link
Member

@mishig25
Copy link
Collaborator

🔥

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

(expect style linting)

@mishig25
Copy link
Collaborator

the failing tests are unrelated to this pr

@Vaibhavs10
Copy link
Member Author

Will wait for @sayakpaul or @apolinario to approve before merging!

Thanks @mishig25 for fixing the lint issues 🐐

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

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

Looks good!

pipe = DiffusionPipeline.from_pretrained("${model.id}")

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: as discussed in Slack, having a prompt might be a bit confusing due to many models expecting certain tokens. In any case, this is fine I think to showcase usage

Copy link
Member Author

@Vaibhavs10 Vaibhavs10 left a comment

Choose a reason for hiding this comment

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

For LoRA models would it make sense to read the examples from the README? or is that an overkill?

ref: https://huggingface.co/Shakker-Labs/FLUX.1-dev-LoRA-AntiBlur/blob/main/README.md?code=true#L12

@apolinario
Copy link
Contributor

Well constructed LoRA models have an instance_prompt variable which could be used in the example prompt, but I like the idea of taking the first gallery prompt if existing. IMO not overkill and would make the UX great https://huggingface.co/multimodalart/vintage-ads-flux/blob/main/README.md?code=true#L9

Otherwise lgtm

@Vaibhavs10
Copy link
Member Author

Will follow up w/ showing Gallery prompts in a subsequent PR. Thanks for the reviews everyone!

@Vaibhavs10 Vaibhavs10 merged commit bbe2ae8 into main Sep 18, 2024
3 of 5 checks passed
@Vaibhavs10 Vaibhavs10 deleted the vb/fix-diffusers-snippet branch September 18, 2024 08:41
apolinario added a commit that referenced this pull request Sep 18, 2024
Addressing comments left on #907, specially for LoRAs
mishig25 added a commit that referenced this pull request Sep 19, 2024
Addressing comments left on #907, specially for LoRAs

---------

Co-authored-by: multimodalart <[email protected]>
Co-authored-by: Mishig <[email protected]>
Co-authored-by: vb <[email protected]>
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.

9 participants