NovelAI リークモデルに関する調査メモ

NovelAIは、2022年10月に独自のStable Diffusion派生モデルによる画像生成サービスをリリースした。 Image Generation has arrived, NovelAI Diffusion is here! | Medium しかし、このサービスに使われているとみられる生成モデルが流出してしまった。 animefull-final-pruned: sha256 925997e9 animesfw-final-pruned: sha256 1d4a34af animevae.pt: sha256 f921fb3f 現在では、Stable Diffusion派生の異なるモデルを合成する、モデルマージと呼ばれる手法など、 様々な手法により生まれた「NovelAIリーク派生モデル」とみられるモデルが流通してしまっている。 NovelAIリーク派生モデルとみられるモデルの例 Anything V3/V5 Anything V4 OrangeMixs 関連リンク Welcome to sdupdates Discussions! · questianon/sdupdates · Discussion #1 · GitHub New (suspected) NAI model leak - AnythingV3.0 and VAE for it · AUTOMATIC1111/stable-diffusion-webui · Discussion #4516 · GitHub Emulate NovelAI · AUTOMATIC1111/stable-diffusion-webui · Discussion #2017 Anything v4.5 VAE swapped · AUTOMATIC1111/stable-diffusion-webui · Discussion #7044 AIの著作権問題が複雑化 - 週刊アスキー 高杉 光一🦋 @14:59さんはTwitterを使っています: 「画像生成AI界隈でよく使われるモデルの系列調査 いわゆる"アスカチャレンジ"です 元々はNovelAIとリークNAIの関係調査に使われたものです それを手持ちのすべてのSD1.4系メジャーモデルに当てはめたのがこちらとなります 画質はご容赦を #AIart #waifudiffusion #anythingv3 #ACertainThing https://t.co/6aP8g0q4pz」 / Twitter

2023年4月15日 · aoirint

Stable Diffusion + LoRA に関するメモ

LoRA(Low-Rank Adaptation)は、2021年にEdward Huらが提案した、大規模言語モデルを効率的にFine tuningする手法。 https://github.com/microsoft/LoRA https://arxiv.org/abs/2106.09685 An important paradigm of natural language processing consists of large-scale pretraining on general domain data and adaptation to particular tasks or domains. As we pre-train larger models, full fine-tuning, which retrains all model parameters, becomes less feasible. Using GPT-3 175B as an example – deploying independent instances of fine-tuned models, each with 175B parameters, is prohibitively expensive. We propose Low-Rank Adaptation, or LoRA, which freezes the pretrained model weights and injects trainable rank decomposition matrices into each layer of the Transformer architecture, greatly reducing the number of trainable parameters for downstream tasks. Compared to GPT-3 175B fine-tuned with Adam, LoRA can reduce the number of trainable parameters by 10,000 times and the GPU memory requirement by 3 times. LoRA performs on-par or better than finetuning in model quality on RoBERTa, DeBERTa, GPT-2, and GPT-3, despite having fewer trainable parameters, a higher training throughput, and, unlike adapters, no additional inference latency. We also provide an empirical investigation into rank-deficiency in language model adaptation, which sheds light on the efficacy of LoRA. We release a package that facilitates the integration of LoRA with PyTorch models and provide our implementations and model checkpoints for RoBERTa, DeBERTa, and GPT-2 at https://github.com/microsoft/LoRA. ...

2023年4月15日 · aoirint

Stable Diffusion Web UIと関連ツール・モデルに関するメモ

Stable Diffusion Web UI (AUTOMATIC1111) 推論時に使う基本となるWeb UI。専用の拡張機能を導入できる。 拡張機能の中には、推論機能の拡張のほか、訓練データの準備に使えるものもある。 https://github.com/AUTOMATIC1111/stable-diffusion-webui Current Commit Hash: 22bcc7be https://github.com/aoirint/stable-diffusion-webui-docker 拡張機能 Generate-TransparentIMG https://github.com/hunyaramoke/Generate-TransparentIMG Current Commit Hash: 6059579e stable-diffusion-webui-wd14-tagger https://github.com/toriato/stable-diffusion-webui-wd14-tagger Current Commit Hash: 3ba3a735 sd-webui-lora-block-weight https://github.com/hako-mikan/sd-webui-lora-block-weight Current Commit Hash: 9bd7fa16 a1111-sd-webui-locon https://github.com/KohakuBlueleaf/a1111-sd-webui-locon Current Commit Hash: 8e0ebd76 a1111-sd-webui-tagcomplete https://github.com/DominikDoom/a1111-sd-webui-tagcomplete Current Commit Hash: 15538336 Not working? モデル Waifu Diffusion Stable Diffusionベースのアニメ絵に特化した学習済みモデル。haru氏らによって作成、公開されている。 モデル ベースモデル リリースノート Waifu Diffusion 1.3 Stable Diffusion 1.4 Gist Waifu Diffusion 1.4 Stable Diffusion 2.1 Gist Waifu Diffusion 1.5 Beta 2 Stable Diffusion 2.1 Notion Anything Stable Diffusionベースのアニメ絵に特化した学習済みモデル。NovelAIリーク派生モデルとみられる。 ...

2023年2月26日 · aoirint

「VOICEVOX OSS 放送 第2回」に出演しました

VOICEVOXプロジェクトオーナーのヒホさんにお声がけいただいて、 VOICEVOXの新機能であるマルチエンジン機能をユーザと開発者に紹介する趣旨で、2023年2月4日(土)の生放送に開発者ゲストとして出演しました。アーカイブは、ニコニコ動画のプレミアム会員であれば、2月11日(土) 23:59まで視聴できます。 【VOICEVOX OSS 放送 第2回】マルチエンジン実装 - 2023/2/4(土) 21:00開始 - ニコニコ生放送 📢VOICEVOX OSS 放送の告知 📢 2月4日(土)の21時から、VOICEVOXのマルチエンジン機能を、メインで実装してくださったおふたりをゲストに招いてご紹介する放送をします! VOICEVOXのコントリビューターの方はもちろん、VOICEVOXのOSS活動にご興味ある方もぜひお越しください! https://live.nicovideo.jp/watch/lv340125951 — ヒホ(ヒロシバ)🗑️ (@hiho_karuta) January 31, 2023 VOICEVOXとは VOICEVOX(ボイスボックス)は、ヒホ氏が2021年8月にリリースした無料の音声合成ソフトで、キャラクターの要素を含まない部分がOSS化されており、現在GitHub上でオープンに開発が行われています。 用途としては主に、ニコニコ動画やYouTubeなどの動画投稿サイトで、ゲーム実況やキャラクター劇場、解説などの読み上げ音声として使われています。2023年2月9日 1:31時点で、ニコニコ動画上には関連する動画が48000件ほど投稿されています。 VOICEVOX | 無料のテキスト読み上げソフトウェア キーワードで動画検索 VOICEVOX - ニコニコ動画 経緯 VOICEVOXには、2021年9月から個人でコントリビュートしており、2021年12月からレビュワーをしています。これまで、主に以下のような貢献をしています。 GitHub Actionsによる自動ビルドパイプラインの構築 Linux対応 Docker対応 マルチエンジン機能の設計 マルチエンジン機能とは VOICEVOXは、主にエディタ・エンジン・コアの3つのコンポーネントからなっています(詳細はGitHub上の全体構成を参照)。 ソースコードが公開されていることから、VOICEVOXと互換性のあるAPIを持ち、VOICEVOXのUIを再利用した音声合成ソフト(ボイボ系ソフト)がいくつかリリースされています。 COEIROINK(コエイロインク): シロワニさん LMROID(レミロイド): のほしおさん SHAREVOX(シェアボックス): Yちゃん ITVOICE(イタボイス): いたほびさん 🎉 マルチエンジン機能が実装されました! これまでボイボ系ソフトは、複数のキャラクター音声を生成するために複数のソフトを起動する必要がありました。 マルチエンジン機能により、VOICEVOX API に準拠している別々のエンジンのキャラクターが、1つのソフトに集まれるようになりました。 — VOICEVOX (@voicevox_pj) January 31, 2023 今回のマルチエンジン機能は、ボイボ系ソフトのエディタが、これまで自身のブランドのエンジンにしか接続できなかったものを、異なるボイボ系ソフトのエンジンにも接続できるようにするものです。上のリリース告知ツイートに添付された画像による図解を見ると、イメージしやすいです。 マルチエンジン機能の実装には1年ほどかかりましたが、2021年12月ごろから仕様の検討やエディタの内部APIの改修を進めており、その後、UIの主要な変更やエンジン側のAPIの検討・実装を主に名無し。さんやtakana-vさんが進めてくださり、リリースにこぎ着けました。 ...

2023年2月9日 · aoirint

自宅サーバのDocker NetworkのIPアドレスプールが枯渇した

https://twitter.com/aoirint/status/1617993934625722368 弊自宅サーバでは、サーバソフトウェアや定期実行プログラムのデプロイに、基本的にDocker Composeを使用しています。 先日、新しいソフトウェアをDocker Composeでデプロイしようとして、以下のエラーが発生しました。 Error response from daemon: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network Docker Networkが使用するIPアドレスプールが枯渇し、新しいIPアドレスブロックを確保できなかったという内容のエラーです。 環境 Ubuntu 20.04 $ docker -v Docker version 20.10.23, build 7155243 $ docker compose version Docker Compose version v2.15.1 原因 このエラーは、30個程度のDocker Networkを作成すると発生するようです。 Docker Composeでは通常、プロジェクト1つあたり、1つのDocker Networkが作成されます(複雑なプロジェクトでは、2つ以上使用することがあるかもしれません)。 手元の環境では、Docker Composeのプロジェクトが27個稼働しており、28個目のプロジェクトを起動したときにエラーが発生しました。 Docker Networkの一覧は、以下のコマンドで確認できます。 docker network ls Docker NetworkのIPアドレスには、いわゆるプライベートIPアドレスの範囲が使用されます。 プライベートIPアドレスの範囲は、以下のようになります(CIDR表記)。 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 作成されたDocker Networkに割り当てられたIPレンジはdocker network inspectコマンドで確認できます。 以下の記事で紹介されているコマンドが便利です。 ...

2023年1月26日 · aoirint

HashiCorpのapt GPGキーを更新する

$ sudo apt update Err:2 https://apt.releases.hashicorp.com focal InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AA16FCBCA621E701 W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://apt.releases.hashicorp.com focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AA16FCBCA621E701 W: Failed to fetch https://apt.releases.hashicorp.com/dists/focal/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AA16FCBCA621E701 W: Some index files failed to download. They have been ignored, or old ones used instead. https://developer.hashicorp.com/terraform/cli/install/apt wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list

2023年1月25日 · aoirint

自宅ネットワークのbind9をdocker composeに移行した

自宅ネットワークのbind9をdocker compose化したので記録。 これまでホストで直接動かしていたけれど、OOM Killerか何かに3,4日に1度くらいでキルされていたので不便だった これでdocker composeのrestart機構で再起動がかかるようになる systemdのrestart機構ワカラナイ Dockerイメージ: https://hub.docker.com/r/ubuntu/bind9 コード docker-compose.yml services: bind9: image: ubuntu/bind9:9.18-22.04_beta restart: always ports: - "0.0.0.0:53:53/udp" volumes: - "./volumes/bind_etc/named.conf.local:/etc/bind/named.conf.local:ro" - "./volumes/bind_etc/named.conf.options:/etc/bind/named.conf.options:ro" - "./volumes/bind_var_cache:/var/cache/bind:rw" - "./volumes/bind_var_lib:/var/lib/bind:rw" environment: - "TZ=Asia/Tokyo" - "BIND9_USER=bind" # UID=101 volumes/bind_etc/named.conf.options acl my-network { 10.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16; localhost; }; options { directory "/var/cache/bind"; response-policy { zone "rpz"; }; allow-query { any; }; allow-recursion { my-network; }; allow-query-cache { my-network; }; dnssec-validation auto; forward only; forwarders { # ISP DNS1; # ISP DNS2; 8.8.8.8; 8.8.4.4; 1.1.1.1; }; } volumes/bind_etc/named.conf.local zone "example.com" IN { type master; file "example.com.zone"; }; zone "rpz" { type master; file "rpz.zone"; allow-query { none; }; }; volumes/bind_var_cache/example.com.zone $ORIGIN example.com. $TTL 3600 @ IN SOA ns.example.com. root.example.com ( 2023012500 ; Serial 3600 ; Refresh 900 ; Retry 604800 ; Expire 86400 ; Minimum ) IN NS ns.example.com. ns IN A 127.0.0.1 @ IN A 127.0.0.1 sub IN CNAME example.com. volumes/bind_var_cache/rpz.zone $TTL 3600 @ IN SOA localhost. root.localhost. ( 2023012500 ; Serial 3600 ; Refresh 900 ; Retry 604800 ; Expire 86400 ; Minimum ) IN NS localhost. ; block malicious domains malicious.example.com A 0.0.0.0 既知の問題 libvirt dnsmasqが53/udpを先に取ると動かなくなりそう? ホストのbind9をアンインストール sudo apt purge bind9 sudo rm -rf /var/cache/bind/

2023年1月25日 · aoirint

TwitterのふぁぼとPixivのブクマを保存するスクリプト

https://github.com/aoirint/twifavoritedl https://github.com/aoirint/xivbookmarkdl

2023年1月18日 · aoirint

aoirint.com 個人用メールサーバ

2022-12-09より、aoirint.comにて、個人用メールサーバの運用を始めました。 aoirint.comアドレス宛てにメールが送信できない、受信できない、不正中継されている、セキュリティ上の問題などがあれば、Twitter、Mastodon、Keybaseなどにご連絡ください。 更新履歴 2022-12-09 運用開始 構成 DNS DNSでは、MXレコード、SPFレコードを設定しています。 外部からのメールを内部に転送するSMTPサーバ mx01.aoirint.com SMTP 暗号化 STARTTLS(必須) 認証 なし ホスト名(TLS証明書のコモンネーム) mx01.aoirint.com ポート番号 25 外部へのメール送信 禁止 SMTPS 暗号化 暗黙的TLS 認証 なし ホスト名(TLS証明書のコモンネーム) mx01.aoirint.com ポート番号 465 外部へのメール送信 禁止 外部にメールを送信するSMTPサーバ smtp.aoirint.com Submission 暗号化 STARTTLS(必須) 認証 平文パスワード ホスト名(TLS証明書のコモンネーム) smtp.aoirint.com ポート番号 587 外部へのメール送信 許可(認証必須) IMAPサーバ imap.aoirint.com IMAPS 暗号化 暗黙的TLS 認証 平文パスワード ホスト名(TLS証明書のコモンネーム) imap.aoirint.com ポート番号 993 POP3サーバ pop.aoirint.com POP3S 暗号化 暗黙的TLS 認証 平文パスワード ホスト名(TLS証明書のコモンネーム) pop.aoirint.com ポート番号 995

2022年12月9日 · aoirint

HTTPリクエストからOriginヘッダを削除(Manifest V3 Chrome拡張, Chrome 101+)

動作環境 Google Chrome 108 Manifest V3 内容 Chrome拡張から送られるHTTPリクエストについて、 ローカルで動くHTTPサーバhttp://127.0.0.1:8000のOriginチェックを回避するため、 Originヘッダを削除します。 declarativeNetRequest機能を使用します。manifest.jsonのpermissionsにdeclarativeNetRequestWithHostAccess(Chrome 96+)の追記が必要です。 加工するHTTPリクエストを、この拡張機能から送られるHTTPリクエストに絞るため、initiatorDomainsオプション(Chrome 101+)を使用しています。将来的に、より厳密な検査ができるオプションが追加される可能性があります。 chrome.declarativeNetRequestのドキュメント: https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/ また、CORSを回避するには、manifest.jsonのhost_permissionsにhttp://127.0.0.1:8000/*を追記します。 https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/host_permissions XMLHttpRequest and fetch access to those origins without cross-origin restrictions (though not for requests from content scripts, as was the case in Manifest V2). background.js // license: CC0 chrome.declarativeNetRequest.updateDynamicRules({ removeRuleIds: [1], addRules: [ { id: 1, priority: 1, action: { type: 'modifyHeaders', requestHeaders: [ { 'header': 'Origin', 'operation': 'remove' }, ], }, condition: { urlFilter: '127.0.0.1:8000/*', initiatorDomains: [chrome.runtime.id], // chrome-extension://{extension_id} }, }, ], })

2022年12月7日 · aoirint