-
Notifications
You must be signed in to change notification settings - Fork 228
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
DiffusionImage #64
DiffusionImage #64
Conversation
Addition of DiffusionImage Model extracted from 59 #59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Can you please explain the use-cases that this will enable?
Docc compatible comment style. Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
typo fixes in descriptive note Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
Sorry for not making the high level description of this PR! Motivation: Discussion: Drag and drop support: Batch image support: Saved images: (line 189+) |
Fleshing out docc compatible comments in new class. Also refactored two identical functions with different names.
Fix from recent manual merge
Diffusion_StableDiffusionScheduler created to get around a problem in a future PR for copy/paste and drag/drop with preserved "recipe" data about how the image was created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I think we could simplify the code (and, more importantly, make it clearer) if we could isolate the OS differences in just a few helper functions, and then write the main class without conditional compilation.
If it's possible to do so, I'd even use a separate file for the OS extensions, something like DiffusionImage+OS.swift
or something you think is descriptive. save
, pngRepresentation
, etc. would go there.
Do you think that approach is feasible?
This is a consolidated commit with the suggestions submitted in review. - Move as much platform specific code as possible out into target specific files. - Move save() and pngRepresentation() into separate platform specific files - Move platform specific protocol code out into separate file.
New Utils_iOS and Utils_macOS allow platform specific utility functions to live inside the target file structure. - added CGImage.fromData(Data) funcs for macOS/iOS - added new func inside StableDiffusionScheduler enum. - renamed Diffusion_StableDiffusionScheduler to StableDiffusionScheduler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for iterating! 🙏 I just got a couple of minor comments before merge.
remove comment with answered question Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
remove comment from self descriptive code Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
remove comment from self descriptive code Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
more concise comment Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!! 🙏
Addition of DiffusionImage Model extracted from 59 #59