-
Notifications
You must be signed in to change notification settings - Fork 452
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
feature: large refactor - breaking changes #413
Conversation
0176db8
to
079273e
Compare
- add type hints - size parameter - ControlNetInput => ControlInput - simplify imagineresult
f83eb00
to
1621925
Compare
1846756
to
f5fd863
Compare
# kdiff.DPMFastSampler, | ||
# kdiff.DPMAdaptiveSampler, | ||
# kdiff.LMSSampler, | ||
# kdiff.DPM2Sampler, | ||
# kdiff.DPM2AncestralSampler, | ||
kdiff.DPMPP2MSampler, | ||
# kdiff.DPMPP2MSampler, | ||
# kdiff.DPMPP2SAncestralSampler, | ||
# kdiff.EulerSampler, | ||
# kdiff.EulerAncestralSampler, | ||
# kdiff.HeunSampler, |
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.
delete?
# class DPM2AncestralSampler(KDiffusionSampler): | ||
# short_name = SamplerName.K_DPM_2_ANCESTRAL | ||
# class DPM2AncestralSampler(KDiffusionSolver): | ||
# short_name = SolverName.K_DPM_2_ANCESTRAL | ||
# name = "Diffusion probabilistic models - 2 ancestral" | ||
# default_steps = 40 | ||
# sampler_func = staticmethod(k_sampling.sample_dpm_2_ancestral) |
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.
delete?
# class HeunSampler(KDiffusionSampler): | ||
# short_name = SamplerName.K_HEUN | ||
# class HeunSampler(KDiffusionSolver): | ||
# short_name = SolverName.K_HEUN | ||
# name = "Algorithm 2 (Heun steps) from Karras et al. (2022)." | ||
# default_steps = 40 | ||
# sampler_func = staticmethod(k_sampling.sample_heun) | ||
# | ||
# |
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.
Delete?
# if get_device() == "mps:0": | ||
# SOLVERS_FOR_TESTING = ["plms", "k_euler_a"] | ||
# elif get_device() == "cpu": | ||
# SOLVERS_FOR_TESTING = [] |
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.
delete?
# from imaginairy.samplers import SOLVER_TYPE_OPTIONS | ||
# | ||
# | ||
# def test_sampler_options(): |
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.
delete?
@@ -58,7 +59,7 @@ def test_clip_masking(filename_base_for_outputs): | |||
upscale=False, | |||
fix_faces=True, | |||
seed=42, | |||
# sampler_type="plms", | |||
# solver_type="plms", |
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.
delete?
824771d
to
f714ddc
Compare
- do not provide automatically imported api functions and objects in `imaginairy` root module - horrible hack to overcome horrible design choices by easy_install/setuptools The hack modifies the installed script to remove the __import__ pkg_resources line If we don't do this then the scripts will be slow to start up because of pkg_resources.require() which is called by setuptools to ensure the "correct" version of the package is installed. before modification example: ``` __requires__ = 'imaginAIry==14.0.0b5' __import__('pkg_resources').require('imaginAIry==14.0.0b5') __file__ = '/home/user/projects/imaginairy/imaginairy/bin/aimg' with open(__file__) as f: exec(compile(f.read(), __file__, 'exec')) ```
- fix colorize cmd. add test - fix describe cmd. add test - fix model-list cmd. add test - fix stable studio - hide stack grace for ValueErrors in cli - set controlnet scale - fix negative prompt to allow emptystring instead of replacing it with default - adjust edit-demo parameters - arg scheduler that works at click level (but disable it). works but not ideal experience.
fix some typehint issues
f714ddc
to
3f0c046
Compare
3f0c046
to
4b67e24
Compare
ImaginePrompt.size
and--size
field to specify image dimensions, supporting various formats. Removedwidth
andheight
parameters.normalize_image_size
function converts various ways someone could specify "size" to (width, height) tuple. ("512", "4k", "1024,1024" etc)samplers
tosolvers
terminology (in diffusers called a "scheduler". In automatic1111, a "sampler")