This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py | |
| index 3895a795..a5765c3a 100644 | |
| --- a/scripts/xyz_grid.py | |
| +++ b/scripts/xyz_grid.py | |
| @@ -36,11 +36,24 @@ def apply_field(field): | |
| def apply_prompt(p, x, xs): | |
| - if xs[0] not in p.prompt and xs[0] not in p.negative_prompt: | |
| - raise RuntimeError(f"Prompt S/R did not find {xs[0]} in prompt or negative prompt.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| def main(): | |
| prompt = "((masterpiece)), ((best quality)), ((illustration)), nsfw, beautiful thicc cute victorian girl, loli face, Feminine, Anders Zorn, ((cleavage of huge breasts)), puffy nipple, :d, blouse, long skirt" | |
| negative_prompt = "[[octane]], [[nsfw]], low hand,low arms,hand,arms,fingers,legs, lower body,thighs, cropped, worst quality, low quality,quality" | |
| sampling_methods = [ | |
| "Euler a", | |
| "Euler", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/modules/ui.py b/modules/ui.py | |
| index 5dce7f3..3a5cc55 100644 | |
| --- a/modules/ui.py | |
| +++ b/modules/ui.py | |
| @@ -775,7 +775,7 @@ def create_ui(wrap_gradio_gpu_call): | |
| show_progress=False, | |
| ) | |
| - txt2img_prompt.submit(**txt2img_args) | |
| + txt2img_prompt.submit(api_name='txt2img', **txt2img_args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import torch | |
| def main(): | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument( | |
| "--ckpt0", | |
| type=str, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/ldm/modules/attention.py b/ldm/modules/attention.py | |
| index f4eff39..f90c6c4 100644 | |
| --- a/ldm/modules/attention.py | |
| +++ b/ldm/modules/attention.py | |
| @@ -174,23 +174,27 @@ class CrossAttention(nn.Module): | |
| context = default(context, x) | |
| k = self.to_k(context) | |
| v = self.to_v(context) | |
| + del context, x | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Get the number of tokens using the same tokenizer that Stable Diffusion uses. | |
| author: opparco | |
| """ | |
| import argparse | |
| from transformers import CLIPTokenizer | |
| def main(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BCDice::Command::Parser | |
| token NUMBER R U C F PLUS MINUS ASTERISK SLASH PARENL PARENR AT SHARP DOLLAR CMP_OP QUESTION NOTATION | |
| expect 2 | |
| rule | |
| expr: notation option modifier target option | |
| { | |
| raise ParseError unless @modifier | |
| notation, option, modifier, target, post_option = val |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for code in "1000".."9999" | |
| a, b, c, d = code.bytes.map {|byte| byte - 0x30} | |
| n = code.to_i | |
| x = a + b + c + d | |
| # min(x) = 1 | |
| # max(x) = 36 | |
| next if x == 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <set> | |
| #include "NodeMap.h" | |
| std::unordered_map<NiNode *, std::unordered_map<std::string, NiNode *> > m_nodes_container; | |
| void DeleteNodeMap(NiNode * rootnode) | |
| { | |
| _DMESSAGE("DeleteNodeMap rootnode %p", rootnode); | |
| m_nodes_container.erase(rootnode); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://github.com/opal/opal/blob/b1074a37150f9b0b53a35f0efa4a1cbddc02ba29/opal/corelib/random/mersenne_twister.rb | |
| // node opal_mt.js | |
| var mt19937 = (function() { | |
| /* Period parameters */ | |
| var N = 624; | |
| var M = 397; | |
| var MATRIX_A = 0x9908b0df; /* constant vector a */ | |
| var UMASK = 0x80000000; /* most significant w-r bits */ | |
| var LMASK = 0x7fffffff; /* least significant r bits */ | |
| var MIXBITS = function(u,v) { return ( ((u) & UMASK) | ((v) & LMASK) ); }; |