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

TextCenGen #49

Draft
wants to merge 55 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
0e94c12
add tcg
v0xie May 25, 2024
ccad86a
fix ui
v0xie May 25, 2024
4bf6d3e
add scaffolding
v0xie May 25, 2024
c510aff
allow debugging without launching webui
v0xie May 25, 2024
2112488
add tcgscript
v0xie May 25, 2024
dbe8685
add centroid calculation fn
v0xie May 25, 2024
ee5798e
add conflict detection fn
v0xie May 25, 2024
5609dd0
modularize test
v0xie May 25, 2024
e8c302e
add fns for margin force and distance to edge
v0xie May 25, 2024
4db2f41
implementing forces
v0xie May 25, 2024
8f32021
working on translate img fn
v0xie May 25, 2024
9c7486d
wip translation fn
v0xie May 26, 2024
40cfdeb
add translate_image_2d
v0xie May 26, 2024
e267e9a
implement translate 2d
v0xie May 26, 2024
e599bb9
apply transformation
v0xie May 26, 2024
973a948
fix weird flip
v0xie May 26, 2024
0d8ae5b
fix weird translation, switch to align corners true
v0xie May 26, 2024
c1c65e5
centroid seems to work
v0xie May 26, 2024
167bc8e
fix centroid calculation divide by zero
v0xie May 26, 2024
47f7159
testing region moving
v0xie May 26, 2024
9a0c88a
update test
v0xie May 26, 2024
cd13407
margin and repulsive forces seem to work
v0xie May 27, 2024
a0628dd
fix directions
v0xie May 27, 2024
c9eb00b
sort of fix calculating warping force
v0xie May 27, 2024
30d7c7a
debugging warping force
v0xie May 27, 2024
01f201c
wip bbox fn
v0xie May 27, 2024
24b4d5c
maybe fix warping force in case displacement is 0,0
v0xie May 27, 2024
5ac21e6
fix sampling
v0xie May 27, 2024
903f8bd
experimenting with hyperparameters
v0xie May 27, 2024
fe68cad
Fix calculate_centroid shape when channel > 1
v0xie May 27, 2024
43f046d
Fix debug statement dim error
v0xie May 27, 2024
4fe4911
fix warping force batch dims
v0xie May 27, 2024
2ffee08
support translating multiple channels
v0xie May 28, 2024
93e2ddc
loosen assert reqs
v0xie May 28, 2024
91a8758
preliminary impl
v0xie May 28, 2024
e3b9868
implement basic controls
v0xie May 28, 2024
4881468
add controls and xyz
v0xie May 28, 2024
309ef40
add soft threshold fn
v0xie May 28, 2024
e8a6ee1
hack to fix conflict detector
v0xie May 28, 2024
34bf455
update routine to zero displacements where unneeded
v0xie May 28, 2024
d501d5d
fix normalize map fn
v0xie May 28, 2024
be05634
add more parameters and selfguidance term
v0xie May 28, 2024
36934d8
try to fix completely wrong dimensions when swapping token output
v0xie May 29, 2024
b99fd18
Revert "try to fix completely wrong dimensions when swapping token ou…
v0xie May 29, 2024
498ba27
try to fix dims again
v0xie May 30, 2024
5f69577
restore image mask element
v0xie May 30, 2024
408fc99
attempt to fix dims
v0xie May 30, 2024
de93eb4
reimplement sdp for sanity check
v0xie May 30, 2024
1b33668
usesoftmax
v0xie May 30, 2024
583b31a
fixed soft threshold normalize over wrong dim
v0xie May 30, 2024
a24f816
fix soft threshodl again?
v0xie May 30, 2024
2d4bf1d
rework loss term
v0xie May 30, 2024
a7d1580
possibly working
v0xie May 30, 2024
e1f614f
add guard clause when strength is 0
v0xie May 30, 2024
2f90e59
test loss fn
v0xie Jun 5, 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
4 changes: 3 additions & 1 deletion scripts/incantation_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from modules.processing import StableDiffusionProcessing
from scripts.ui_wrapper import UIWrapper
from scripts.incant import IncantExtensionScript
from scripts.tcg import TCGExtensionScript
from scripts.t2i_zero import T2I0ExtensionScript
from scripts.scfg import SCFGExtensionScript
from scripts.pag import PAGExtensionScript
Expand All @@ -34,6 +35,7 @@ def __init__(self, module: UIWrapper, module_idx = 0, num_args = -1, arg_idx = -

# main scripts
submodules: list[SubmoduleInfo] = [
SubmoduleInfo(module=TCGExtensionScript()),
SubmoduleInfo(module=SCFGExtensionScript()),
SubmoduleInfo(module=PAGExtensionScript()),
SubmoduleInfo(module=T2I0ExtensionScript()),
Expand Down Expand Up @@ -67,7 +69,7 @@ def show(self, is_img2img):
def ui(self, is_img2img):
# setup UI
out = []
with gr.Accordion('Incantations', open=False):
with gr.Accordion('Incantations', open=True):
for idx, module_info in enumerate(submodules):
module_info.module_idx = idx
module = module_info.module
Expand Down
Loading