diff --git a/fooocus_version.py b/fooocus_version.py index 200610cb..0bbac3cd 100644 --- a/fooocus_version.py +++ b/fooocus_version.py @@ -1 +1 @@ -version = '2.1.772' +version = '2.1.773' diff --git a/models/prompt_expansion/fooocus_expansion/positive.txt b/models/prompt_expansion/fooocus_expansion/positive.txt index a7131449..0a1f7e4d 100644 --- a/models/prompt_expansion/fooocus_expansion/positive.txt +++ b/models/prompt_expansion/fooocus_expansion/positive.txt @@ -1,4 +1,4 @@ -abloom +abundant accelerated accepted accepting @@ -9,118 +9,74 @@ activated adapted adjusted admirable -adored +adorable adorned advanced adventurous advocated aesthetic -affectionate affirmed -affirming +affluent agile aimed -airy aligned alive -alleviated -alluring altered -altruistic amazing ambient -amiable +amplified analytical -angelic animated appealing applauded appreciated -appreciative -archetypal ardent -aristocratic aromatic arranged -arrayed arresting +articulate artistic -aspirational -aspired -assertive associated -assuaged assured -assuredly astonishing astounding -astral atmosphere attempted -attention-grabbing attentive -attired attractive -audacious -august authentic authoritative -avant-garde awarded -awe-inspiring -awe-striking awesome backed background baked balance balanced -baroque -beaming +balancing beaten -beatific -beauteous beautiful -bedazzling -bedecked -beguiling -bejeweled beloved +beneficial benevolent best bestowed -bewitching blazing blended blessed -blissed -blissful -blooming -bodacious -bonafide -bonny +boosted borne -boundless -braised brave breathtaking -breezy brewed bright -brightened brilliant -broiled -brooded brought -bubbly built -buoyant -buoyed burning calm calmed -canonized -captivating +candid caring carried catchy @@ -129,66 +85,49 @@ celestial certain championed changed -channeled charismatic -charmed charming chased -chaste cheered cheerful cherished -cherubic chic -chivalrous -choicest chosen -chromatic -churned cinematic clad -clapped classic +classy clear -clear-minded coached +coherent +collected color -colors colorful +colors colossal combined -comely -comforted comforting commanding -commendable -commended committed compassionate compatible complete complex -complimented +complimentary +composed composition comprehensive conceived conferred confident -congruent -congruous connected -consecrated considerable considered consistent -consoled -consonant conspicuous constructed constructive -consummate contemplated -contemplative contemporary content contrasted @@ -196,54 +135,36 @@ conveyed cooked cool coordinated -coruscating -cosmic coupled courageous -courted coveted cozy -craved created creative +credited crisp critical -crystal-clear -cuddly cultivated cured curious current -curvaceous customized cute -cutting-edge -dainty -dapper daring -dashing -dauntless -daydreamed +darling dazzling -dazzlingly -decked decorated decorative -decorous dedicated deep defended definitive -deific -deified -deliberated delicate delightful delivered -demonstrative -dependable depicted designed +desirable desired destined detail @@ -252,9 +173,8 @@ determined developed devoted devout -diaphanous -dignified diligent +direct directed discovered dispatched @@ -264,77 +184,42 @@ distinct distinctive distinguished diverse -diversified divine dramatic draped dreamed -dreamlike -dreamy driven -drop-dead dynamic earnest eased ecstatic -edified -edifying educated effective -effervescent -effulgent -effusive elaborate -elated -electrifying elegant elevated elite -eloquent -embellished -emboldened eminent emotional -empathetic -empathic -emphatic empowered empowering -enchanting -enchantingly +enchanted encouraged -encrusted -endearing -endeavored endorsed endowed enduring energetic -energized -energizing engaging +enhanced enigmatic enlightened -enlivened enormous -enraptured -enrapturing -enthralling -enticed enticing -entrancing envisioned epic -equanimous esteemed eternal -ethereal -ethically -eulogized -euphonious -euphoric -evocative -evocatively +everlasting evolved exalted examining @@ -343,646 +228,413 @@ exceptional exciting exclusive exemplary -exhilarating +exotic expansive -expedited -explorative exposed expressive -expressively exquisite -extemporized -extolled -extradited +extended extraordinary extremely -exuberant -eye-catching fabulous facilitated fair -fairy-tale-like +faithful +famous fancy -fantasied fantastic -fantastical fascinating fashionable fashioned -fathomless favorable favored fearless -feathery -felicitous fermented -fervent +fertile festive -fetched -fetching fiery fine finest firm -first-class -first-rate fixed -flamboyant flaming flashing flashy -flattered flavored flawless -flimsy -florid flourishing -flowery +flowing focus focused formal formed -fortuitous fortunate -forward-thinking -fostered fostering -found -foxy -fragranced -free-spirited +frank fresh fried +friendly +fruitful fulfilled -fulgent +full futuristic -galactic -gallant -galvanized -garbed -gargantuan -garnished -gemmed generous gentle -gentlemanly genuine gifted gigantic -given glamorous -gleaming -gleamy -glistening -glittering -glittery -glitzy -glorified glorious glossy glowing -godly gorgeous -gossamer graceful gracious grand -grandiose granted grateful -gratified +great grilled +grounded +grown guarded guided hailed -hallowed handsome -hardy -harmonious -harmonized -hastened -head-turning -heartened +healing +healthy heartfelt -heartwarming heavenly heroic -hoisted +historic holistic holy +honest honored hoped hopeful -huggable -hushed -hypnotic +iconic ideal -idealized -idyllic illuminated illuminating illumination -illustrative illustrious imaginative imagined -imagistic -imbued -immaculate immense immortal -impeccable imposing impressive -incandescent -incisive -indomitable +improved +incredible infinite -inflamed informed +ingenious innocent -innovated innovative -inproportion -inquisitive -insatiable -inshape insightful -insistent +inspirational inspired inspiring instructed integrated intense -intoxicating -intrepid intricate +intriguing invaluable invented investigative -invigorated -invigorating invincible inviting -iridescent -jaunty -jaw-dropping -jazzy -jeweled +irresistible joined joyful -joyous -jubilant -judicious keen -kind-hearted -kindhearted +kindly kinetic -kingly -kissable -kneaded -knightly knockout laced -ladylike -lambent lasting -laudable -laudatory lauded lavish -leading-edge legendary -lifelike lifted light -lightened -lighthearted -likable limited linked -lionized -lithe lively located logical -longed -lordly -lovable loved lovely -lucent +loving +loyal lucid lucky -luminous lush -lustrous luxurious luxury +magic magical magnificent majestic -mammoth -manifesting marked marvelous massive -masterful matched -matchless matured meaningful -meditated -meditative -mellifluous -mellow -mentored +memorable merged merry -mesmerizing -methodical meticulous -mind-blowing mindful miraculous -mirthful modern modified -modish -molded -monarchical monstrous monumental motivated motivational moved -multifaceted -multifarious -mused +moving mystical mythical naive -natty -navigated neat new +nice nifty noble notable noteworthy novel nuanced -nubile -nurtured -nurturing -odorous offered -opalescent +open optimal optimistic -opulent orderly organized original originated -ornate -ostentatious -otherworldly -outfitted outstanding -overjoyed -pacified +overwhelming paired palpable -panoramic -paradisiacal passionate -patterned peaceful -peerless -peppy perfect -perfumed -perky +perfected perpetual -persevering persistent -photogenic -pickled -pictorial -picturesque -piloted +phenomenal pious pivotal placed -placid planned +pleasant pleased pleasing +plentiful plotted plush -plushy -poached +poetic +poignant polished -pondered -posh positive praised -praiseworthy precious precise -preeminent premier premium -prepossessing presented preserved +prestigious pretty priceless prime -princely pristine probing -prodigious +productive professional profound +progressed progressive prominent promoted pronounced propelled proportional +prosperous protected provided -pulchritudinous -pungent +provocative pure pursued pushed +quaint quality -queenly questioning -quickened quiet -quintessential -racy radiant rare rational -ravishing real reborn -recharged reclaimed recognized recovered -redolent -reenergized refined reflected refreshed refreshing -refulgent -regal -regenerated -reinvigorated -rejuvenated -rejuvenating related relaxed relentless +reliable relieved remarkable renewed +renowned representative rescued resilient -resolute respected -resplendent +respectful restored retrieved revealed +revealing revered -reverent -revitalized -revitalizing revived rewarded -rhythmic rich -ripened -ritzy roasted -robed robust -rococo romantic royal -ruminated sacred -saintly salient -saluted -sanctified satisfied +satisfying saturated saved scenic -scented -schemed scientific -sculpted -second-to-none select -seraphic -serendipitous -serene -serenity +sensational serious set shaped -shapely sharp shielded -shimmering shining shiny -shipshape -show-stopping shown -showy -sightly significant silent -silky -simmered sincere singular situated sleek slick smart -smelly -snazzy snug -snuggly solemn solid -soothed soothing sophisticated sought -soulful -spangled sparkling special spectacular sped -spellbinding -spiced -spiffy spirited spiritual -splashy splendid -sprightly -spruce -spunky +spread stable -stagey -starry -stately -statuesque -steamed -steered -stewed +steady still stimulated stimulating stirred +straightforward striking strong structured -studded stunning -stupendous sturdy stylish sublime -sumptuous -sun-kissed +successful sunny superb superior -superlative supplied supported +supportive supreme sure surreal -swank -swanky sweet -sweetened -swish symbolic symmetry -symmetrical synchronized systematic tailored taking -tangy -tantalizing targeted -tasteful taught -tenacious +tempting tender +terrific thankful theatrical thought +thoughtful thrilled thrilling +thriving tidy timeless -titanic -toasted -top-drawer -top-notch -top-tier -topnotch +touching tough trained tranquil -tranquilized -transcendent -transcendental transformed translucent transparent transported -treasured +tremendous trendy tried trim true -twinkling -twinned -unblemished -uncluttered +trustworthy +unbelievable unconditional uncovered -unequaled -unfeigned +unified unique united universal unmatched unparalleled -unrivaled -unsullied -unsurpassed -unyielding -up-to-date upheld -uplifted -uplifting valiant valued varied -velvety -venerated -venturesome vibrant -vinted -virginal virtuous -visualized -vitalized -vivacious vivid -vivified -voguish warm -well-built -well-formed -well-kept -well-proportioned -well-turned -whimsical -whisked +wealthy whole winning -winsome wished -wisp-like +witty wonderful -wondrous -wooed -worshiped worshipped -yearned -zesty -zippy +worthy diff --git a/modules/expansion.py b/modules/expansion.py index a536fad0..e26f7229 100644 --- a/modules/expansion.py +++ b/modules/expansion.py @@ -33,13 +33,20 @@ class FooocusExpansion: positive_words = open(os.path.join(fooocus_expansion_path, 'positive.txt'), encoding='utf-8').read().splitlines() - positive_words = ['Ġ' + x for x in positive_words if x != ''] + positive_words = ['Ġ' + x.lower() for x in positive_words if x != ''] self.logits_bias = torch.zeros((1, len(self.tokenizer.vocab)), dtype=torch.float32) + neg_inf + debug_list = [] for k, v in self.tokenizer.vocab.items(): if k in positive_words: self.logits_bias[0, v] = 0 + debug_list.append(k[1:]) + + print(f'Fooocus V2 Expansion: Vocab with {len(debug_list)} words.') + + # debug_list = '\n'.join(sorted(debug_list)) + # print(debug_list) # t11 = self.tokenizer(',', return_tensors="np") # t198 = self.tokenizer('\n', return_tensors="np")