diff --git a/3-bmab/.gitignore b/3-bmab/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..5ef948413f1b4fce8f0fc2930704133a167ee0f2 --- /dev/null +++ b/3-bmab/.gitignore @@ -0,0 +1,2 @@ +**/__pycache__/ +cache/ diff --git a/3-bmab/LICENSE.txt b/3-bmab/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..211d32e752cb61bd056436e8f7a806f12a626bb7 --- /dev/null +++ b/3-bmab/LICENSE.txt @@ -0,0 +1,663 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (c) 2023 AUTOMATIC1111 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/3-bmab/README.md b/3-bmab/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0d0358dfe6216b08b26efdc9345f33a671ac7722 --- /dev/null +++ b/3-bmab/README.md @@ -0,0 +1,214 @@ + +# BMAB + +BMAB는 Stable Diffusion WebUI의 확장 기능으로, 생성된 이미지를 설정에 따라 후처리하는 기능을 가지고 있습니다. +필요에 따라 인물, 얼굴, 손을 찾아 다시 그리거나, Resize, Resample, 노이즈 추가 등의 기능을 수행할 수 있으며, +두 장의 이미지를 합성하거나, Upscale의 기능을 수행 할 수 있습니다. + +BMAB is an extension of Stable Diffusion WebUI and has the function of post-processing the generated image according to settings. +If necessary, you can find and redraw people, faces, and hands, or perform functions such as resize, resample, and add noise. +You can composite two images or perform the Upscale function. + +Manual (KR) + +You can see more image. https://www.facebook.com/profile.php?id=61553793992101 + +## Example + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ Person, Face Detailing, cnNoise(0.4, 0, 0.4), cnPose(1, 0, 1), cnIpAdapter(0.6, 0, 0.3), Custom Filter, +
+ +
+ IC-Light(Left), Face Detailing, Resample, cnNoise(0.4, 0, 0.4), cnPose(1, 0, 1), cnIpAdapter(0.6, 0, 0.3) +
+ +
+ IC-Light(Left), Face Detailing, Resample, cnNoise(0.4, 0, 0.4), cnPose(1, 0, 1), cnIpAdapter(0.6, 0, 0.3) +
+ + + +
+ IC-Light(Left), Face Detailing, + + IC-Light(Left), Face Detailing, +
+ +
+ Face Detailing, Resample, cnNoise(0.4, 0, 0.4), cnPose(1, 0, 1), cnIpAdapter(0.6, 0, 0.3) +
+ + + +
+ Face Detailing, cnNoise(0.4, 0, 0.4), cnPose(1, 0, 1), cnIpAdapter(0.6, 0, 0.3) + + Face Detailing, cnNoise(0.4, 0, 0.4), cnPose(1, 0, 1), cnIpAdapter(0.6, 0, 0.3) +
+ + + +
+ Face Detailing, cnNoise(0.4, 0, 0.4), cnPose(1, 0, 1), cnIpAdapter(0.6, 0, 0.3) + + Face Detailing, cnNoise(0.4, 0, 0.4), cnPose(1, 0, 1), cnIpAdapter(0.6, 0, 0.3) +
+ + + +
+ Face Detailing, cnNoise(0.4, 0, 0.4), cnPose(1, 0, 1), cnIpAdapter(0.6, 0, 0.3) + + Face Detailing, cnNoise(0.4, 0, 0.4), cnPose(1, 0, 1), cnIpAdapter(0.6, 0, 0.3) +
+ + + +
+ Face Detailing, cnNoise(0.4, 0, 0.4), cnPose(1, 0, 1) + + Face Detailing, cnNoise(0.4, 0, 0.4), cnPose(1, 0, 1) +
+ +
+ Face Detailing, ControlNet Noise (0.4, 0, 0.4), +
+ + + +
+ Resize intermediate (inpaint+lama, Bottom, 0.75, 0.6),
+ Face Detailing, ControlNet Noise (0.7, 0, 0.6),
+ Noise Alpha (0.1) +
+ Resize intermediate (Center, 0.5, 0.6),
+ Face Detailing, ControlNet Noise (0.4, 0, 0.4)
+
+ +
+ +
+ +
+ +
+ + + +
+ + + +
+ +
+ Resize intermediate (Bottom, 0.5, 0.6), Face Detailing, ControlNet Noise (0.4, 0, 0.4) +
diff --git a/3-bmab/ReleaseNote.md b/3-bmab/ReleaseNote.md new file mode 100644 index 0000000000000000000000000000000000000000..71e9afdf0b6fdf0a54582dde9bc41939fb9292f1 --- /dev/null +++ b/3-bmab/ReleaseNote.md @@ -0,0 +1,143 @@ +### v24.05.12 + +* New Feature + * ICLight + * Style 추가했습니다. + * intensive : IC-Light original process + * less intensive : 과도한 적용을 줄임 + * normal : 배경을 최대한 살리면서 lighting 적용 + * soft : 배경을 최대한 살림 + * Face : 얼굴 부분을 강조하도록 검출해서 조명으로 강조 + * Person : 사람을 찾아 조명으로 강조 + * Cache + * 디렉토리가 존재하지 않으면 생성 + * Pretraining + * 입력된 폭, 높이가 아니라 실제 이미지의 크기를 사용하도록 수정 + +### v24.05.12 + +* New Feature + * ICLight : https://github.com/lllyasviel/IC-Light + * ICLight 기능을 제어할 수 있도록 통합했습니다. + * 메모리 사용량이 많습니다. + * Enable ICLight before upscale 끄면 1200*1800을 4090으로도 어렵습니다. + * Process 작업전 수행되는 preprocess filter가 추가되었습니다. +* Code Fix + * Pose Default 값을 변경했습니다. + * cache를 통합 제어하도록 변경했습니다. + +### v24.05.07 + +* New Feature + * Installer : groudingdino for CUDA support. + * Resample : fix FakeControlNet + * Refactoring : multiple controlnet support + + +### v24.05.01 + +* New Feature + * ControlNet IpAdapter에서 하위 디렉토리를 만들면 하위 디렉토리 안에서 이미지를 적용할 수 있도록 개선했습니다. + * Random으로 지정하면 전체 이미지에서 선택합니다. + * 저장된 정보를 불러왔을때 Pose, IpAdapter 이미지가 표시됩니다. + +* ### v24.05.01 + +* New Feature + * ControlNet IpAdapter 기능을 제공합니다. + * sd-webui-controlnet을 이용하여 제공하며, 랜덤하게 이미지를 적용할 수 있도록 개선했습니다. + * Setting > BMAB에 현재 ControlNet IpAdapter의 model을 적어주셔야 합니다. + * 기본적으로 모델은 default로 적용해두었습니다. + +* Code Fix + * Setting에 Additional Checkpoint Path이 sd-webui 1.8에서 동작하지 않아, 이런 경우 빈칸으로 두면 오류가 발생하지 않도록 수정했습니다. + * Person, Face 의 prompt가 hires.fix가 켜져있다면 hires.fix 것을 사용함. + +### v24.04.30 + +* New Feature + * Person Detailer에 checkpoint, vae, sampler, scheduler 및 steps 추가 + * Setting에 Additional Checkpoint Path 디렉토리를 입력하면 두 디렉토리 내용을 병합하여 전체적 적용됨. + +* Code Fix + * Person, Face 의 prompt가 hires.fix가 켜져있다면 hires.fix 것을 사용함. + +### v24.04.26 + +* Code Fix + * Pretraining 에 checkpoint, vae 선택 추가 + * checkpoint, vae, filter, pose 등에 대한 fresh 버튼을 삭제하고 하나로 통합 + * vintage filter 추가 + + +### v24.04.20 + +* New Features + * Pose + * Face only 옵션 추가 + * Pose를 선택할 수 있도록 추가 + +### v24.04.17 + +* New Features + * Pose + * sd-webui-bmab/pose 디렉토리에 있는 이미지를 이용하여 openpose를 동작한다. + * seed에 맞춰서 임의이 순서로 동작한다. + * Face + * CheckPoint를 선택할 수 있도록 추가 + * Pretraining + * Filter를 선택할 수 있도록 추가 + * Refiner + * VAE를 선택할 수 있도록 추가 + * Noise + * Both, Low res fix, High res fix 추가. + +### v24.04.16 + +* Code Fix + * 1.9.0 지원 + * 1.8.0 하위 호환 + * CheckPoint 관련 전반 수정 + * basicsr 설치 오류 수정 + +### v24.04.05 + +* Code Fix + * 1.8.0 설치시에 동작하지 않는 버그를 수정했습니다. + * preprocess filter 분리 + * hires.fix - upscale 시에 필터가 정확하게 적용되지 않는 버그 수정 + * ControlNet Noise 사용시에 그레이 이미지를 사용하도록 수정 + * 그 외 몇가지 코드 리펙토링 + +### v23.11.30.0 + +* Code Fix + * Support BMAB DR + * Img2img rollback + + +### v23.11.28.0 + +* New Feature + * Kohya Hires.fix + * Preprocess에서 Kohya Hires.fix기능을 추가하였습니다. + * 이 기능을 사용할때 sd 1.5 기준 1024x1025, 1536x1536, 1024x1536, 1536x1024일 경우가 가장 잘나옵니다. + * 이 기능은 원작자가 SDXL을 위해서 만든 기능입니다. 굳이 sd 1.5에서 사용할 필요는 없습니다. + + +### v23.11.27.0 + +* New Feature + * Stop generating gracefully + * BMAB 프로세스가 완료되면 batch가 남아있더라도 종료하는 기능. + * 이미지 생성 중간에 Interrupt 를 눌러서 종료가 아니라, 이미지 생성이 완료되면 종료된다. + * 'Enable BMAB' 오른쪽에 작게 Stop이 있다. + * FinalFilter + * 최종 이미지에 수정을 가할 수 있도록 필터를 적용할 수 있도록 하는 기능. + * 필터는 구현해서 filter에 넣으면 확인할 수 있다. +* BugFix + * Img2Img와 openpose 사용시에 inpaint area 적용되지 않는 문제 수정. + * 약간의 코드 리펙토링 + + + diff --git a/3-bmab/docs/en/bmab.md b/3-bmab/docs/en/bmab.md new file mode 100644 index 0000000000000000000000000000000000000000..c456a23acf9288aba487b7a76ac3b5c4d0f2f36c --- /dev/null +++ b/3-bmab/docs/en/bmab.md @@ -0,0 +1,319 @@ + +# BMAB + +## 기본 기능 + +* Contrast : 대비값 조절 (1이면 변경 없음) +* Brightness : 밝기값 조절 (1이면 변경 없음) +* Sharpeness : 날카롭게 처리하는 값 조절 (1이면 변경 없음) +* Color Temperature : 색온도 조절, 6500K이 0 (0이면 변경 없음) +* Noise alpha : 프로세스 전에 노이즈를 추가하여 디테일을 올릴 수 있습니다. (권장값:0.1) +* Noise alpha at final stage : 최종 단계에서 노이즈를 추가하여 분위기를 다르게 전달할 수 있습니다. + + +## Imaging + +### Blend Image in Img2Img + +이미지 업로드 상자에 입력한 이미지와 Img2Img에 입력된 이미지를 Blending합니다. +Blend Alpha 값으로 두 개의 이미지를 합성합니다. +"Process before Img2Img" 옵션이 적용됩니다. + +### Dino detect + +Img2Img Inpainting 하는 경우에 마스크를 입력하지 않아도 Dino detect prompt에 있는 내용을 이용하여 자동으로 마스크를 생성합니다. +이미지를 업로드 하게되면 업로드된 이미지를 배경으로 하여 prompt로 입력된 부분을 업로드 이미지에 합성합니다. + +#### Img2Img 에서 사용하는 경우 + +

+ + +

+

+ + +

+ + + +첫번째 image는 Img2Img 이미지로 지정 +두번째 image는 BMAB의 Imaging에 Image 입력창에 지정 + +프로세스 과정에서 세번째 image를 합성하고 프롬프트에 따라서 결과가 얻어진다. + +Enabled : CHECK!! + +Contrast : 1.2 +Brightness : 0.9 +Sharpeness : 1.5 + +Enable dino detect : CHECK!! +DINO detect Prompt : 1girl + + +#### Img2Img Inpaint 에서 사용하는 경우 + +DINO detect Prompt에 있는 내용대로 자동으로 마스크를 만들어준다. + +

+ + + +

+ + +이번 예제에서는 배경을 변경했으니, inpaint 설정에서 "Inpaint Not Masked"를 선택해야 한다. +반대로 "Inpaint Masked"를 하면 인물이 변경된다. + + +## Person + +이 기능을 사용하게 되면 프로세스가 완료된 이후에, 인물을 감지하여 다시 그립니다. +아래의 경우에 사용하면 효과적입니다. + +* 인물이 배경에 비해 매우 작은 경우, 의복, 얼굴 등 인물 전체의 디테일이 올라갑니다. +* 4K와 같이 큰 이미지를 출력하는 경우, 업 스케일 이후에 인물이 작은 경우 이 기능을 사용하면 인물이 뚜렷해 집니다. +* Face Detailing과 같이 사용하면 좋은 효과를 볼 수 있습니다. + + + + + +#### Enable person detailing for landscape (EXPERIMENTAL) + +풍경에서 인물을 자세하게 다시 그리는 기능을 활성화 합니다. + +#### Block over-scaled image + +이 기능이 켜지게 되면 인물을 찾아내서 크게 키워서 다시 그리는데 이때 확대된 이미지의 면적이 본래 이미지를 초과하게 되면 프로세스를 멈춥니다. +sd-webui가 멈추거나 GPU를 보호하기 위한 목적입니다. + +#### Auto scale if "Block over-scaled image" enabled + +이 기능을 설정하면 위에서 언급한 "Block over-scaled image"로 차단될 경우 본래 이미지의 면적에 맞춰서 스케일을 조정하여 작업합니다. + +#### Upscale Ratio + +인물이 발견되면 주어진 비율로 키워서 자세하게 그립니다. + +#### Denoising Strength + +인물의 크기가 클 경우 0.4로 부족할 수 있습니다. 이런 경우 수치를 올려주세요. + +#### Dilation mask + +찾아낸 인물의 마스크를 확장합니다. + +#### CFG Scale + +인물을 다시 그릴때 사용하는 CFG scale 값입니다. + +#### Large person area limit + +인물이 이미지 속에서 차지하는 면적이 이 값을 초과하면 작업하지 않습니다. +인물이 충분히 큰 경우 다시 그릴 필요가 없기 때문입니다. + +#### Limit + +이미지 속에 인물이 너무 많은 경우 면적단위로 큰 것부터 카운트하여 설정값을 초과하여 다시 그리지 않습니다. + + + + + + +## Face + +### Face Detailing + +이 기능을 사용하게 되면 프로세스가 완료된 이후 After Detailer(AD)나 Detection Detailer(DD)와 같이 +얼굴을 보정합니다. +이 기능을 동작시킨 후에 AD, DD가 동작하도록 설정한다면, 결과가 좋지 않을 수 있습니다. + + + +최대 5개의 캐릭터에 대해 prompt를 별도로 지정할 수 있습니다. + +#### Enable face detailing + +face detailing 기능을 켜고 끌 수 있습니다. + +#### Enable face detailing before hires.fix (EXPERIMENTAL) + +face detailing 기능을 txt2img 과정의 hires.fix 직전에 한 번 더 수행합니다. +얼굴을 보정한 이후에 upscale을 하기 때문에 더 좋은 품질의 이미지를 얻을 수 있습니다. +하지만 부하가 더 들어가고, 이미지 변화가 심합니다. + +#### Face detailing sort by + +이미지 안에 여러 인물이 있는 경우 어떤 순서로 Detailing 할 것인지 결정합니다. + + + + +왼쪽, 오른쪽 혹은 크기로 가능하며 없다면 기본적으로 Score 값이 높은 순서로 합니다. + +#### Limit + +이미지 않에 여러 인물이 있는 경우 위에서 정한 순서로 얼마나 수행할지 결정합니다. +Limit이 1이라면 최대 1개만 수행한다는 뜻입니다. + +#### Override Parameters + +* Denoising Strength +* CFG Scale +* Width +* Height +* Steps +* Mask Blur + +위 값에 대해 기본값이 아닌 UI에서 지정한 값을 사용합니다. + +#### Inpaint Area + +전체를 다시 그릴지 얼굴만 다시 그릴지를 결정합니다. 전체를 다시 그리는 것은 별로 추천하지 않습니다. + +#### Only masked padding, pixels + +기본값을 사용해 주세요. + +#### Dilation + +검출된 얼굴의 마스크 크기를 키웁니다. + +#### Box threshold + +Detector의 검출 값을 결정합니다. 기본값 0.35보다 작으면 face가 아닐 것으로 제외합니다. +YOLO를 사용하는 경우 confidence를 대체합니다. + +**좋은 결과를 얻기 위한 조언** + +* Prompt에 얼굴 관련된 lora, textual inversion등 관련 내용을 뺍니다. sunglass 등은 무관합니다. +* 설정 파일에 얼굴마다 서로 다른 lora, textual inversion 등을 넣습니다. +* prompt에 lora, TI가 많을 경우 그림 생성 자유도가 떨어지는 것 같습니다. +* 그림속 모든 캐릭터가 공유되는 lora는 넣어주셔도 무방합니다. + + + +## Hand + +### Hand Detailing (EXPERIMENTAL) + +손 표현이 잘못된 부분을 수정하는 기능입니다. +만들어진 그림에서 손 부분을 자동으로 찾아내어 해당 부분을 다시 그리는 기능입니다. +다만 손의 경우 다시 그려도 잘 그려질지 확실하지 않으며, 손을 자세하게 그리는 정도입니다. + + + +#### Enable hand detailing + +손 보정 기능을 사용하도록 활성화 합니다. + +#### Block over-scaled image + +이 기능은 손을 찾아내어 확대해서 다시그리는 방법을 사용합니다. +다시 그려야 하는 부분의 면적이 원래이미지를 초과하게 되면 작업을 수행하지 않습니다. +이런 경우에는 Upscale Ratio를 줄이거나, 이 기능을 꺼야하는데, 이 기능을 끄면 매우 큰 그림을 다시 그릴 수도 있어서 GPU에 부하가 걸릴 수 있습니다.. + +#### Method +* subframe : 손을 포함하여 얼굴/머리 부분까지 찾아내어 상반신을 다시 그린다. +* each hand : 손을 찾아내여 3배 크기의 주변부 까지 다시 그려 손만 적용한다. +* each hand inpaint : 손을 찾아내어 3재 크기의 주변부를 기반으로 손만 다시 그린다. + 매우 극단적으로 변형될 수 있어서 잘 그려지기 어렵다 모양이 갖춰진다면, subframe으로 다시 그리는 것을 추천한다. +* at once : 찾아낸 손을 모두 한번에 다시 그린다. + + +#### Prompt + +Subframe에서는 입력하지 않을 것을 권장합니다. +each hand, each hand inpaint시에 손 관련 프롬프트를 입력합니다. + +#### Negative Prompt + +Subframe에서는 입력하지 않을 것을 권장합니다. +each hand, each hand inpaint시에 손 관련 네거티브 프롬프트를 입력합니다. + +#### Denoising Strength + +다시 그리는 경우 Denoising Strength 값 입니다. +* subframe : 0.4 권장 +* 기타 0.55 이상 권장 + +#### CFG Scale + +다시 그리는 경우 CFG Scale 값 입니다. + +#### Upscale Ratio +상반신 / 손 주변을 찾아내어 얼마나 크게 확대하여 다시 그릴 것인지 지정한다. +무조건 크게 그린다고 성공확률이 올라가는 것은 아니다. +* subframe : 2.0 +* 기타 : 2.0~4.0 + +#### Box Threshold + +손을 찾아내지 못하는 경우 이 값을 낮추면, 찾아낼 수 있는 확률이 올라갑니다. +하지만 잘 못 찾아낼 가능성도 올라갑니다. + +#### Box Dilation + +찾아낸 박스(손을 포함하여)의 외곽 부분을 얼마나 크게 할 것이 결정합니다. (only for subframe) + +#### Inpaint Area + +찾아낸 박스 전체를 다시 그릴 것인지, 손만 다시 그릴 것인지를 결정한다. +손만 다시그리는 경우 손 모양이 원하지 않게 바뀔 수 있으나 크게 변경된다. + +#### Only masked padding + +찾아낸 손의 내부 공간을 얼마 정도로 채울지를 결정합니다. 딱히 변경할 일 없습니다. + +#### Additional Parameter + +현재는 제공하지 않지만 향후 고급 사용자를 위한 옵션을 제공할 예정입니다. + + + +## ControlNet + +ControlNet을 이용하여 이미지에 노이즈를 추가하는 방법으로 디테일을 올리는 기능입니다. +ControlNet의 Lineart 모델에 가우시안 노이즈 이미지를 입력으로 사용하여, +결과물에 다양하고 복잡한 디테일을 추가합니다. + +#### Noise Strength + +노이즈 강도를 지정합니다. (0.4 권장) + +#### Begin + +Sampling 단계 시작점 + +#### End + +Sampling 단계 끝점 + +보통의 경우 0.4, 0, 0.4를 권장합니다. 혹은 이미지가 과도하게 그려질 경우 0.2, 0, 0.4 정도로 추천합니다. +과도하게 이미지가 그려진 경우 refiner를 사용하면 이미지를 어느 정도 안정시킬 수 있습니다. + +아래는 모두 같은 seed입니다. + + + + + + + + + + + +
기본이미지0.40.7
+ + + + + + +
+
+
diff --git a/3-bmab/docs/en/manual.md b/3-bmab/docs/en/manual.md new file mode 100644 index 0000000000000000000000000000000000000000..bad6b46f361a0e7d4e4145824028832d76b0cf32 --- /dev/null +++ b/3-bmab/docs/en/manual.md @@ -0,0 +1,58 @@ + +## Quick Test + +Enable을 체크하고 Config Tab에서 Preset "example"을 선택합니다. + +contrast: 1.2 +brightness: 0.9 +sharpeness: 1.5 + +Edge enhancement 적용 +Face Detailing 적용 +Resize by person 적용 + + + +## 기본 옵션 + +Enabled (VERSION): 기능을 켜고 끌 수 있습니다. + +### Resize and fill override + +Img2Img를 수행하는 경우 "Resize and fill" 을 선택하게 되면 +통상 좌우, 상하로 늘어나거나 비율이 같다면 그대로 크기만 변경됩니다. + +Enabled 된 상태에서는 항상 이미지가 아래에 위치하고, +왼쪽, 오른쪽, 윗쪽으로 비율에 맞게 늘어납니다. + +인물의 윗쪽으로 여백이 없는 경우에 적용하면 효과적입니다. +너무 크게 늘리게 되면 좋은 결과를 얻기 힘듭니다. +대략 1.1, 1.2 정도 스케일에서 사용하시길 권장합니다. + +

+ + +

+ +
+
+
+ +# Preprocess + +본 이미지 변경을 하기 전에 사전 처리 과정을 수행합니다. +조건에 따라 hires.fix 과정에 개입할 수도 있습니다. + +Preprocess + +# BMAB + +Person, Hand, Face detailer를 수행하거나, 이미지 합성 혹은 노이즈 추가등의 기능을 수행합니다. + +bmab + +# Postprocess + +이미지 처리가 완료된 이후, 인물의 크기에 따라 배경을 확장하거나 upscale을 할 수 있습니다. + +Postprocess diff --git a/3-bmab/docs/en/postprocess.md b/3-bmab/docs/en/postprocess.md new file mode 100644 index 0000000000000000000000000000000000000000..2fc66330d0a198fb6b0640fcfa95091748bbf898 --- /dev/null +++ b/3-bmab/docs/en/postprocess.md @@ -0,0 +1,66 @@ + + +# PostProcessing + +## Resize + +### Resize by person + +그림 속 인물중 가장 신장이 큰 사람의 길이와 그림 높이의 비율이 설정값을 넘어가면 비율을 설정값로 맞추는 기능입니다. +설정값이 0.90이고 인물의 전체 길이: 그림 높이의 비율이 0.95라고 한다면 +배경을 늘려서 인물의 비율이 0.90이 되도록 합니다. +배경은 왼쪽, 오른쪽, 위쪽으로 늘어납니다. + + +이 기능은 2가지 방법을 제공하는데 다음과 같습니다. + +#### Inpaint + +Face Detailing과 같은 방법으로 이미지가 완전히 생성되고 난 후에 주변부를 확장합니다. +이때 이미 생성된 이미지를 훼손하지 않고 주변부만 확장하기 때문에 직관적으로 확인이 가능합니다. +가장 빠르고 효과적으로 추천합니다. + +#### Inpaint + lama + +Inpaint와 같은 방법인데 BMAB에서 ControlNet을 불러서 Inpaint+lama를 이용해서 동작합니다. +이미지가 생성되고나서 디테일링 시작하기 전에 img2img를 이용하여 배경을 확장하여 전체적으로 인물을 작게 만드는 효과가 있습니다. + + + + + + + + + + + + + + +
+ +이 두가지 방법은 생성된 이미지를 축소하기만 할뿐 훼손하지 않습니다. +이것이 Resize intermediate와 다른점입니다. + + +## Upscaler + +최종적으로 이미지가 완성되고 난 이후에 이미지를 upscaler를 이용하여 크게 만듭니다. + + +#### Enable upscale at final stage + +이미지 생성이 완료되고 난 이후에 Upscale을 수행합니다. +960x540으로 생성하고 hires.fix를 x2로 하면 1920x1080 이미지가 나오는데 +여기서 Upscale을 x2를 하면 4K 이미지가 나오게 됩니다. + +#### Detailing after upscale + +이 옵션을 설정하면 위에서 언급한 Person, Face, Hand 에 대한 detailing을 upscale 이후에 수행합니다. + +#### Upscale Ratio + +이미지를 얼마나 upscale할지 결정합니다. + + diff --git a/3-bmab/docs/en/preprocess.md b/3-bmab/docs/en/preprocess.md new file mode 100644 index 0000000000000000000000000000000000000000..598d6670bd472d1a871ad0c69b7f975b7d17c4d2 --- /dev/null +++ b/3-bmab/docs/en/preprocess.md @@ -0,0 +1,425 @@ + +# Preprocess + +## Context + +BMAB에서 사용할 Checkpoint와 VAE를 지정합니다. +특정 기능들은 자체 Checkpoint와 VAE를 설정할 수 있습니다. +한 번 변경된 Checkpoint는 그 이후 프로세스들이 계속 사용합니다. + + + +#### txt2img noise multiplier for hires.fix + +hires.fix 단계에서 noise를 추가 할 수 있다. + +#### txt2img extra noise multiplier for hires.fix (EXPERIMENTAL) + +hires.fix 단계에서 추가적인 noise를 더 할 수 있다. + +#### Hires.fix filter before upscaler + +Hires.fix 단계 중 upscaler 전에 filter를 적용할 수 있다. + +#### Hires.fix filter after upscaler + +Hires.fix 단계 중 upscaler 후에 filter를 적용할 수 있다. + + +## Resample (EXPERIMENTAL) + +Self resampling 기능입니다. txt2img -> hres.fix를 통해 생성된 이미지를 다시 txt2img -> hires.fix 과정을 수행하면서 +ControlNet Tile Resample을 수행합니다. 아래와 같은 경우 사용할 수 있습니다. + +* 두 모델간에 결과물 차이가 큰 경우 +* 두 모델간에 인물 비율이 차이나는 경우 +* 두 모델간 버전이 다른 경우 (SDXL, SD15) + + + + + + + + + + +
txt2img->hires.fixResample + BMAB Basic
+ + +BMAB resample image by [padapari](https://www.instagram.com/_padapari_/) + +
+
+
+
+ + + + +#### Enable self resample (EXPERIMENTAL) + +이 기능을 켜고 끌 수 있습니다. + +#### Save image before processing + +최초 txt2img -> hires.fix를 통해 생성된 이미지가 후 처리를 위해 BMAB로 입력되면, +해당 이미지를 프로세싱하기 전에 저장합니다. 이미지 postfix로 "-before-resample"이 붙습니다. + +#### Checkpoint + +SD Checkpoint를 지정할 수 있습니다. 지정하지 않는다면 앞에서 설정된 Checkpoint를 사용합니다. +프로세스가 완료되어도 원래 것으로 돌려놓지 않습니다. + +#### SD VAE + +SD VAE를 지정할 수 있습니다. 지정하지 않는다면 앞에서 설정된 VAE를 사용합니다. +프로세스가 완료되어도 원래 것으로 돌려놓지 않습니다. + +#### Resample method + +Resample 방법을 선택할 수 있습니다. + +txt2img-1pass : txt2img을 hires.fix 없이 동작시킨다. +txt2img-2pass : txt2img를 hires.fix로 동작시킨다. 기본적으로 이미지를 출력할 때 hires.fix가 동작해야하만 한다. +img2img-1pass : img2img로 동작시킨다. + +#### Resample filter + +Resample이 완료되고 난 이후에 외부 filter 코드를 호출하여 이미지 변환을 추가적으로 수행할 수 있다. + + +#### Resample prompt + +resampling 과정에서 사용할 prompt입니다. 비어있는 경우 main prompt와 동일하며, +"#!org!#" 를 입력하면 main prompt를 대체합니다. "#!org!#" 이후에 추가로 prompt를 적을 수 있습니다. +ex) #!org!#, soft light, some more keyword + +#### Resample negative prompt + +resampling 과정에서 사용할 prompt입니다. 비어있는 경우 main negative prompt와 동일합니다. + +#### Sampling method + +프로세스에 사용할 sampling method를 지정합니다. 지정하지 않는다면 이전 프로세스와 같은 sampler를 지정합니다. + +#### Upsacler + +hires.fix를 사용하는 경우에 지정하는 upscaler입니다. + +#### Resample sampling steps + +resample process 사용할 samping steps를 지정합니다. +(권장 20) + +#### Resample CFG scale + +resample process 사용할 CFG scale 값을 지정합니다. +dynamic threshold는 지원하지 않습니다. + +#### Resample denoising strength + +resample process가 사용할 denoising strength를 지정합니다. +(권장 0.4) + +#### Resample strength + +0에 가까운 값은 입력 이미지와 멀어지고, 1에 가까울 수록 원본 이미지와 유사합니다. + +#### Resample begin + +sampling 단계에 적용 시작점. + +#### Resample end + +sampling 단계 적용 종료 시점. + + + + + + + + +## Pretraining (EXPERIMENTAL) + +Pretraining detailer입니다. ultralytics로 pretraining 모델을 적용하여 detection을 수행하고 +이를 기반으로 prompt, negative prompt를 적용하여 부분적으로 이미지를 더 자세하게 그릴 수 있습니다. + + + +#### Enable pretraining detailer (EXPERIMENTAL) + +이 기능을 켜고 끌 수 있습니다. + +#### Enable pretraining before hires.fix + +pretraining detailer를 hires.fix 전에 수행하도록 한다. + +#### Pretraining model + +ultralytics 로 학습된 detection model (*.pt)를 지정할 수 있습니다. +stable-diffusion-webui/models/BMAB에 해당 파일이 있어야 목록에 나타납니다. + + +#### Pretraining prompt + +pretraining detailer process 과정에서 사용할 prompt입니다. 비어있는 경우 main prompt와 동일하며, +"#!org!#" 를 입력하면 main prompt를 대체합니다. "#!org!#" 이후에 추가로 prompt를 적을 수 있습니다. +ex) #!org!#, soft light, some more keyword + +#### Pretraining negative prompt + +pretraining detailer process 과정에서 사용할 prompt입니다. 비어있는 경우 main negative prompt와 동일합니다. + +#### Sampling method + +프로세스에 사용할 sampling method를 지정합니다. 지정하지 않는다면 이전 프로세스와 같은 sampler를 지정합니다. + + +#### Pretraining sampling steps + +resample process 사용할 samping steps를 지정합니다. +(권장 20) + +#### Pretraining CFG scale + +resample process 사용할 CFG scale 값을 지정합니다. +dynamic threshold는 지원하지 않습니다. + +#### Pretraining denoising strength + +resample process가 사용할 denoising strength를 지정합니다. +(권장 0.4) + +#### Pretraining dilation + +detection 된 사각형의 범위를 주어진 값 만큼 크기를 크게 합니다. + +#### Pretraining box threshold + +Detector의 검출 값을 결정합니다. 기본값 0.35보다 작으면 face가 아닐 것으로 제외합니다. +ultralytics predict의 confidence 값입니다. + + + +## Edge enhancemant + +이미지 경계를 강화해 선명도를 증가시키거나 디테일을 증가시키는 기능입니다. + +**Upscaler가 Latent 계열인 경우 동작하지 않습니다. (R-ESRGAN, 4x-UltraSharp 추천)** + + + +권장설정 + +* Edge low threshold : 50 +* Edge high threshold : 200 +* Edge strength : 0.5 + +

+ + +

+ +Enabled : CHECK!! + +Contrast : 1.2 +Brightness : 0.9 +Sharpeness : 1.5 + +Enable edge enhancement : CHECK!! +Edge low threshold : 50 +Edge high threshold : 200 +Edge strength : 0.5 + + + + +## Resize + +txt2img -> hires.fix 의 중간 과정에서 동작합니다.. +만약 img2img에서 사용한다면, 프로세스 시작 전에 동작합니다. + +그림 속 인물중 가장 신장이 큰 사람의 길이와 그림 높이의 비율이 설정값을 넘어가면 비율을 설정값로 맞추는 기능입니다. +설정값이 0.90이고 인물의 전체 길이: 그림 높이의 비율이 0.95라고 한다면 +배경을 늘려서 인물의 비율이 0.90이 되도록 합니다. +배경은 Alignment에서 지정한 방식에 따라 늘어납니다. + +txt2img 수행하는 단계에서 hires.fix 하기 직전에 이미지를 변경합니다. +이 과정은 변경된 이미지가 hires.fix 과정에서 매끄럽게 변하게 하기 위한 것입니다. +**denoising strength는 0.6~0.7 정도를 사용하셔야 주변부 이미지 왜곡이 발생하지 않습니다.** +**Upscaler가 Latent 계열인 경우 동작하지 않습니다. (R-ESRGAN, 4x-UltraSharp 추천)** + +#### Method + +Resize 하는 방식을 지정할 수 있습니다. + +* Stretching : 단순히 이미지를 외곽부분을 늘려서 배경을 확장합니다. +* inpaint : Stretching된 이미지를 mask를 사용하여 늘린 부분만 img2img inpainting을 수행합니다. +* inpaint+lama : Controlnet의 inpaint+lama 모델을 사용하여 확장된 영역을 다시 그립니다. +* inpaint_only : Controlnet의 inpaint_only를 사용하여 확장된 영역을 다시 그립니다. + + +#### Alignment + +이미지를 확장하고 원래 이미지를 어느 방향으로 정렬할 것인지를 결정합니다. + + + +#### Resize filter + +Resize가 완료되고 난 이후에 외부 filter 코드를 호출하여 이미지 변환을 추가적으로 수행할 수 있다. + + +#### Resize by person intermediate + +인물의 크기 비율을 나타냅니다. 이 값을 초과하면 이 크기가 되도록 배경을 확장시킵니다. + + + + + + + + + + + + + + +
OriginalResize 0.7Resize 0.5
+ + + + + + + + + + + + + + + + + + +
OriginalAlignment center
Alignment bottomAlignment bottom-left
+ + +Resize sample + + + + + + + + + + + + + + +## Refiner + +txt2img에서 만들어진 이미지를 한번 더 그리는 과정을 수행한다. +txt2img + hires.fix 가 된 상황에서도 유효하다. + +refiner는 이미지가 생성되고 detailing 하기전에 동작하며, +sd-webui의 hires.fix + refiner를 합친 동작과 비슷하다. + + + + + + + + + + + + + + +
txt2img(512x768)txt2img + hires.fix(800x1200)txt2img + hires.fix + refiner(1200x1800)
+ + +(위 예제는 결과를 모두 resize하여 동일한 크기이다.) + +위 예제와 같이 3단계로 처리할 수도 있으나, +hires.fix 단계 없이 refiner로 resize하여 처리할 수도 있다. + + + +

+ +

+ +#### Enable refiner + +refiner 사용 여부를 체크합니다. + +#### CheckPoint + +refiner를 이용하여 다시 그릴때 사용할 checkpoint를 지정합니다. + +#### Use this checkpoint for detailing + +위에서 지정한 checkpoint를 이용하여 detailing에 적용합니다. + +#### Prompt + +refiner가 이미지를 다시 그릴때 사용하는 prompt를 지정합니다. +비어있다면 main prompt와 동일하고,채워져 있다면 main prompt를 무시합니다. +만약 #!org!# 문자열이 있다면 main prompt를 대체합니다. + +#### Negative prompt + +refiner가 이미지를 다시 그릴때 사용하는 negative prompt를 지정합니다. + +#### Sampling method + +refiner가 사용할 sampler를 지정할 수 있습니다. +(Euler A 권장) + +#### Upscaler + +refiner가 이미지를 resize하는 경우 사용할 upscaler를 지정합니다. + +#### Refiner sampling steps + +refiner가 사용할 samping steps를 지정합니다. +(권장 20) + +#### Refiner CFG scale + +refiner가 사용할 CFG scale 값을 지정합니다. +dynamic threshold는 지원하지 않습니다. + +#### Refiner denoising strength + +refiner가 사용할 denoising strength를 지정합니다. +(권장 0.4) + +#### Refiner scale + +refiner가 주어진 이미지를 scale 값으로 resize합니다. +만약 refiner width, refiner height가 설정되어있다면 무시됩니다. + +#### Refiner width + +이미지 폭을 해당 값으로 강제로 설정합니다. + +#### Refiner height + +이미지 높이를 해당 값으로 강제로 설정합니다. + +
+
+
diff --git a/3-bmab/docs/kr/api.md b/3-bmab/docs/kr/api.md new file mode 100644 index 0000000000000000000000000000000000000000..d9f9eed800647d302232fb59333ad6b1de09a09f --- /dev/null +++ b/3-bmab/docs/kr/api.md @@ -0,0 +1,234 @@ + + + +# API + +Stable diffusion webui의 API를 이용하여 이미지를 생성하는 경우 아래와 같이 BMAB를 사용하여 API Call을 할 수 있습니다. + + +```python +import requests +import json +import base64 + + +prompt = ''' +1girl +''' +negative_prompt = '(worst quality, low quality:1.4),' + +txt2img = { + 'prompt': prompt, + 'negative_prompt': negative_prompt, + 'steps': 20, + 'width': 512, + 'height': 768, + 'cfg_scale': 7, + 'seed': -1, + 'sampler_index': 'DPM++ SDE Karras', + 'script_name': None, + 'alwayson_scripts': { + 'BMAB': { + 'args': [ + { + 'enabled': True, + 'face_detailing_enabled': True, + } + ] + } + } +} + +response = requests.post('http://localhost:7860/sdapi/v1/txt2img', data=json.dumps(txt2img)) +print(response) +j = response.json() +b64_image = j['images'][0] + + +with open('test.png', 'wb') as image_file: + image_file.write(base64.b64decode(b64_image)) + +``` + +BAMB의 Argument는 저장된 설정 파일과 동일하며, +이것을 기반으로 모든 설정을 사용할 수 있습니다. 설정에 없는 경우 기본값을 사용합니다. + +아래는 json 형태의 기본 설정 값입니다. + +```json +{ + "enabled": false, + "preprocess_checkpoint": "Use same checkpoint", + "preprocess_vae": "Use same vae", + "txt2img_noise_multiplier": 1, + "txt2img_extra_noise_multiplier": 0, + "txt2img_filter_hresfix_before_upscale": "None", + "txt2img_filter_hresfix_after_upscale": "None", + "resample_enabled": false, + "module_config": { + "resample_opt": { + "save_image": false, + "hiresfix_enabled": false, + "checkpoint": "Use same checkpoint", + "vae": "Use same vae", + "method": "txt2img-1pass", + "filter": "None", + "prompt": "", + "negative_prompt": "", + "sampler": "Use same sampler", + "upscaler": "BMAB fast", + "steps": 20, + "cfg_scale": 7, + "denoising_strength": 0.75, + "strength": 0.5, + "begin": 0.1, + "end": 0.9 + }, + "pretraining_opt": { + "hiresfix_enabled": false, + "pretraining_model": "Select Model", + "prompt": "", + "negative_prompt": "", + "sampler": "Use same sampler", + "steps": 20, + "cfg_scale": 7, + "denoising_strength": 0.75, + "dilation": 4, + "box_threshold": 0.35 + }, + "resize_intermediate_opt": { + "resize_by_person": true, + "method": "stretching", + "alignment": "bottom", + "filter": "None", + "scale": 0.85, + "denoising_strength": 0.75 + }, + "refiner_opt": { + "checkpoint": "Use same checkpoint", + "keep_checkpoint": true, + "prompt": "", + "negative_prompt": "", + "sampler": "Use same sampler", + "upscaler": "BMAB fast", + "steps": 20, + "cfg_scale": 7, + "denoising_strength": 0.75, + "scale": 1, + "width": 0, + "height": 0 + }, + "person_detailing_opt": { + "best_quality": false, + "force_1:1": false, + "block_overscaled_image": true, + "auto_upscale": true, + "scale": 4, + "dilation": 3, + "area_ratio": 0.1, + "limit": 1, + "background_color": 1, + "background_blur": 0 + }, + "person_detailing": { + "denoising_strength": 0.4, + "cfg_scale": 7 + }, + "face_detailing_opt": { + "best_quality": false, + "sort_by": "Score", + "limit": 1, + "prompt0": "", + "negative_prompt0": "", + "prompt1": "", + "negative_prompt1": "", + "prompt2": "", + "negative_prompt2": "", + "prompt3": "", + "negative_prompt3": "", + "prompt4": "", + "negative_prompt4": "", + "override_parameter": false, + "sampler": "Use same sampler", + "detection_model": "BMAB Face(Normal)", + "dilation": 4, + "box_threshold": 0.35, + "skip_large_face": false, + "large_face_pixels": 0.26 + }, + "face_detailing": { + "width": 512, + "height": 512, + "cfg_scale": 7, + "steps": 20, + "mask_blur": 4, + "inpaint_full_res": "Only masked", + "inpaint_full_res_padding": 32, + "denoising_strength": 0.4 + }, + "hand_detailing_opt": { + "block_overscaled_image": true, + "best_quality": false, + "detailing_method": "subframe", + "auto_upscale": true, + "scale": 4, + "box_threshold": 0.3, + "dilation": 0.1, + "additional_parameter": "" + }, + "hand_detailing": { + "prompt": "", + "negative_prompt": "", + "denoising_strength": 0.4, + "cfg_scale": 7, + "inpaint_full_res": "Only masked", + "inpaint_full_res_padding": 32 + }, + "controlnet": { + "enabled": false, + "with_refiner": false, + "noise": false, + "noise_strength": 0.4, + "noise_begin": 0.1, + "noise_end": 0.9 + }, + "resize_by_person_opt": { + "mode": "Inpaint", + "scale": 0.85, + "denoising_strength": 0.6, + "dilation": 30 + } + }, + "pretraining_enabled": false, + "edge_flavor_enabled": false, + "edge_low_threadhold": 50, + "edge_high_threadhold": 200, + "edge_strength": 0.5, + "resize_intermediate_enabled": false, + "refiner_enabled": false, + "contrast": 1, + "brightness": 1, + "sharpeness": 1, + "color_saturation": 1, + "color_temperature": 0, + "noise_alpha": 0, + "noise_alpha_final": 0, + "input_image": null, + "blend_enabled": false, + "blend_alpha": 1, + "detect_enabled": false, + "masking_prompt": "", + "person_detailing_enabled": false, + "face_detailing_enabled": false, + "face_detailing_before_hiresfix_enabled": false, + "hand_detailing_enabled": false, + "resize_by_person_enabled": false, + "upscale_enabled": false, + "detailing_after_upscale": true, + "upscaler_name": "None", + "upscale_ratio": 1.5, + "config_file": "test", + "preset": "None" +} +``` + diff --git a/3-bmab/docs/kr/bmab.md b/3-bmab/docs/kr/bmab.md new file mode 100644 index 0000000000000000000000000000000000000000..c456a23acf9288aba487b7a76ac3b5c4d0f2f36c --- /dev/null +++ b/3-bmab/docs/kr/bmab.md @@ -0,0 +1,319 @@ + +# BMAB + +## 기본 기능 + +* Contrast : 대비값 조절 (1이면 변경 없음) +* Brightness : 밝기값 조절 (1이면 변경 없음) +* Sharpeness : 날카롭게 처리하는 값 조절 (1이면 변경 없음) +* Color Temperature : 색온도 조절, 6500K이 0 (0이면 변경 없음) +* Noise alpha : 프로세스 전에 노이즈를 추가하여 디테일을 올릴 수 있습니다. (권장값:0.1) +* Noise alpha at final stage : 최종 단계에서 노이즈를 추가하여 분위기를 다르게 전달할 수 있습니다. + + +## Imaging + +### Blend Image in Img2Img + +이미지 업로드 상자에 입력한 이미지와 Img2Img에 입력된 이미지를 Blending합니다. +Blend Alpha 값으로 두 개의 이미지를 합성합니다. +"Process before Img2Img" 옵션이 적용됩니다. + +### Dino detect + +Img2Img Inpainting 하는 경우에 마스크를 입력하지 않아도 Dino detect prompt에 있는 내용을 이용하여 자동으로 마스크를 생성합니다. +이미지를 업로드 하게되면 업로드된 이미지를 배경으로 하여 prompt로 입력된 부분을 업로드 이미지에 합성합니다. + +#### Img2Img 에서 사용하는 경우 + +

+ + +

+

+ + +

+ + + +첫번째 image는 Img2Img 이미지로 지정 +두번째 image는 BMAB의 Imaging에 Image 입력창에 지정 + +프로세스 과정에서 세번째 image를 합성하고 프롬프트에 따라서 결과가 얻어진다. + +Enabled : CHECK!! + +Contrast : 1.2 +Brightness : 0.9 +Sharpeness : 1.5 + +Enable dino detect : CHECK!! +DINO detect Prompt : 1girl + + +#### Img2Img Inpaint 에서 사용하는 경우 + +DINO detect Prompt에 있는 내용대로 자동으로 마스크를 만들어준다. + +

+ + + +

+ + +이번 예제에서는 배경을 변경했으니, inpaint 설정에서 "Inpaint Not Masked"를 선택해야 한다. +반대로 "Inpaint Masked"를 하면 인물이 변경된다. + + +## Person + +이 기능을 사용하게 되면 프로세스가 완료된 이후에, 인물을 감지하여 다시 그립니다. +아래의 경우에 사용하면 효과적입니다. + +* 인물이 배경에 비해 매우 작은 경우, 의복, 얼굴 등 인물 전체의 디테일이 올라갑니다. +* 4K와 같이 큰 이미지를 출력하는 경우, 업 스케일 이후에 인물이 작은 경우 이 기능을 사용하면 인물이 뚜렷해 집니다. +* Face Detailing과 같이 사용하면 좋은 효과를 볼 수 있습니다. + + + + + +#### Enable person detailing for landscape (EXPERIMENTAL) + +풍경에서 인물을 자세하게 다시 그리는 기능을 활성화 합니다. + +#### Block over-scaled image + +이 기능이 켜지게 되면 인물을 찾아내서 크게 키워서 다시 그리는데 이때 확대된 이미지의 면적이 본래 이미지를 초과하게 되면 프로세스를 멈춥니다. +sd-webui가 멈추거나 GPU를 보호하기 위한 목적입니다. + +#### Auto scale if "Block over-scaled image" enabled + +이 기능을 설정하면 위에서 언급한 "Block over-scaled image"로 차단될 경우 본래 이미지의 면적에 맞춰서 스케일을 조정하여 작업합니다. + +#### Upscale Ratio + +인물이 발견되면 주어진 비율로 키워서 자세하게 그립니다. + +#### Denoising Strength + +인물의 크기가 클 경우 0.4로 부족할 수 있습니다. 이런 경우 수치를 올려주세요. + +#### Dilation mask + +찾아낸 인물의 마스크를 확장합니다. + +#### CFG Scale + +인물을 다시 그릴때 사용하는 CFG scale 값입니다. + +#### Large person area limit + +인물이 이미지 속에서 차지하는 면적이 이 값을 초과하면 작업하지 않습니다. +인물이 충분히 큰 경우 다시 그릴 필요가 없기 때문입니다. + +#### Limit + +이미지 속에 인물이 너무 많은 경우 면적단위로 큰 것부터 카운트하여 설정값을 초과하여 다시 그리지 않습니다. + + + + + + +## Face + +### Face Detailing + +이 기능을 사용하게 되면 프로세스가 완료된 이후 After Detailer(AD)나 Detection Detailer(DD)와 같이 +얼굴을 보정합니다. +이 기능을 동작시킨 후에 AD, DD가 동작하도록 설정한다면, 결과가 좋지 않을 수 있습니다. + + + +최대 5개의 캐릭터에 대해 prompt를 별도로 지정할 수 있습니다. + +#### Enable face detailing + +face detailing 기능을 켜고 끌 수 있습니다. + +#### Enable face detailing before hires.fix (EXPERIMENTAL) + +face detailing 기능을 txt2img 과정의 hires.fix 직전에 한 번 더 수행합니다. +얼굴을 보정한 이후에 upscale을 하기 때문에 더 좋은 품질의 이미지를 얻을 수 있습니다. +하지만 부하가 더 들어가고, 이미지 변화가 심합니다. + +#### Face detailing sort by + +이미지 안에 여러 인물이 있는 경우 어떤 순서로 Detailing 할 것인지 결정합니다. + + + + +왼쪽, 오른쪽 혹은 크기로 가능하며 없다면 기본적으로 Score 값이 높은 순서로 합니다. + +#### Limit + +이미지 않에 여러 인물이 있는 경우 위에서 정한 순서로 얼마나 수행할지 결정합니다. +Limit이 1이라면 최대 1개만 수행한다는 뜻입니다. + +#### Override Parameters + +* Denoising Strength +* CFG Scale +* Width +* Height +* Steps +* Mask Blur + +위 값에 대해 기본값이 아닌 UI에서 지정한 값을 사용합니다. + +#### Inpaint Area + +전체를 다시 그릴지 얼굴만 다시 그릴지를 결정합니다. 전체를 다시 그리는 것은 별로 추천하지 않습니다. + +#### Only masked padding, pixels + +기본값을 사용해 주세요. + +#### Dilation + +검출된 얼굴의 마스크 크기를 키웁니다. + +#### Box threshold + +Detector의 검출 값을 결정합니다. 기본값 0.35보다 작으면 face가 아닐 것으로 제외합니다. +YOLO를 사용하는 경우 confidence를 대체합니다. + +**좋은 결과를 얻기 위한 조언** + +* Prompt에 얼굴 관련된 lora, textual inversion등 관련 내용을 뺍니다. sunglass 등은 무관합니다. +* 설정 파일에 얼굴마다 서로 다른 lora, textual inversion 등을 넣습니다. +* prompt에 lora, TI가 많을 경우 그림 생성 자유도가 떨어지는 것 같습니다. +* 그림속 모든 캐릭터가 공유되는 lora는 넣어주셔도 무방합니다. + + + +## Hand + +### Hand Detailing (EXPERIMENTAL) + +손 표현이 잘못된 부분을 수정하는 기능입니다. +만들어진 그림에서 손 부분을 자동으로 찾아내어 해당 부분을 다시 그리는 기능입니다. +다만 손의 경우 다시 그려도 잘 그려질지 확실하지 않으며, 손을 자세하게 그리는 정도입니다. + + + +#### Enable hand detailing + +손 보정 기능을 사용하도록 활성화 합니다. + +#### Block over-scaled image + +이 기능은 손을 찾아내어 확대해서 다시그리는 방법을 사용합니다. +다시 그려야 하는 부분의 면적이 원래이미지를 초과하게 되면 작업을 수행하지 않습니다. +이런 경우에는 Upscale Ratio를 줄이거나, 이 기능을 꺼야하는데, 이 기능을 끄면 매우 큰 그림을 다시 그릴 수도 있어서 GPU에 부하가 걸릴 수 있습니다.. + +#### Method +* subframe : 손을 포함하여 얼굴/머리 부분까지 찾아내어 상반신을 다시 그린다. +* each hand : 손을 찾아내여 3배 크기의 주변부 까지 다시 그려 손만 적용한다. +* each hand inpaint : 손을 찾아내어 3재 크기의 주변부를 기반으로 손만 다시 그린다. + 매우 극단적으로 변형될 수 있어서 잘 그려지기 어렵다 모양이 갖춰진다면, subframe으로 다시 그리는 것을 추천한다. +* at once : 찾아낸 손을 모두 한번에 다시 그린다. + + +#### Prompt + +Subframe에서는 입력하지 않을 것을 권장합니다. +each hand, each hand inpaint시에 손 관련 프롬프트를 입력합니다. + +#### Negative Prompt + +Subframe에서는 입력하지 않을 것을 권장합니다. +each hand, each hand inpaint시에 손 관련 네거티브 프롬프트를 입력합니다. + +#### Denoising Strength + +다시 그리는 경우 Denoising Strength 값 입니다. +* subframe : 0.4 권장 +* 기타 0.55 이상 권장 + +#### CFG Scale + +다시 그리는 경우 CFG Scale 값 입니다. + +#### Upscale Ratio +상반신 / 손 주변을 찾아내어 얼마나 크게 확대하여 다시 그릴 것인지 지정한다. +무조건 크게 그린다고 성공확률이 올라가는 것은 아니다. +* subframe : 2.0 +* 기타 : 2.0~4.0 + +#### Box Threshold + +손을 찾아내지 못하는 경우 이 값을 낮추면, 찾아낼 수 있는 확률이 올라갑니다. +하지만 잘 못 찾아낼 가능성도 올라갑니다. + +#### Box Dilation + +찾아낸 박스(손을 포함하여)의 외곽 부분을 얼마나 크게 할 것이 결정합니다. (only for subframe) + +#### Inpaint Area + +찾아낸 박스 전체를 다시 그릴 것인지, 손만 다시 그릴 것인지를 결정한다. +손만 다시그리는 경우 손 모양이 원하지 않게 바뀔 수 있으나 크게 변경된다. + +#### Only masked padding + +찾아낸 손의 내부 공간을 얼마 정도로 채울지를 결정합니다. 딱히 변경할 일 없습니다. + +#### Additional Parameter + +현재는 제공하지 않지만 향후 고급 사용자를 위한 옵션을 제공할 예정입니다. + + + +## ControlNet + +ControlNet을 이용하여 이미지에 노이즈를 추가하는 방법으로 디테일을 올리는 기능입니다. +ControlNet의 Lineart 모델에 가우시안 노이즈 이미지를 입력으로 사용하여, +결과물에 다양하고 복잡한 디테일을 추가합니다. + +#### Noise Strength + +노이즈 강도를 지정합니다. (0.4 권장) + +#### Begin + +Sampling 단계 시작점 + +#### End + +Sampling 단계 끝점 + +보통의 경우 0.4, 0, 0.4를 권장합니다. 혹은 이미지가 과도하게 그려질 경우 0.2, 0, 0.4 정도로 추천합니다. +과도하게 이미지가 그려진 경우 refiner를 사용하면 이미지를 어느 정도 안정시킬 수 있습니다. + +아래는 모두 같은 seed입니다. + + + + + + + + + + + +
기본이미지0.40.7
+ + + + + + +
+
+
diff --git a/3-bmab/docs/kr/manual.md b/3-bmab/docs/kr/manual.md new file mode 100644 index 0000000000000000000000000000000000000000..744aec132e00dc9cb7acd0293ba2e921feaf294e --- /dev/null +++ b/3-bmab/docs/kr/manual.md @@ -0,0 +1,65 @@ + +## Quick Test + +Enable을 체크하고 Config Tab에서 Preset "example"을 선택합니다. + +contrast: 1.2 +brightness: 0.9 +sharpeness: 1.5 + +Edge enhancement 적용 +Face Detailing 적용 +Resize by person 적용 + + + +## 기본 옵션 + +Enabled (VERSION): 기능을 켜고 끌 수 있습니다. + +### Resize and fill override + +Img2Img를 수행하는 경우 "Resize and fill" 을 선택하게 되면 +통상 좌우, 상하로 늘어나거나 비율이 같다면 그대로 크기만 변경됩니다. + +Enabled 된 상태에서는 항상 이미지가 아래에 위치하고, +왼쪽, 오른쪽, 윗쪽으로 비율에 맞게 늘어납니다. + +인물의 윗쪽으로 여백이 없는 경우에 적용하면 효과적입니다. +너무 크게 늘리게 되면 좋은 결과를 얻기 힘듭니다. +대략 1.1, 1.2 정도 스케일에서 사용하시길 권장합니다. + +

+ + +

+ +
+
+
+ +# Preprocess + +본 이미지 변경을 하기 전에 사전 처리 과정을 수행합니다. +조건에 따라 hires.fix 과정에 개입할 수도 있습니다. + +Preprocess + +# BMAB + +Person, Hand, Face detailer를 수행하거나, 이미지 합성 혹은 노이즈 추가등의 기능을 수행합니다. + +bmab + +# Postprocess + +이미지 처리가 완료된 이후, 인물의 크기에 따라 배경을 확장하거나 upscale을 할 수 있습니다. + +Postprocess + + +# API + +stable diffusion webui의 API 기능을 호출할때 BMAB extension을 사용할 수 있습니다. + +API Guide diff --git a/3-bmab/docs/kr/postprocess.md b/3-bmab/docs/kr/postprocess.md new file mode 100644 index 0000000000000000000000000000000000000000..2fc66330d0a198fb6b0640fcfa95091748bbf898 --- /dev/null +++ b/3-bmab/docs/kr/postprocess.md @@ -0,0 +1,66 @@ + + +# PostProcessing + +## Resize + +### Resize by person + +그림 속 인물중 가장 신장이 큰 사람의 길이와 그림 높이의 비율이 설정값을 넘어가면 비율을 설정값로 맞추는 기능입니다. +설정값이 0.90이고 인물의 전체 길이: 그림 높이의 비율이 0.95라고 한다면 +배경을 늘려서 인물의 비율이 0.90이 되도록 합니다. +배경은 왼쪽, 오른쪽, 위쪽으로 늘어납니다. + + +이 기능은 2가지 방법을 제공하는데 다음과 같습니다. + +#### Inpaint + +Face Detailing과 같은 방법으로 이미지가 완전히 생성되고 난 후에 주변부를 확장합니다. +이때 이미 생성된 이미지를 훼손하지 않고 주변부만 확장하기 때문에 직관적으로 확인이 가능합니다. +가장 빠르고 효과적으로 추천합니다. + +#### Inpaint + lama + +Inpaint와 같은 방법인데 BMAB에서 ControlNet을 불러서 Inpaint+lama를 이용해서 동작합니다. +이미지가 생성되고나서 디테일링 시작하기 전에 img2img를 이용하여 배경을 확장하여 전체적으로 인물을 작게 만드는 효과가 있습니다. + + + + + + + + + + + + + + +
+ +이 두가지 방법은 생성된 이미지를 축소하기만 할뿐 훼손하지 않습니다. +이것이 Resize intermediate와 다른점입니다. + + +## Upscaler + +최종적으로 이미지가 완성되고 난 이후에 이미지를 upscaler를 이용하여 크게 만듭니다. + + +#### Enable upscale at final stage + +이미지 생성이 완료되고 난 이후에 Upscale을 수행합니다. +960x540으로 생성하고 hires.fix를 x2로 하면 1920x1080 이미지가 나오는데 +여기서 Upscale을 x2를 하면 4K 이미지가 나오게 됩니다. + +#### Detailing after upscale + +이 옵션을 설정하면 위에서 언급한 Person, Face, Hand 에 대한 detailing을 upscale 이후에 수행합니다. + +#### Upscale Ratio + +이미지를 얼마나 upscale할지 결정합니다. + + diff --git a/3-bmab/docs/kr/preprocess.md b/3-bmab/docs/kr/preprocess.md new file mode 100644 index 0000000000000000000000000000000000000000..598d6670bd472d1a871ad0c69b7f975b7d17c4d2 --- /dev/null +++ b/3-bmab/docs/kr/preprocess.md @@ -0,0 +1,425 @@ + +# Preprocess + +## Context + +BMAB에서 사용할 Checkpoint와 VAE를 지정합니다. +특정 기능들은 자체 Checkpoint와 VAE를 설정할 수 있습니다. +한 번 변경된 Checkpoint는 그 이후 프로세스들이 계속 사용합니다. + + + +#### txt2img noise multiplier for hires.fix + +hires.fix 단계에서 noise를 추가 할 수 있다. + +#### txt2img extra noise multiplier for hires.fix (EXPERIMENTAL) + +hires.fix 단계에서 추가적인 noise를 더 할 수 있다. + +#### Hires.fix filter before upscaler + +Hires.fix 단계 중 upscaler 전에 filter를 적용할 수 있다. + +#### Hires.fix filter after upscaler + +Hires.fix 단계 중 upscaler 후에 filter를 적용할 수 있다. + + +## Resample (EXPERIMENTAL) + +Self resampling 기능입니다. txt2img -> hres.fix를 통해 생성된 이미지를 다시 txt2img -> hires.fix 과정을 수행하면서 +ControlNet Tile Resample을 수행합니다. 아래와 같은 경우 사용할 수 있습니다. + +* 두 모델간에 결과물 차이가 큰 경우 +* 두 모델간에 인물 비율이 차이나는 경우 +* 두 모델간 버전이 다른 경우 (SDXL, SD15) + + + + + + + + + + +
txt2img->hires.fixResample + BMAB Basic
+ + +BMAB resample image by [padapari](https://www.instagram.com/_padapari_/) + +
+
+
+
+ + + + +#### Enable self resample (EXPERIMENTAL) + +이 기능을 켜고 끌 수 있습니다. + +#### Save image before processing + +최초 txt2img -> hires.fix를 통해 생성된 이미지가 후 처리를 위해 BMAB로 입력되면, +해당 이미지를 프로세싱하기 전에 저장합니다. 이미지 postfix로 "-before-resample"이 붙습니다. + +#### Checkpoint + +SD Checkpoint를 지정할 수 있습니다. 지정하지 않는다면 앞에서 설정된 Checkpoint를 사용합니다. +프로세스가 완료되어도 원래 것으로 돌려놓지 않습니다. + +#### SD VAE + +SD VAE를 지정할 수 있습니다. 지정하지 않는다면 앞에서 설정된 VAE를 사용합니다. +프로세스가 완료되어도 원래 것으로 돌려놓지 않습니다. + +#### Resample method + +Resample 방법을 선택할 수 있습니다. + +txt2img-1pass : txt2img을 hires.fix 없이 동작시킨다. +txt2img-2pass : txt2img를 hires.fix로 동작시킨다. 기본적으로 이미지를 출력할 때 hires.fix가 동작해야하만 한다. +img2img-1pass : img2img로 동작시킨다. + +#### Resample filter + +Resample이 완료되고 난 이후에 외부 filter 코드를 호출하여 이미지 변환을 추가적으로 수행할 수 있다. + + +#### Resample prompt + +resampling 과정에서 사용할 prompt입니다. 비어있는 경우 main prompt와 동일하며, +"#!org!#" 를 입력하면 main prompt를 대체합니다. "#!org!#" 이후에 추가로 prompt를 적을 수 있습니다. +ex) #!org!#, soft light, some more keyword + +#### Resample negative prompt + +resampling 과정에서 사용할 prompt입니다. 비어있는 경우 main negative prompt와 동일합니다. + +#### Sampling method + +프로세스에 사용할 sampling method를 지정합니다. 지정하지 않는다면 이전 프로세스와 같은 sampler를 지정합니다. + +#### Upsacler + +hires.fix를 사용하는 경우에 지정하는 upscaler입니다. + +#### Resample sampling steps + +resample process 사용할 samping steps를 지정합니다. +(권장 20) + +#### Resample CFG scale + +resample process 사용할 CFG scale 값을 지정합니다. +dynamic threshold는 지원하지 않습니다. + +#### Resample denoising strength + +resample process가 사용할 denoising strength를 지정합니다. +(권장 0.4) + +#### Resample strength + +0에 가까운 값은 입력 이미지와 멀어지고, 1에 가까울 수록 원본 이미지와 유사합니다. + +#### Resample begin + +sampling 단계에 적용 시작점. + +#### Resample end + +sampling 단계 적용 종료 시점. + + + + + + + + +## Pretraining (EXPERIMENTAL) + +Pretraining detailer입니다. ultralytics로 pretraining 모델을 적용하여 detection을 수행하고 +이를 기반으로 prompt, negative prompt를 적용하여 부분적으로 이미지를 더 자세하게 그릴 수 있습니다. + + + +#### Enable pretraining detailer (EXPERIMENTAL) + +이 기능을 켜고 끌 수 있습니다. + +#### Enable pretraining before hires.fix + +pretraining detailer를 hires.fix 전에 수행하도록 한다. + +#### Pretraining model + +ultralytics 로 학습된 detection model (*.pt)를 지정할 수 있습니다. +stable-diffusion-webui/models/BMAB에 해당 파일이 있어야 목록에 나타납니다. + + +#### Pretraining prompt + +pretraining detailer process 과정에서 사용할 prompt입니다. 비어있는 경우 main prompt와 동일하며, +"#!org!#" 를 입력하면 main prompt를 대체합니다. "#!org!#" 이후에 추가로 prompt를 적을 수 있습니다. +ex) #!org!#, soft light, some more keyword + +#### Pretraining negative prompt + +pretraining detailer process 과정에서 사용할 prompt입니다. 비어있는 경우 main negative prompt와 동일합니다. + +#### Sampling method + +프로세스에 사용할 sampling method를 지정합니다. 지정하지 않는다면 이전 프로세스와 같은 sampler를 지정합니다. + + +#### Pretraining sampling steps + +resample process 사용할 samping steps를 지정합니다. +(권장 20) + +#### Pretraining CFG scale + +resample process 사용할 CFG scale 값을 지정합니다. +dynamic threshold는 지원하지 않습니다. + +#### Pretraining denoising strength + +resample process가 사용할 denoising strength를 지정합니다. +(권장 0.4) + +#### Pretraining dilation + +detection 된 사각형의 범위를 주어진 값 만큼 크기를 크게 합니다. + +#### Pretraining box threshold + +Detector의 검출 값을 결정합니다. 기본값 0.35보다 작으면 face가 아닐 것으로 제외합니다. +ultralytics predict의 confidence 값입니다. + + + +## Edge enhancemant + +이미지 경계를 강화해 선명도를 증가시키거나 디테일을 증가시키는 기능입니다. + +**Upscaler가 Latent 계열인 경우 동작하지 않습니다. (R-ESRGAN, 4x-UltraSharp 추천)** + + + +권장설정 + +* Edge low threshold : 50 +* Edge high threshold : 200 +* Edge strength : 0.5 + +

+ + +

+ +Enabled : CHECK!! + +Contrast : 1.2 +Brightness : 0.9 +Sharpeness : 1.5 + +Enable edge enhancement : CHECK!! +Edge low threshold : 50 +Edge high threshold : 200 +Edge strength : 0.5 + + + + +## Resize + +txt2img -> hires.fix 의 중간 과정에서 동작합니다.. +만약 img2img에서 사용한다면, 프로세스 시작 전에 동작합니다. + +그림 속 인물중 가장 신장이 큰 사람의 길이와 그림 높이의 비율이 설정값을 넘어가면 비율을 설정값로 맞추는 기능입니다. +설정값이 0.90이고 인물의 전체 길이: 그림 높이의 비율이 0.95라고 한다면 +배경을 늘려서 인물의 비율이 0.90이 되도록 합니다. +배경은 Alignment에서 지정한 방식에 따라 늘어납니다. + +txt2img 수행하는 단계에서 hires.fix 하기 직전에 이미지를 변경합니다. +이 과정은 변경된 이미지가 hires.fix 과정에서 매끄럽게 변하게 하기 위한 것입니다. +**denoising strength는 0.6~0.7 정도를 사용하셔야 주변부 이미지 왜곡이 발생하지 않습니다.** +**Upscaler가 Latent 계열인 경우 동작하지 않습니다. (R-ESRGAN, 4x-UltraSharp 추천)** + +#### Method + +Resize 하는 방식을 지정할 수 있습니다. + +* Stretching : 단순히 이미지를 외곽부분을 늘려서 배경을 확장합니다. +* inpaint : Stretching된 이미지를 mask를 사용하여 늘린 부분만 img2img inpainting을 수행합니다. +* inpaint+lama : Controlnet의 inpaint+lama 모델을 사용하여 확장된 영역을 다시 그립니다. +* inpaint_only : Controlnet의 inpaint_only를 사용하여 확장된 영역을 다시 그립니다. + + +#### Alignment + +이미지를 확장하고 원래 이미지를 어느 방향으로 정렬할 것인지를 결정합니다. + + + +#### Resize filter + +Resize가 완료되고 난 이후에 외부 filter 코드를 호출하여 이미지 변환을 추가적으로 수행할 수 있다. + + +#### Resize by person intermediate + +인물의 크기 비율을 나타냅니다. 이 값을 초과하면 이 크기가 되도록 배경을 확장시킵니다. + + + + + + + + + + + + + + +
OriginalResize 0.7Resize 0.5
+ + + + + + + + + + + + + + + + + + +
OriginalAlignment center
Alignment bottomAlignment bottom-left
+ + +Resize sample + + + + + + + + + + + + + + +## Refiner + +txt2img에서 만들어진 이미지를 한번 더 그리는 과정을 수행한다. +txt2img + hires.fix 가 된 상황에서도 유효하다. + +refiner는 이미지가 생성되고 detailing 하기전에 동작하며, +sd-webui의 hires.fix + refiner를 합친 동작과 비슷하다. + + + + + + + + + + + + + + +
txt2img(512x768)txt2img + hires.fix(800x1200)txt2img + hires.fix + refiner(1200x1800)
+ + +(위 예제는 결과를 모두 resize하여 동일한 크기이다.) + +위 예제와 같이 3단계로 처리할 수도 있으나, +hires.fix 단계 없이 refiner로 resize하여 처리할 수도 있다. + + + +

+ +

+ +#### Enable refiner + +refiner 사용 여부를 체크합니다. + +#### CheckPoint + +refiner를 이용하여 다시 그릴때 사용할 checkpoint를 지정합니다. + +#### Use this checkpoint for detailing + +위에서 지정한 checkpoint를 이용하여 detailing에 적용합니다. + +#### Prompt + +refiner가 이미지를 다시 그릴때 사용하는 prompt를 지정합니다. +비어있다면 main prompt와 동일하고,채워져 있다면 main prompt를 무시합니다. +만약 #!org!# 문자열이 있다면 main prompt를 대체합니다. + +#### Negative prompt + +refiner가 이미지를 다시 그릴때 사용하는 negative prompt를 지정합니다. + +#### Sampling method + +refiner가 사용할 sampler를 지정할 수 있습니다. +(Euler A 권장) + +#### Upscaler + +refiner가 이미지를 resize하는 경우 사용할 upscaler를 지정합니다. + +#### Refiner sampling steps + +refiner가 사용할 samping steps를 지정합니다. +(권장 20) + +#### Refiner CFG scale + +refiner가 사용할 CFG scale 값을 지정합니다. +dynamic threshold는 지원하지 않습니다. + +#### Refiner denoising strength + +refiner가 사용할 denoising strength를 지정합니다. +(권장 0.4) + +#### Refiner scale + +refiner가 주어진 이미지를 scale 값으로 resize합니다. +만약 refiner width, refiner height가 설정되어있다면 무시됩니다. + +#### Refiner width + +이미지 폭을 해당 값으로 강제로 설정합니다. + +#### Refiner height + +이미지 높이를 해당 값으로 강제로 설정합니다. + +
+
+
diff --git a/3-bmab/docs/masking.md b/3-bmab/docs/masking.md new file mode 100644 index 0000000000000000000000000000000000000000..fc6dfd392a1894f9808baf3e43b26682410ec06b --- /dev/null +++ b/3-bmab/docs/masking.md @@ -0,0 +1,31 @@ + +# Auto Masking + +## Detect + +* Img2Img 인물 사진을 추가한다. +* Just resize 선택 +* Resize를 하면서 크기를 키워야 좋은 결과를 얻을 수 있다. +예제의 경우는 512x768 --> 800x1200 으로 resize한 것이다. +* Denoising Strength는 0.4~0.6 정도를 설정한다. +모델별로 다르지만, 배경까지 심하게 바뀌는 경우 숫자를 줄인다. + +

+ +

+ +* BMAB를 Enable 한다. +* 반드시 Process before img2img를 체크한다. +* Detect enabled 체크하고 prompt에 person, 1girl, human...뭐든.. + +

+ +

+ +* 최종적으로 좋은 결과를 내기 위해서 합쳐진 이미지를 프롬프트로 잘 표현해야 한다. +* 프롬프트가 없거나 적당히 적으면 원하는 이미지에서 멀어지기 때문에 프롬프트가 매우 중요하다. + +

+ +

+ diff --git a/3-bmab/filter/Put filter file here.txt b/3-bmab/filter/Put filter file here.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/3-bmab/models/Put model file here.txt b/3-bmab/models/Put model file here.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/3-bmab/requirements.txt b/3-bmab/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..c9d018e4b32a022d270bae7644dc72994338ca54 --- /dev/null +++ b/3-bmab/requirements.txt @@ -0,0 +1,9 @@ +segment_anything +segment_anything_hq +ultralytics +pillow + +basicsr==1.4.2 +kornia +omegaconf +numpy diff --git a/3-bmab/resources/preset/3girls.json b/3-bmab/resources/preset/3girls.json new file mode 100644 index 0000000000000000000000000000000000000000..2a34de9568123a619e64a89618095e82bb06ec9f --- /dev/null +++ b/3-bmab/resources/preset/3girls.json @@ -0,0 +1,46 @@ +{ + "enabled": true, + "contrast": 1.2, + "brightness": 0.9, + "sharpeness": 1.5, + "execute_before_img2img": true, + "edge_flavor_enabled": true, + "edge_low_threadhold": 50, + "edge_high_threadhold": 200, + "edge_strength": 0.5, + "resize_by_person_enabled": true, + "resize_by_person": 0.85, + "face_detailing_enabled": true, + "module_config": { + "multiple_face": [ + { + "denoising_strength": 0.40, + "prompt": "smile, #!org!#", + "inpaint_full_res": true, + "inpaint_full_res_padding": 32, + "cfg_scale": 7 + }, + { + "denoising_strength": 0.40, + "prompt": "sad, #!org!#", + "inpaint_full_res": true, + "inpaint_full_res_padding": 32, + "cfg_scale": 7 + }, + { + "denoising_strength": 0.40, + "prompt": "sad, #!org!#", + "width": 512, + "height": 512, + "inpaint_full_res": true, + "inpaint_full_res_padding": 32, + "cfg_scale": 7 + } + ], + "multiple_face_opt": { + "mask dilation": 4, + "limit": -1, + "order": "left" + } + } +} diff --git a/3-bmab/resources/preset/Put config file here.txt b/3-bmab/resources/preset/Put config file here.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/3-bmab/resources/preset/example.json b/3-bmab/resources/preset/example.json new file mode 100644 index 0000000000000000000000000000000000000000..a7866abeeb321a4cb98ed94c4c591ce5786f558a --- /dev/null +++ b/3-bmab/resources/preset/example.json @@ -0,0 +1,25 @@ +{ + "enabled": true, + "contrast": 1.2, + "brightness": 0.9, + "sharpeness": 1.5, + "edge_flavor_enabled": true, + "edge_low_threadhold": 50, + "edge_high_threadhold": 200, + "edge_strength": 0.5, + "resize_by_person_enabled": true, + "resize_by_person": 0.85, + "face_detailing_enabled": true, + "module_config": { + "face_detailing": { + "denoising_strength": 0.40, + "prompt": "smile, #!org!#", + "inpaint_full_res": true, + "inpaint_full_res_padding": 32, + "cfg_scale": 7 + }, + "face_detailing_opt": { + "mask dilation": 4 + } + } +} diff --git a/3-bmab/resources/preset/example2.json b/3-bmab/resources/preset/example2.json new file mode 100644 index 0000000000000000000000000000000000000000..b9369d02aa10b235e9ffcd60d74b8f19c0e25575 --- /dev/null +++ b/3-bmab/resources/preset/example2.json @@ -0,0 +1,27 @@ +{ + "enabled": true, + "contrast": 1.2, + "brightness": 0.9, + "sharpeness": 1.5, + "edge_flavor_enabled": true, + "edge_low_threadhold": 50, + "edge_high_threadhold": 200, + "edge_strength": 0.5, + "resize_by_person_enabled": true, + "resize_by_person": 0.85, + "face_detailing_enabled": true, + "module_config": { + "face_detailing": { + "denoising_strength": 0.40, + "prompt": ", (ulzzang-6500:0.4), #!org!#", + "width": 512, + "height": 512, + "inpaint_full_res": true, + "inpaint_full_res_padding": 32, + "cfg_scale": 7 + }, + "face_detailing_opt": { + "mask dilation": 4 + } + } +} diff --git a/3-bmab/resources/preset/hand.json b/3-bmab/resources/preset/hand.json new file mode 100644 index 0000000000000000000000000000000000000000..062fdd139e105101ca90b110e08d907036d2b67e --- /dev/null +++ b/3-bmab/resources/preset/hand.json @@ -0,0 +1,18 @@ +{ + "enabled": true, + "hand_detailing_enabled": true, + "module_config": { + "hand_detailing": { + "denoising_strength": 0.4, + "steps": 20, + "cfg_scale": 7, + "inpaint_full_res": 0, + "inpaint_full_res_padding": 32 + }, + "hand_detailing_opt": { + "scale": 2, + "mode": "inpaint", + "detailing method": "subframe" + } + } +} diff --git a/3-bmab/resources/preset/hand2.json b/3-bmab/resources/preset/hand2.json new file mode 100644 index 0000000000000000000000000000000000000000..47faa563408ff2d4eca56e22a40669c64f741434 --- /dev/null +++ b/3-bmab/resources/preset/hand2.json @@ -0,0 +1,20 @@ +{ + "enabled": true, + "hand_detailing_enabled": true, + "module_config": { + "hand_detailing": { + "denoising_strength": 0.5, + "prompt": "(good anatomy:1.2), (five fingers:1.3), pretty hands, detail hands, detail fingers, detail nails", + "negative_prompt": "(bad anatomy:1.2), (wrong anatomy:1.2), mutation, amputation, extra fingers, missing fingers, disconnected fingers", + "steps": 20, + "cfg_scale": 7, + "inpaint_full_res": 0, + "inpaint_full_res_padding": 32 + }, + "hand_detailing_opt": { + "scale": 4, + "mode": "inpaint", + "detailing method": "each hand" + } + } +} diff --git a/3-bmab/scripts/__pycache__/sd_webui_bmab.cpython-310.pyc b/3-bmab/scripts/__pycache__/sd_webui_bmab.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..53889c66eaeed4661aea1d4062fb4896a6bea50a Binary files /dev/null and b/3-bmab/scripts/__pycache__/sd_webui_bmab.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dea9ccd11d1166c93e6699f445ae63880f9a5871 Binary files /dev/null and b/3-bmab/sd_bmab/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/__pycache__/bmab.cpython-310.pyc b/3-bmab/sd_bmab/__pycache__/bmab.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5b3b00521ddc0e9ad4318e82a19b1060ce6f4d4c Binary files /dev/null and b/3-bmab/sd_bmab/__pycache__/bmab.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/__pycache__/compat.cpython-310.pyc b/3-bmab/sd_bmab/__pycache__/compat.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..46966f878fac3dfa212fabea62e42e93bf71d4ac Binary files /dev/null and b/3-bmab/sd_bmab/__pycache__/compat.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/__pycache__/constants.cpython-310.pyc b/3-bmab/sd_bmab/__pycache__/constants.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1f6dead94e0f6f7c257b6a9b1e13de10050a23c3 Binary files /dev/null and b/3-bmab/sd_bmab/__pycache__/constants.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/__pycache__/controlnet.cpython-310.pyc b/3-bmab/sd_bmab/__pycache__/controlnet.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bc2980d178a5cca1d92e0f8be8c1839259a62fa9 Binary files /dev/null and b/3-bmab/sd_bmab/__pycache__/controlnet.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/__pycache__/parameters.cpython-310.pyc b/3-bmab/sd_bmab/__pycache__/parameters.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c08cc7c88284409ccf858c3ad038ad8b4f7a743b Binary files /dev/null and b/3-bmab/sd_bmab/__pycache__/parameters.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/__pycache__/ui.cpython-310.pyc b/3-bmab/sd_bmab/__pycache__/ui.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c81bed351af6f44cec401ae8b2d6482088d9dbd Binary files /dev/null and b/3-bmab/sd_bmab/__pycache__/ui.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/base/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/base/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7833753d39bad11720c340ad4bdd0c43cc8ed78 Binary files /dev/null and b/3-bmab/sd_bmab/base/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/base/__pycache__/cache.cpython-310.pyc b/3-bmab/sd_bmab/base/__pycache__/cache.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c7956a04443d0a37fa045c44a1d5ab091a89f495 Binary files /dev/null and b/3-bmab/sd_bmab/base/__pycache__/cache.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/base/__pycache__/common.cpython-310.pyc b/3-bmab/sd_bmab/base/__pycache__/common.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f35a9e631a5982f29c780eed8ee66f97c0618b9d Binary files /dev/null and b/3-bmab/sd_bmab/base/__pycache__/common.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/base/__pycache__/context.cpython-310.pyc b/3-bmab/sd_bmab/base/__pycache__/context.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..55214a1595bdc356e023dc93b2a37790d6b64165 Binary files /dev/null and b/3-bmab/sd_bmab/base/__pycache__/context.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/base/__pycache__/detectorbase.cpython-310.pyc b/3-bmab/sd_bmab/base/__pycache__/detectorbase.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b995167377f68098df6a56924901e0c42f20e404 Binary files /dev/null and b/3-bmab/sd_bmab/base/__pycache__/detectorbase.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/base/__pycache__/filter.cpython-310.pyc b/3-bmab/sd_bmab/base/__pycache__/filter.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9a8cde2c8bf4bf8d130c6001c26565b3089d52c5 Binary files /dev/null and b/3-bmab/sd_bmab/base/__pycache__/filter.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/base/__pycache__/maskbase.cpython-310.pyc b/3-bmab/sd_bmab/base/__pycache__/maskbase.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..353ac9018417c9029d8379e25725a42fe69974f3 Binary files /dev/null and b/3-bmab/sd_bmab/base/__pycache__/maskbase.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/base/__pycache__/process.cpython-310.pyc b/3-bmab/sd_bmab/base/__pycache__/process.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b86a0b4f6ce61570a2a9c841146145d62f923dfc Binary files /dev/null and b/3-bmab/sd_bmab/base/__pycache__/process.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/base/__pycache__/processorbase.cpython-310.pyc b/3-bmab/sd_bmab/base/__pycache__/processorbase.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..98ab08653107d0478b502a22f476e217cb3fdf08 Binary files /dev/null and b/3-bmab/sd_bmab/base/__pycache__/processorbase.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/detectors/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/detectors/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..acc5e137e1a506f90d0b03e0f115ad0b9f80c3b1 Binary files /dev/null and b/3-bmab/sd_bmab/detectors/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/detectors/__pycache__/detector.cpython-310.pyc b/3-bmab/sd_bmab/detectors/__pycache__/detector.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..be69b18c6bd18bde91dedc82d87f3fe9e3398ed0 Binary files /dev/null and b/3-bmab/sd_bmab/detectors/__pycache__/detector.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/detectors/__pycache__/face.cpython-310.pyc b/3-bmab/sd_bmab/detectors/__pycache__/face.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e6d155e0ec87bed11862248d85194dd3c3c4d8f6 Binary files /dev/null and b/3-bmab/sd_bmab/detectors/__pycache__/face.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/detectors/__pycache__/hand.cpython-310.pyc b/3-bmab/sd_bmab/detectors/__pycache__/hand.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d356cfabf3a5a5fd0a241f8dbf8fba952b4eccea Binary files /dev/null and b/3-bmab/sd_bmab/detectors/__pycache__/hand.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/detectors/__pycache__/person.cpython-310.pyc b/3-bmab/sd_bmab/detectors/__pycache__/person.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3e32e5b2b63d9ccf5a833d70e30cd32224fe1a36 Binary files /dev/null and b/3-bmab/sd_bmab/detectors/__pycache__/person.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/external/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8dda5da69079952e543e6f1af267e88bf3a7ae8e Binary files /dev/null and b/3-bmab/sd_bmab/external/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/kohyahiresfix/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/external/kohyahiresfix/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3de6ccb60c9e60a92a639b72654c72586e745b76 Binary files /dev/null and b/3-bmab/sd_bmab/external/kohyahiresfix/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..735909af1db0824fd6b5a610ec9d6e46c24461bf Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/config.yaml b/3-bmab/sd_bmab/external/lama/config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..55fd91b5bcacd654e3045a2331e9c186818e6edc --- /dev/null +++ b/3-bmab/sd_bmab/external/lama/config.yaml @@ -0,0 +1,157 @@ +run_title: b18_ffc075_batch8x15 +training_model: + kind: default + visualize_each_iters: 1000 + concat_mask: true + store_discr_outputs_for_vis: true +losses: + l1: + weight_missing: 0 + weight_known: 10 + perceptual: + weight: 0 + adversarial: + kind: r1 + weight: 10 + gp_coef: 0.001 + mask_as_fake_target: true + allow_scale_mask: true + feature_matching: + weight: 100 + resnet_pl: + weight: 30 + weights_path: ${env:TORCH_HOME} + +optimizers: + generator: + kind: adam + lr: 0.001 + discriminator: + kind: adam + lr: 0.0001 +visualizer: + key_order: + - image + - predicted_image + - discr_output_fake + - discr_output_real + - inpainted + rescale_keys: + - discr_output_fake + - discr_output_real + kind: directory + outdir: /group-volume/User-Driven-Content-Generation/r.suvorov/inpainting/experiments/r.suvorov_2021-04-30_14-41-12_train_simple_pix2pix2_gap_sdpl_novgg_large_b18_ffc075_batch8x15/samples +location: + data_root_dir: /group-volume/User-Driven-Content-Generation/datasets/inpainting_data_root_large + out_root_dir: /group-volume/User-Driven-Content-Generation/${env:USER}/inpainting/experiments + tb_dir: /group-volume/User-Driven-Content-Generation/${env:USER}/inpainting/tb_logs +data: + batch_size: 15 + val_batch_size: 2 + num_workers: 3 + train: + indir: ${location.data_root_dir}/train + out_size: 256 + mask_gen_kwargs: + irregular_proba: 1 + irregular_kwargs: + max_angle: 4 + max_len: 200 + max_width: 100 + max_times: 5 + min_times: 1 + box_proba: 1 + box_kwargs: + margin: 10 + bbox_min_size: 30 + bbox_max_size: 150 + max_times: 3 + min_times: 1 + segm_proba: 0 + segm_kwargs: + confidence_threshold: 0.5 + max_object_area: 0.5 + min_mask_area: 0.07 + downsample_levels: 6 + num_variants_per_mask: 1 + rigidness_mode: 1 + max_foreground_coverage: 0.3 + max_foreground_intersection: 0.7 + max_mask_intersection: 0.1 + max_hidden_area: 0.1 + max_scale_change: 0.25 + horizontal_flip: true + max_vertical_shift: 0.2 + position_shuffle: true + transform_variant: distortions + dataloader_kwargs: + batch_size: ${data.batch_size} + shuffle: true + num_workers: ${data.num_workers} + val: + indir: ${location.data_root_dir}/val + img_suffix: .png + dataloader_kwargs: + batch_size: ${data.val_batch_size} + shuffle: false + num_workers: ${data.num_workers} + visual_test: + indir: ${location.data_root_dir}/korean_test + img_suffix: _input.png + pad_out_to_modulo: 32 + dataloader_kwargs: + batch_size: 1 + shuffle: false + num_workers: ${data.num_workers} +generator: + kind: ffc_resnet + input_nc: 4 + output_nc: 3 + ngf: 64 + n_downsampling: 3 + n_blocks: 18 + add_out_act: sigmoid + init_conv_kwargs: + ratio_gin: 0 + ratio_gout: 0 + enable_lfu: false + downsample_conv_kwargs: + ratio_gin: ${generator.init_conv_kwargs.ratio_gout} + ratio_gout: ${generator.downsample_conv_kwargs.ratio_gin} + enable_lfu: false + resnet_conv_kwargs: + ratio_gin: 0.75 + ratio_gout: ${generator.resnet_conv_kwargs.ratio_gin} + enable_lfu: false +discriminator: + kind: pix2pixhd_nlayer + input_nc: 3 + ndf: 64 + n_layers: 4 +evaluator: + kind: default + inpainted_key: inpainted + integral_kind: ssim_fid100_f1 +trainer: + kwargs: + gpus: -1 + accelerator: ddp + max_epochs: 200 + gradient_clip_val: 1 + log_gpu_memory: None + limit_train_batches: 25000 + val_check_interval: ${trainer.kwargs.limit_train_batches} + log_every_n_steps: 1000 + precision: 32 + terminate_on_nan: false + check_val_every_n_epoch: 1 + num_sanity_val_steps: 8 + limit_val_batches: 1000 + replace_sampler_ddp: false + checkpoint_kwargs: + verbose: true + save_top_k: 5 + save_last: true + period: 1 + monitor: val_ssim_fid100_f1_total_mean + mode: max diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b4ce2d0fec77fffbcce7fecc84cc3ee3d9f04e6c Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/__pycache__/utils.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/__pycache__/utils.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..de203bac1af4e9948b40c6fc54ab47fbf91b0e2a Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/__pycache__/utils.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0490af7df3d0721e8d3ecc0bd48bb6ef8923a78a Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/losses/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/losses/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2560c6a3efc8be120e681390844958f2f07660db Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/losses/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/losses/__pycache__/distance_weighting.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/losses/__pycache__/distance_weighting.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8e4ab9ff00eb2159e6b35557d4f8772873e97d41 Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/losses/__pycache__/distance_weighting.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/losses/__pycache__/feature_matching.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/losses/__pycache__/feature_matching.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d19ed432be6846d9c8b8c9ec2596b32667358f24 Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/losses/__pycache__/feature_matching.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/losses/__pycache__/perceptual.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/losses/__pycache__/perceptual.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f76fcd1c70faac71f4d046d4ee279a38c393369c Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/losses/__pycache__/perceptual.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..39cc1a3c64e99c1d10672674a510cd507487c3e8 Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/base.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/base.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..599970fe25a487d9c6728c03f36881a83277bd5b Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/base.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/depthwise_sep_conv.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/depthwise_sep_conv.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..84bcea19fa17019e2fcda272cbe0772fa6321415 Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/depthwise_sep_conv.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/ffc.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/ffc.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..88eb0015ee50964c8db5d3d69bbfc68bbd5102c3 Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/ffc.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/multidilated_conv.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/multidilated_conv.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1129529b37f6a06304dc4ecac268cd9fabe072ac Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/multidilated_conv.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/pix2pixhd.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/pix2pixhd.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..22ce5b440968e5a1cbff3cdaa158ab9447f7010d Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/pix2pixhd.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/spatial_transform.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/spatial_transform.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f8baa2d4128f8206be266b75fe9178090ea50ae9 Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/spatial_transform.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/squeeze_excitation.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/squeeze_excitation.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9bb48384dcd011a84160f914907fd24824f4ea1e Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/modules/__pycache__/squeeze_excitation.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/trainers/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/trainers/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..581ac53b21207aaf53954bb208ec5f6d9614cb71 Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/trainers/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/trainers/__pycache__/base.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/trainers/__pycache__/base.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..11d2f742c24128c6f4619c10dec0bc3d5ec3a5de Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/trainers/__pycache__/base.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/external/lama/saicinpainting/training/trainers/__pycache__/default.cpython-310.pyc b/3-bmab/sd_bmab/external/lama/saicinpainting/training/trainers/__pycache__/default.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..701670bcce8dabcfa4c040e334112d5e889dfbdc Binary files /dev/null and b/3-bmab/sd_bmab/external/lama/saicinpainting/training/trainers/__pycache__/default.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/masking/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/masking/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f85e366bd638b305515a50cba88f5c5a10274908 Binary files /dev/null and b/3-bmab/sd_bmab/masking/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/masking/__pycache__/sam.cpython-310.pyc b/3-bmab/sd_bmab/masking/__pycache__/sam.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8fee70d98608a48250980b1d5f783d2659f3d8a1 Binary files /dev/null and b/3-bmab/sd_bmab/masking/__pycache__/sam.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/masking/__pycache__/sam_hq.cpython-310.pyc b/3-bmab/sd_bmab/masking/__pycache__/sam_hq.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b94f673efa325da825002ee85c59e3bdc7e73b51 Binary files /dev/null and b/3-bmab/sd_bmab/masking/__pycache__/sam_hq.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/pipeline/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/pipeline/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1e552ff1c60822e81e42d374230613d2f4f3753e Binary files /dev/null and b/3-bmab/sd_bmab/pipeline/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/pipeline/internal/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/pipeline/internal/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8648717d4539da2ff13ceeb7fb48e7e20a308a46 Binary files /dev/null and b/3-bmab/sd_bmab/pipeline/internal/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/pipeline/internal/__pycache__/intermediate.cpython-310.pyc b/3-bmab/sd_bmab/pipeline/internal/__pycache__/intermediate.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3530c9fe29a55bdec478f0552495433ac55ba845 Binary files /dev/null and b/3-bmab/sd_bmab/pipeline/internal/__pycache__/intermediate.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/pipeline/internal/__pycache__/internalpipe.cpython-310.pyc b/3-bmab/sd_bmab/pipeline/internal/__pycache__/internalpipe.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0a46bcd2904b7fa1b1e9427ff93a17233f9b8532 Binary files /dev/null and b/3-bmab/sd_bmab/pipeline/internal/__pycache__/internalpipe.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/pipeline/post/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/pipeline/post/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..82f6e04ff9e6670ea56cb289e512f0b0a272e78b Binary files /dev/null and b/3-bmab/sd_bmab/pipeline/post/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/pipeline/post/__pycache__/mainpipe.cpython-310.pyc b/3-bmab/sd_bmab/pipeline/post/__pycache__/mainpipe.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..49890584ce94a87be20edf7536b836ccde9e9ea0 Binary files /dev/null and b/3-bmab/sd_bmab/pipeline/post/__pycache__/mainpipe.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/processors/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f1b0be4d543a3ff1b73cfb272ea849eff5995438 Binary files /dev/null and b/3-bmab/sd_bmab/processors/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/basic/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/processors/basic/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1dc4bc18581f39c7cf42b928562f8f274ad679c2 Binary files /dev/null and b/3-bmab/sd_bmab/processors/basic/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/basic/__pycache__/blend.cpython-310.pyc b/3-bmab/sd_bmab/processors/basic/__pycache__/blend.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f452a976a0d6710f76fcee63311fa0ceab3f373c Binary files /dev/null and b/3-bmab/sd_bmab/processors/basic/__pycache__/blend.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/basic/__pycache__/edge.cpython-310.pyc b/3-bmab/sd_bmab/processors/basic/__pycache__/edge.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..99fc676f7726bfe8ddb7911dfa2e31eb4c4e7e28 Binary files /dev/null and b/3-bmab/sd_bmab/processors/basic/__pycache__/edge.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/basic/__pycache__/final.cpython-310.pyc b/3-bmab/sd_bmab/processors/basic/__pycache__/final.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c5c1298ea84258010711590f2fab29b2f9697259 Binary files /dev/null and b/3-bmab/sd_bmab/processors/basic/__pycache__/final.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/basic/__pycache__/iclight.cpython-310.pyc b/3-bmab/sd_bmab/processors/basic/__pycache__/iclight.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e549ef9b42de6195bfc00f19a9d2580bf976d01e Binary files /dev/null and b/3-bmab/sd_bmab/processors/basic/__pycache__/iclight.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/basic/__pycache__/img2imgmasking.cpython-310.pyc b/3-bmab/sd_bmab/processors/basic/__pycache__/img2imgmasking.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..949f2257f2766c2ae45ad0b3ebb5721b5b38d601 Binary files /dev/null and b/3-bmab/sd_bmab/processors/basic/__pycache__/img2imgmasking.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/basic/__pycache__/intermediate.cpython-310.pyc b/3-bmab/sd_bmab/processors/basic/__pycache__/intermediate.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..983f714fb38fdf04fceecd93750b1397da9b16ac Binary files /dev/null and b/3-bmab/sd_bmab/processors/basic/__pycache__/intermediate.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/basic/__pycache__/preprocessfilter.cpython-310.pyc b/3-bmab/sd_bmab/processors/basic/__pycache__/preprocessfilter.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4ae5b46bbeca3385edbc19e75097576cde6d4924 Binary files /dev/null and b/3-bmab/sd_bmab/processors/basic/__pycache__/preprocessfilter.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/controlnet/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/processors/controlnet/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a5a898262d21c86b827b684b817cf854b62aafd7 Binary files /dev/null and b/3-bmab/sd_bmab/processors/controlnet/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/controlnet/__pycache__/ipadapter.cpython-310.pyc b/3-bmab/sd_bmab/processors/controlnet/__pycache__/ipadapter.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c07de1be67d6f8564c4e728412e78fa33b3650af Binary files /dev/null and b/3-bmab/sd_bmab/processors/controlnet/__pycache__/ipadapter.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/controlnet/__pycache__/noise.cpython-310.pyc b/3-bmab/sd_bmab/processors/controlnet/__pycache__/noise.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..69eaa358f8cd48e36f5d980f0697717a8b6ce1f6 Binary files /dev/null and b/3-bmab/sd_bmab/processors/controlnet/__pycache__/noise.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/controlnet/__pycache__/pose.cpython-310.pyc b/3-bmab/sd_bmab/processors/controlnet/__pycache__/pose.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..452c0431dce4cda3c5839d666b91ed6fd7c71d78 Binary files /dev/null and b/3-bmab/sd_bmab/processors/controlnet/__pycache__/pose.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/detailer/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/processors/detailer/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6f19aeb0caa6b163dc0969f411fddac5d517c9a0 Binary files /dev/null and b/3-bmab/sd_bmab/processors/detailer/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/detailer/__pycache__/face.cpython-310.pyc b/3-bmab/sd_bmab/processors/detailer/__pycache__/face.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8cdb10d96a4d2f77f7fc8c975981b334f1f7377f Binary files /dev/null and b/3-bmab/sd_bmab/processors/detailer/__pycache__/face.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/detailer/__pycache__/hand.cpython-310.pyc b/3-bmab/sd_bmab/processors/detailer/__pycache__/hand.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0829481a5731d3169baf77266a159e0131112dc9 Binary files /dev/null and b/3-bmab/sd_bmab/processors/detailer/__pycache__/hand.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/detailer/__pycache__/person.cpython-310.pyc b/3-bmab/sd_bmab/processors/detailer/__pycache__/person.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..98413dd8fa037d7255af1454f06a4f7b4eb8ac6a Binary files /dev/null and b/3-bmab/sd_bmab/processors/detailer/__pycache__/person.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/postprocess/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/processors/postprocess/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..03eed7bdbe81974c8a09fe69f548ff2d38c69e0f Binary files /dev/null and b/3-bmab/sd_bmab/processors/postprocess/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/postprocess/__pycache__/finalfilter.cpython-310.pyc b/3-bmab/sd_bmab/processors/postprocess/__pycache__/finalfilter.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c5d4483d202fb3f23c9fb5c05a82f9a2131d5857 Binary files /dev/null and b/3-bmab/sd_bmab/processors/postprocess/__pycache__/finalfilter.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/postprocess/__pycache__/inpaint.cpython-310.pyc b/3-bmab/sd_bmab/processors/postprocess/__pycache__/inpaint.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5220749c2baf975e428c5f0db139ec6e62970165 Binary files /dev/null and b/3-bmab/sd_bmab/processors/postprocess/__pycache__/inpaint.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/postprocess/__pycache__/inpaintlama.cpython-310.pyc b/3-bmab/sd_bmab/processors/postprocess/__pycache__/inpaintlama.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5e9fc71ee074d8ca242e05eae16b951ad4318480 Binary files /dev/null and b/3-bmab/sd_bmab/processors/postprocess/__pycache__/inpaintlama.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/postprocess/__pycache__/upscaleafterprocess.cpython-310.pyc b/3-bmab/sd_bmab/processors/postprocess/__pycache__/upscaleafterprocess.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8245a1ee6a459032974c246aac26d97b22c0326d Binary files /dev/null and b/3-bmab/sd_bmab/processors/postprocess/__pycache__/upscaleafterprocess.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/postprocess/__pycache__/upscalebeforeprocess.cpython-310.pyc b/3-bmab/sd_bmab/processors/postprocess/__pycache__/upscalebeforeprocess.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3cdd57146e48b573060854bc60d82b78f1517056 Binary files /dev/null and b/3-bmab/sd_bmab/processors/postprocess/__pycache__/upscalebeforeprocess.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/postprocess/__pycache__/watermark.cpython-310.pyc b/3-bmab/sd_bmab/processors/postprocess/__pycache__/watermark.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e9dc8c613e8d33b980137dc666c6a08bd55236f3 Binary files /dev/null and b/3-bmab/sd_bmab/processors/postprocess/__pycache__/watermark.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/preprocess/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/processors/preprocess/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fcb90d6829da77b66283e6abf403c4395c45c366 Binary files /dev/null and b/3-bmab/sd_bmab/processors/preprocess/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/preprocess/__pycache__/preprocessfilter.cpython-310.pyc b/3-bmab/sd_bmab/processors/preprocess/__pycache__/preprocessfilter.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..351b9ef8c2cd5a274b62a2e881ec9fcdec8b0a24 Binary files /dev/null and b/3-bmab/sd_bmab/processors/preprocess/__pycache__/preprocessfilter.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/preprocess/__pycache__/pretraining.cpython-310.pyc b/3-bmab/sd_bmab/processors/preprocess/__pycache__/pretraining.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eb925d5a6912082dc3eec11e756b83530e6df115 Binary files /dev/null and b/3-bmab/sd_bmab/processors/preprocess/__pycache__/pretraining.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/preprocess/__pycache__/refiner.cpython-310.pyc b/3-bmab/sd_bmab/processors/preprocess/__pycache__/refiner.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ffbcbc4f4298efbc7e3cc4417edceadd1a6c2944 Binary files /dev/null and b/3-bmab/sd_bmab/processors/preprocess/__pycache__/refiner.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/preprocess/__pycache__/resample.cpython-310.pyc b/3-bmab/sd_bmab/processors/preprocess/__pycache__/resample.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..56927638f9df6915a51574cd61d7fdd46e5a7b94 Binary files /dev/null and b/3-bmab/sd_bmab/processors/preprocess/__pycache__/resample.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/preprocess/__pycache__/resize.cpython-310.pyc b/3-bmab/sd_bmab/processors/preprocess/__pycache__/resize.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..950ed8488333d54132c9c0684fd3938bfe8f3acc Binary files /dev/null and b/3-bmab/sd_bmab/processors/preprocess/__pycache__/resize.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/utils/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/processors/utils/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6e4fcccf9e676b46689526f6c9be7eae8da2fb64 Binary files /dev/null and b/3-bmab/sd_bmab/processors/utils/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/utils/__pycache__/checkpoint.cpython-310.pyc b/3-bmab/sd_bmab/processors/utils/__pycache__/checkpoint.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..508f530a1daa0846e71c594c54a5d2fd0325f475 Binary files /dev/null and b/3-bmab/sd_bmab/processors/utils/__pycache__/checkpoint.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/utils/__pycache__/filesave.cpython-310.pyc b/3-bmab/sd_bmab/processors/utils/__pycache__/filesave.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a2b84eb2b1e229b4370a015fbbc34f39c5b9b359 Binary files /dev/null and b/3-bmab/sd_bmab/processors/utils/__pycache__/filesave.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/processors/utils/__pycache__/modelswitch.cpython-310.pyc b/3-bmab/sd_bmab/processors/utils/__pycache__/modelswitch.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..140bc80ed49cff1410b6ae921f873cc7a4945ab5 Binary files /dev/null and b/3-bmab/sd_bmab/processors/utils/__pycache__/modelswitch.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/sd_override/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/sd_override/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d0a3a798bcdff7f03c40c0f5f70757e71a946d0d Binary files /dev/null and b/3-bmab/sd_bmab/sd_override/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/sd_override/__pycache__/img2img.cpython-310.pyc b/3-bmab/sd_bmab/sd_override/__pycache__/img2img.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cb80037b5cc7045b128c9dac6cdcd6d771085975 Binary files /dev/null and b/3-bmab/sd_bmab/sd_override/__pycache__/img2img.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/sd_override/__pycache__/samper.cpython-310.pyc b/3-bmab/sd_bmab/sd_override/__pycache__/samper.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3025004c898fccda8df50085b26810f21d058256 Binary files /dev/null and b/3-bmab/sd_bmab/sd_override/__pycache__/samper.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/sd_override/__pycache__/sd_models.cpython-310.pyc b/3-bmab/sd_bmab/sd_override/__pycache__/sd_models.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5851dc67dd72a5b6b1796ebc634338b669e9c982 Binary files /dev/null and b/3-bmab/sd_bmab/sd_override/__pycache__/sd_models.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/sd_override/__pycache__/txt2img.cpython-310.pyc b/3-bmab/sd_bmab/sd_override/__pycache__/txt2img.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ece001086c6b34877d83eed7867a62933dcfa42e Binary files /dev/null and b/3-bmab/sd_bmab/sd_override/__pycache__/txt2img.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/util/__pycache__/__init__.cpython-310.pyc b/3-bmab/sd_bmab/util/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b64012b02dba654d371c7d79d0a7dda915131d65 Binary files /dev/null and b/3-bmab/sd_bmab/util/__pycache__/__init__.cpython-310.pyc differ diff --git a/3-bmab/sd_bmab/util/__pycache__/installhelper.cpython-310.pyc b/3-bmab/sd_bmab/util/__pycache__/installhelper.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ef37f5255f7fb3f4170c83962cbde5a0563cd110 Binary files /dev/null and b/3-bmab/sd_bmab/util/__pycache__/installhelper.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/.github/workflows/ruff.yaml b/sd-forge-extra-samplers/.github/workflows/ruff.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1224231ebeb25c67af47ffce06515565ce84aca1 --- /dev/null +++ b/sd-forge-extra-samplers/.github/workflows/ruff.yaml @@ -0,0 +1,8 @@ +name: Ruff +on: [pull_request] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/ruff-action@v1 diff --git a/sd-forge-extra-samplers/.gitignore b/sd-forge-extra-samplers/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..8ce58e54540d4f142b26e0a7e06c2c0ac87f3401 --- /dev/null +++ b/sd-forge-extra-samplers/.gitignore @@ -0,0 +1,163 @@ + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ \ No newline at end of file diff --git a/sd-forge-extra-samplers/LICENSE b/sd-forge-extra-samplers/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f288702d2fa16d3cdf0035b15a9fcbc552cd88e7 --- /dev/null +++ b/sd-forge-extra-samplers/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/sd-forge-extra-samplers/README.md b/sd-forge-extra-samplers/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d0c319c99b6be3d91b0df9055031fd334f5daec8 --- /dev/null +++ b/sd-forge-extra-samplers/README.md @@ -0,0 +1,97 @@ +# Overview + +This repository provides additional samplers to the Forge WebUI. + +## Features + +- Additional samplers integrated into the Forge WebUI. + - Adaptive Progressive (Experimental) + - Euler Max + - Euler Negative + - Euler Dy + - Euler Dy Negative + - Euler SMEA + - Euler SMEA Dy + - Euler SMEA Dy Negative + - Euler Multipass + - Euler Multipass CFG++ + - Euler a Multipass + - Euler a Multipass CFG++ + - Extended Reverse Time SDE + - Gradient Estimation + - Heun Ancestral + - Kohaku LoNyu Yog + - Langevin Euler (Experimental) + - Res Multistep + - Res Multistep CFG++ + - Res Multistep Ancestral + - Res Multistep Ancestral CFG++ + +- Additional Schedulers + - Linear Log + +Adds a new extension accordian titled "Extra Samplers" to allow adjusting certain samplers. + +## Installation + +### Clone from Git + +1. Navigate to the extension directory in your WebUI installation +1. Clone the repository: + ```sh + git clone https://github.com/MisterChief95/sd-forge-extra-samplers.git + ``` +1. Start WebUI + +### Install from URL + +1. Open the Extensions tab in the web UI. +2. Go to the "Install from URL" section. +3. Enter: `https://github.com/MisterChief95/sd-forge-extra-samplers.git` in the "URL for extension's git repository" box. +4. Click "Install". +5. Restart WebUI + +## Usage + +1. Open the WebUI. +2. Navigate to the sampler settings. +3. Select one of the newly added Euler samplers from the list. +4. Generate images as usual. + +### Important +- Not all samplers work well in every situation. Some will look poor when used for img2img/hires fix. +- Mix-and-match samplers to find the best combinations. A sampler might look bad with one scheduler but good with another! + +## Contributing + +Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes. + +## Acknowledgements + +If any of these are incorrect please let me know! + +- Thanks to the developers of Automatic1111 and Forge. +- [Koishi-Star](https://github.com/Koishi-Star/Euler-Smea-Dyn-Sampler) for the following sampler contributions: + - Euler Negative + - Euler Dy + - Euler Dy Negative + - Euler SMEA Dy (Euler SMEA Dy Negative based on this) + - Kohaku LoNyu Yog +- [licyk](https://github.com/licyk/advanced_euler_sampler_extension/tree/main) for the following sampler contributions: + - Euler Max + - Euler SMEA +- [Panchovix](https://github.com/Panchovix/stable-diffusion-webui-reForge) for the following sampler contributions: + - Res Multistep + - Res Multistep CFG++ +- [comfyanonymous](https://github.com/comfyanonymous/ComfyUI) for the following sampler contributions: + - Gradient Estimation + - Extended Reverse Time SDE + - Res Multistep + - Res Multistep CFG++ + - Res Multistep Ancestral + - Res Multistep Ancestral CFG++ +- Euler Multipass + - Original Implementation: [aria1th](https://github.com/aria1th) + - CFG++ Implementation: [LaVie024](https://github.com/LaVie024) + - Final ComfyUI implementation: [catboxanon](https://github.com/catboxanon) +- Special thanks to the contributors of this repository. diff --git a/sd-forge-extra-samplers/lib_es/__pycache__/__init__.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0408bcdd685914138bc8837ef801802be01f15e5 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/__pycache__/__init__.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/__pycache__/const.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/__pycache__/const.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bf97479856b8367007637dff9b55b4d74a785a92 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/__pycache__/const.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/__pycache__/samplers.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/__pycache__/samplers.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b1b2e1302bd7002bea9048f1d98adc9b925c506 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/__pycache__/samplers.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/__pycache__/schedulers.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/__pycache__/schedulers.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cbf633cc54529f7b1494702f97e78ae7f84e6ffa Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/__pycache__/schedulers.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/__pycache__/utils.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/__pycache__/utils.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ccf19a66db9ecf0cac4b30091c4232786a6f8ff2 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/__pycache__/utils.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/__pycache__/xyz.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/__pycache__/xyz.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8ddf6e72bc5d0ef0e5802f2ede20e2a61527c034 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/__pycache__/xyz.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/__init__.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ff9a63b98b85ec17879efb4ee5c4040bb31f8cd8 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/__init__.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/adaptive_progressive.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/adaptive_progressive.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2e0aa8d367ce6fb87ef4f584281fccadad290252 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/adaptive_progressive.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_dy.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_dy.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1e07cbacf14b2c0161ea530304e885caff99f302 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_dy.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_dy_negative.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_dy_negative.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7264414b7438a2d284a39b04375d8e155a4966fd Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_dy_negative.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_max.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_max.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..79ae8a2f207511407ca96fbe8484931aa4138066 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_max.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_multipass.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_multipass.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5b01c550b024a70ac742f372d7c074e704387248 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_multipass.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_negative.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_negative.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..79018a16460176778a51de0117f106dd8481eef8 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_negative.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_smea.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_smea.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d325da0a5de5ddb48cb9b6a0f276fdb27251b389 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_smea.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_smea_dy.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_smea_dy.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9eae687cf7353e64c17321965d876b6e78070266 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_smea_dy.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_smea_dy_negative.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_smea_dy_negative.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..da0e3077a2e6273882b1dec020c28b01f9e3b60d Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/euler_smea_dy_negative.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/extended_reverse_time.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/extended_reverse_time.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..82a62ae6bd3858ceedec8bf4c021890f3c7c7f71 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/extended_reverse_time.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/gradient_estimation.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/gradient_estimation.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6f8c7a23b08b81c2fb44d2ab487e5dd9be71b393 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/gradient_estimation.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/heun_ancestral.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/heun_ancestral.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0f355691785f0dcb91647f8534fe780668754195 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/heun_ancestral.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/kohaku_lonyu_yog.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/kohaku_lonyu_yog.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..97ef5b20e509ff41b19bc143daf8cfbe3fbdcac9 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/kohaku_lonyu_yog.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/langevin_euler.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/langevin_euler.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6cd1e7d81c0b9ada1821e9bf11c9d878bfd6e0e4 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/langevin_euler.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/res_multistep.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/res_multistep.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7125459c581b336c4d25c64bef7c4dd59bf8d156 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_samplers/__pycache__/res_multistep.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_schedulers/__pycache__/__init__.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_schedulers/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bb5089529b5d7ccaca954d1b332eb1245cc0b8c3 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_schedulers/__pycache__/__init__.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/lib_es/extra_schedulers/__pycache__/linear_log.cpython-310.pyc b/sd-forge-extra-samplers/lib_es/extra_schedulers/__pycache__/linear_log.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ba4a128c430a20140c01592454314c52d53bb9d5 Binary files /dev/null and b/sd-forge-extra-samplers/lib_es/extra_schedulers/__pycache__/linear_log.cpython-310.pyc differ diff --git a/sd-forge-extra-samplers/pyproject.toml b/sd-forge-extra-samplers/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..ae961154eabfc31d7dc77894b10d5766646b5e23 --- /dev/null +++ b/sd-forge-extra-samplers/pyproject.toml @@ -0,0 +1,78 @@ +[tool.ruff] +# Exclude a variety of commonly ignored directories. +exclude = [ + ".bzr", + ".direnv", + ".eggs", + ".git", + ".git-rewrite", + ".hg", + ".ipynb_checkpoints", + ".mypy_cache", + ".nox", + ".pants.d", + ".pyenv", + ".pytest_cache", + ".pytype", + ".ruff_cache", + ".svn", + ".tox", + ".venv", + ".vscode", + "__pypackages__", + "_build", + "buck-out", + "build", + "dist", + "node_modules", + "site-packages", + "venv", +] + +# Same as Black. +line-length = 120 +indent-width = 4 + +# Assume Python 3.8 +target-version = "py310" + +[tool.ruff.lint] +# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. +# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or +# McCabe complexity (`C901`) by default. +select = ["E4", "E7", "E9", "F"] +ignore = [] + +# Allow fix for all enabled rules (when `--fix`) is provided. +fixable = ["ALL"] +unfixable = [] + +# Allow unused variables when underscore-prefixed. +dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" + +[tool.ruff.format] +# Like Black, use double quotes for strings. +quote-style = "double" + +# Like Black, indent with spaces, rather than tabs. +indent-style = "space" + +# Like Black, respect magic trailing commas. +skip-magic-trailing-comma = false + +# Like Black, automatically detect the appropriate line ending. +line-ending = "auto" + +# Enable auto-formatting of code examples in docstrings. Markdown, +# reStructuredText code/literal blocks and doctests are all supported. +# +# This is currently disabled by default, but it is planned for this +# to be opt-out in the future. +docstring-code-format = false + +# Set the line length limit used when formatting code snippets in +# docstrings. +# +# This only has an effect when the `docstring-code-format` setting is +# enabled. +docstring-code-line-length = "dynamic" \ No newline at end of file diff --git a/sd-forge-extra-samplers/scripts/__pycache__/extra_samplers.cpython-310.pyc b/sd-forge-extra-samplers/scripts/__pycache__/extra_samplers.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eb6184dfee0a6d019e9e84663473ab92c49f363a Binary files /dev/null and b/sd-forge-extra-samplers/scripts/__pycache__/extra_samplers.cpython-310.pyc differ