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

[Flux] Port Flux Core Model #1864

Merged
merged 74 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
286f4b2
starter commit - ported time embeddings to keras ops
DavidLandup0 Sep 23, 2024
244f013
add mlpembedder
DavidLandup0 Sep 23, 2024
480ad24
add RMS Norm re-implementation
DavidLandup0 Sep 23, 2024
2782242
add qknorm reimplementation
DavidLandup0 Sep 23, 2024
48c82e6
add rope, scaled dot product attention and self attention
DavidLandup0 Sep 26, 2024
513e370
modulation layer
DavidLandup0 Sep 29, 2024
8ccbb26
fix typing
DavidLandup0 Sep 29, 2024
c88c949
add double stream block
DavidLandup0 Sep 29, 2024
2bc150e
adjustments to doublestreamblock
DavidLandup0 Sep 30, 2024
969d508
add signle stream layer@
DavidLandup0 Oct 2, 2024
77c9297
update layers and add flux core model
DavidLandup0 Oct 4, 2024
35769ab
functions to layers
DavidLandup0 Oct 5, 2024
13d46c4
refactor layer usage
DavidLandup0 Oct 5, 2024
c00c6a5
refactor layer usage
DavidLandup0 Oct 5, 2024
05a1e3f
position math args in call()
DavidLandup0 Oct 5, 2024
f076006
name arguments
DavidLandup0 Oct 5, 2024
f9fc4a4
fix arg name
DavidLandup0 Oct 5, 2024
f2f2c96
start adding conversion script utils
DavidLandup0 Oct 5, 2024
311d342
change reshape into rearrange
DavidLandup0 Oct 6, 2024
db14c01
add rest of weight conversion and remove redundant shape extraction
DavidLandup0 Oct 6, 2024
c5b37c6
fix mlpembedder arg
DavidLandup0 Oct 6, 2024
8d3a385
remove redundant args
DavidLandup0 Oct 6, 2024
fa5379e
fix params. to self.
DavidLandup0 Oct 6, 2024
34e2477
add license
DavidLandup0 Oct 6, 2024
cdd397a
add einops
DavidLandup0 Oct 6, 2024
8169aa4
fix default arg
DavidLandup0 Oct 6, 2024
b1caa7f
expand docstrings
DavidLandup0 Oct 6, 2024
76eae83
tanh to gelu
DavidLandup0 Oct 6, 2024
c0236ac
refactor weight conversion into tools
DavidLandup0 Oct 6, 2024
b418659
update weight conversion
DavidLandup0 Oct 7, 2024
99839af
add stand-in presets until weights are uploaded
DavidLandup0 Oct 7, 2024
ac5c4b1
set float32 to t.dtype in timestep embedding
DavidLandup0 Oct 7, 2024
89dc08c
update more float32s into dynamic types
DavidLandup0 Oct 7, 2024
d3de26b
dtype
DavidLandup0 Oct 7, 2024
9d4aa22
dtype
DavidLandup0 Oct 7, 2024
dbddde7
enable float16 mode
DavidLandup0 Oct 7, 2024
b3c75a9
update conversion script to not require flux repo
DavidLandup0 Oct 7, 2024
4333bab
add build() methods to avoid running dummy input through model
DavidLandup0 Oct 7, 2024
199ba1c
update build call
DavidLandup0 Oct 7, 2024
a8de665
fix build calls
DavidLandup0 Oct 7, 2024
efe993a
style
DavidLandup0 Oct 7, 2024
ff118bb
change dummy call into build() call
DavidLandup0 Oct 7, 2024
da78707
Merge branch 'master' into feature/flux
DavidLandup0 Oct 8, 2024
a3ccf6d
reference einops issue
DavidLandup0 Oct 8, 2024
f88e1e9
address docstring comments in flux layers
DavidLandup0 Oct 8, 2024
6e2c320
address docstring comments in flux maths
DavidLandup0 Oct 8, 2024
b407ffc
remove numpy
DavidLandup0 Oct 8, 2024
ac43081
add docstrings for flux model
DavidLandup0 Oct 8, 2024
4b585a0
qkv bias -> use_bias
DavidLandup0 Oct 8, 2024
a2facb2
docstring updates
DavidLandup0 Oct 8, 2024
bd2ebe2
remove type hints
DavidLandup0 Oct 8, 2024
f48bbd2
all img->image, txt->text
DavidLandup0 Oct 8, 2024
cbad326
functional subclassing model
DavidLandup0 Oct 14, 2024
eeb8e0d
shape fixes
DavidLandup0 Oct 15, 2024
330ed70
format
DavidLandup0 Oct 15, 2024
9233411
self.hidden_size -> self.dim
DavidLandup0 Oct 15, 2024
ed2badc
einops rearrange
DavidLandup0 Oct 15, 2024
a65424b
remove build method
DavidLandup0 Oct 15, 2024
cb11e28
ops to rearrange
DavidLandup0 Oct 15, 2024
f478f39
remove build
DavidLandup0 Oct 15, 2024
3b5cb4d
rearrange -> symbolic_rearrange
DavidLandup0 Oct 15, 2024
40178e1
turn timesteps and guidance into inputs
DavidLandup0 Oct 15, 2024
078459d
basic preprocessor flow
DavidLandup0 Oct 15, 2024
0003b08
refactor layer names in conversion script
DavidLandup0 Oct 15, 2024
71b564f
add backbone tests
DavidLandup0 Oct 15, 2024
7aa93a2
raise not implemented on encode, encode_text, etc. methods
DavidLandup0 Oct 15, 2024
b05c94b
styling
DavidLandup0 Oct 15, 2024
94f9ffb
fix shape hack with a cleaner alternative
DavidLandup0 Oct 16, 2024
adeb842
remove unused attributes, fix tests
DavidLandup0 Oct 16, 2024
e97909c
change list into tuple for the expected shape
DavidLandup0 Oct 17, 2024
bc1879a
Merge branch 'master' into feature/flux
DavidLandup0 Oct 31, 2024
c6e20f6
address comments
DavidLandup0 Nov 10, 2024
dda8ec3
save mdel on conversion
DavidLandup0 Nov 10, 2024
446ed90
Merge branch 'master' into feature/flux
DavidLandup0 Nov 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions keras_hub/src/models/flux/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from keras_hub.src.models.flux.flux_model import Flux
from keras_hub.src.models.flux.flux_presets import presets
from keras_hub.src.utils.preset_utils import register_presets

register_presets(presets, Flux)
Loading
Loading