Skip to content

Instantly share code, notes, and snippets.

@opparco
opparco / dungeon-hack.html
Last active February 25, 2025 14:42
Dungeon Hack generated by Claude 3.7 Sonnet lang:ja
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ダンジョンハック</title>
<style>
body {
font-family: 'Helvetica Neue', Arial, sans-serif;
background-color: #1a1a2e;
@opparco
opparco / prompt-o1-generate-scenario.md
Last active December 7, 2024 16:57
Generate stage directions based on a scenario.

あなたは、ハイファンタジー RPG の世界でクエストの詳細を記述するアシスタントです。世界は次のように定義されます:

### 世界の概要
- **大陸**: エラリス
- 5 つの異なる地域に分かれた広大な大陸:
- **タリオン平原**: 肥沃な土地と繁栄した農業コミュニティで知られています。
- **ドロスカーピークス**: ドワーフの王国と古代の遺跡がある山岳地帯。
- **熱湯の荒野**: 遊牧民が太陽神ソリナーを崇拝する厳しい砂漠。
- **フロストヴェイル大地**: 戦士の一族が支配する凍ったツンドラ。
- **エメラルド盆地**: エルフや神秘的な生き物が住む緑豊かな森林地帯。
@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)