Skip to content

Instantly share code, notes, and snippets.

@opparco
opparco / Gacha-L48-C16-W512-H512-T768-T1024.json
Created September 28, 2023 04:05
prompt.json for EasyPromptAnime
{
"name": "",
"path": "share/Stable-diffusion/darkSushi-Corneos7thHeaven-0.3.safetensors",
"vae_path": "",
"motion_module": "models/motion-module/mm_sd_v14.ckpt",
"compile": false,
"tensor_interpolation_slerp": true,
"seed": [
2174415336
],
@opparco
opparco / Starfield-Ultra-Performance.ini.patch
Created September 3, 2023 13:32
Performance Ultra Settings 60fps in cities
--- Ultra.ini 2023-09-01 08:57:51.408400700 +0900
+++ Ultra-Performance.ini 2023-09-03 06:43:22.568596100 +0900
@@ -1,6 +1,6 @@
[Display]
bVolumetricLightingEnable=1
-bDepthOfFieldEnable=1
+bDepthOfFieldEnable=0
[Decals]
uMaxDecals=100
diff --git a/scripts/animatediff.py b/scripts/animatediff.py
index 9696b5a..37e1705 100644
--- a/scripts/animatediff.py
+++ b/scripts/animatediff.py
@@ -137,6 +137,22 @@ class AnimateDiffScript(scripts.Script):
p.batch_size = video_length
self.inject_motion_modules(p, model)
+ beta_start = 0.00085
+ beta_end = 0.012
@opparco
opparco / ddim-animatediff.patch
Created August 27, 2023 00:50
ddim for Animatediff webui
diff --git a/ldm/models/diffusion/ddim.py b/ldm/models/diffusion/ddim.py
index c6cfd57..2569ea1 100644
--- a/ldm/models/diffusion/ddim.py
+++ b/ldm/models/diffusion/ddim.py
@@ -25,12 +25,24 @@ class DDIMSampler(object):
self.ddim_timesteps = make_ddim_timesteps(ddim_discr_method=ddim_discretize, num_ddim_timesteps=ddim_num_steps,
num_ddpm_timesteps=self.ddpm_num_timesteps,verbose=verbose)
alphas_cumprod = self.model.alphas_cumprod
+
+ beta_start = 0.00085
@opparco
opparco / llama.cpp-gptneox-wip.patch
Created August 22, 2023 00:33
build gptneox-wip
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index d2176c9..3735e62 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -13,6 +13,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
if (EMSCRIPTEN)
else()
add_subdirectory(main)
+ add_subdirectory(gptneox-wip)
add_subdirectory(quantize)
@opparco
opparco / debug-tokenizer-vicuna-13b.py
Created August 21, 2023 04:59
debug tokenizer of lmsys/vicuna-13b-v1.3
#
# debug tokenizer of lmsys/vicuna-13b-v1.3
#
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("lmsys/vicuna-13b-v1.3")
def encode_decode(string: str):
@opparco
opparco / weblab_10b.py
Last active August 20, 2023 10:20
correct vocab of matsuo-lab/weblab-10b
#
# correct vocab of matsuo-lab/weblab-10b
#
vocab = {}
# 95 -> (none)
# 96 -> \xa1
# ...
# 107 -> \xac
@opparco
opparco / debug-tokenizer-hiragana.py
Created August 18, 2023 14:44
debug tokenizer of matsuo-lab/weblab-10b
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("matsuo-lab/weblab-10b")
file_path = "hiragana.txt"
with open(file_path, "w", encoding="utf-8") as o:
o.write("# unicode decoded [num-ids] id, ...\n")
for i in range(0x3040, 0x309F + 1):
ids = tokenizer.encode(chr(i), add_special_tokens=False)
decoded = tokenizer.decode(ids)
@opparco
opparco / debug-tokenizer-weblab-10b.py
Created August 18, 2023 11:20
debug tokenizer of matsuo-lab/weblab-10b
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("matsuo-lab/weblab-10b")
dot = tokenizer.encode(".")
print(dot)
# [15]
nemureru = tokenizer.encode("眠れる")
#
filename = '../grammars/japanese.gbnf'
print(f"overwrite {filename}")
with open(filename, 'w', encoding='utf-8') as f:
f.write("""#
root ::= char+ ([ \\t\\n] char+)*
char ::= [\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\u4E00-\u9FFF\uFF21-\uFF3A\uFF41-\uFF5A\uFF10-\uFF19]""")