Code Monkey home page Code Monkey logo

flat's Introduction

flat

All-in-one image generation AI (to be...)




Warning

🚧 This is a beta release. Unexpected errors may occur.

If you get an error, please let the developer know.

How to install

👇Click here for installation instructions.

installation.md

Features

AUTOMATIC1111 Stable Diffusion Webui

Launch StableDiffusionWebUI with just a few clicks.

No Python installation or repository cloning required!


Image gallery

Displays generated images in a list with information such as prompts. The image folder can be set freely.

flat's People

Contributors

ddpn08 avatar eltociear avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flat's Issues

【機能提案】Galleryの画像を検索するディレクトリを統合して表示する機能が欲しい

背景

はじめ、Stable Diffusion WebUIのoutputsディレクトリをGalleryのパスに指定していたのですが、グリッド画像がGalleryに入ってしまうのが嫌で、outputs/txt2img-imagesoutputs/img2img-imagesを分けて指定するようにしました。しかし、これだと2つのディレクトリを一度に見たいのにいちいち分けて見なければいけないという状況になっています。

機能の詳細

上の問題を解決するために、全てのディレクトリ(あるいは一部のディレクトリ)を統合して表示する機能が欲しいです。
ご検討よろしくお願いいたします。

【機能提案】キーボードショートカットが欲しい

背景

Gallery内でいくつかの画像の詳細を見たい時にいちいちマウスで操作するのがめんどくさく感じます。Escキーで閉じたいし、左右矢印キーで移動したい感があります。

機能の詳細

以下のショートカットキーが欲しいです。

  • モーダルウィンドウをEscキーで閉じる
  • 矢印キーで次の画像・前の画像に移動する

【バグ報告】GalleryのImagesで「お気に入り」タブを開いてもお気に入りの画像の一部しか表示されない

開発お疲れ様です。
以下のようなバグを発見したので報告させて頂きます。

状況

タイトル通りお気に入り画像の一部しか(あるいは何も)表示されませんでした。

推測される原因

画像をローカルからn件ずつ読み込んで表示させていると思うのですが、最初のn件の中のお気に入りの画像しか取得できていないように思われます。
お気に入り画像の枚数が少ないために無限スクロールでの画像の取得がうまくいかずに一部しか表示されないという現象が起こっていると考えられます。

上の原因の解決策

上の原因が真の原因だと仮定した時のボクの考えうる解決策を書き並べておきます。参考程度に活用して頂けると嬉しいです。

方法1. 無限スクロールを改善して枚数が少ない時でもうまく動くように調整する

無限スクロールでのrefetchが発火しないのが原因の一端なのでここを改善するという手があります。

方法2. スクロールが発生する枚数まで自動的に取得する

画像が少なすぎてスクロールバーが出てこず、refetchが発火しないので、そもそもの表示される画像を増やすという手があります。

方法3. 「お気に入り」タブの時は画像を全取得するのではなくお気に入りに保存されているパスの画像のみを読み込む

そもそもローカルの画像を一覧で読み込むのではなく、保存されているお気に入り画像のパスから画像を読み込むことでこの問題を回避できます。さらにローカルの画像一覧を取得するという作業を伴わないので若干の軽量化が見込めます。
ただし影響範囲が方法1と方法2に比べて大きい(気がする)ので一長一短かもしれません。

【バグ報告】検索を行う際に、抽出条件を満たす画像の一部が表示されなかった

お疲れ様です。
不具合と思われる事象が発生しました。
お手数かと存じますが、ご確認のほどよろしくお願いします。

発生事象

Gallery - Imagesにて検索を行う際に、抽出条件を満たす画像の一部が表示されなかった。

基本操作

不具合と思われる事象が発生した際に行った操作は下記のとおりです。

  1. Gallery - Configより、画像を保存しているディレクトリを指定する
  2. Gallery - Images - 全てよりプロンプトを指定し、検索ボタンを押下して検索する
  3. 表示される最下部までスクロールし、最後尾の画像を確認する
  4. 検索条件を解除する
  5. 確認した「最後尾の画像」がある地点までスクロールする
  6. さらにスクロールし、検索に用いたプロンプトを含む画像があるか確認する
    --以上--
    上記の操作により、検索時の「最後尾の画像」のさらに後ろに、検索時のプロンプトが含まれることが確認された。

仕様環境についての情報

不具合とみられる事象が発生した際の使用状況は下記のとおりです。

  • OS : Windows 11 Home
  • CPU : Intel(R) Core(TM) is-4100M CPU @ 2.50GHz
  • メモリ容量 : 4GB
  • ディスク種別 : SSD
  • ディスクサイズ : 128GB
  • ディレクトリ配置場所 : Google Drive

考察

おそらく今回の事象の条件(少なくともその1つ)は、「表示対象の画像が単一のディレクトリの直下に配置されているのではなく、複数のディレクトリに分散している」ことではないかと推測します。
※追加確認を参照

追加確認

今回の事象の原因を探るため、下記のように2つの仮説を設け追加で確認を行った。

仮説1 画像の配置場所が分散していること

ディレクトリの指定を次のパターンで行った。

  1. 直下に画像ファイルのみが含まれるディレクトリを1つ登録する
  2. 直下に画像ファイルのみが含まれるディレクトリを2つ登録する
  3. 直下に画像ファイルのみが含まれるディレクトリが、複数下位に配置されているディレクトリを1つ登録する。
    →パターン2, 3で事象が発生した。他方でパターン1では発生しなかった。
    おそらく原因と推測される

仮説2 検索方法があいまい検索ではない

  • Cirno がプロンプトに含まれる画像を保管したディレクトリを指定する
  • 検索条件にirを指定する
  • プロンプトにCirnoを含むが、それ以外にirを含む単語が含まれない画像が抽出される
    おそらく原因ではない

備考

恐縮ながら、諸事情によりいわゆるエビデンス画像の添付は断念いたしました。

【バグ報告】FlatからwebUIが起動できなくなった

開発お疲れ様です。
起動できていたwebUIが起動できなくなってしまいました。お手数かと存じますが、確認のほどよろしくお願いします。

発生事象
WebUIを起動をクリックしたところ
以下のエラーが表示されるようになりました。

Python 3.10.0 | packaged by conda-forge | (default, Nov 10 2021, 13:20:59) [MSC v.1916 64 bit (AMD64)]
Version: v1.6.0

Commit hash: 5ef669de080814067961f28357256e8fe27544f4

Launching Web UI with arguments: --ckpt-dir C:\Users\harum\AppData\Roaming\flat\features\stable-diffusion-webui\repository\models\Stable-diffusion --embeddings-dir C:\Users\harum\AppData\Roaming\flat\features\stable-diffusion-webui\repository\embeddings --hypernetwork-dir C:\Users\harum\AppData\Roaming\flat\features\stable-diffusion-webui\repository\models\hypernetworks --xformers --port 60031

False

===================================BUG REPORT===================================

C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\bitsandbytes\cuda_setup\main.py:166: UserWarning: Welcome to bitsandbytes. For bug reports, please run

python -m bitsandbytes

warn(msg)

C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\bitsandbytes\cuda_setup\main.py:166: UserWarning: C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui did not contain ['libcudart.so', 'libcudart.so.11.0', 'libcudart.so.12.0'] as expected! Searching further paths...

warn(msg)

==============================================================================
The following directories listed in your path were found to be non-existent: {WindowsPath('C')}

CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths...

The following directories listed in your path were found to be non-existent: {WindowsPath('/usr/local/cuda/lib64')}

DEBUG: Possible options found for libcudart.so: set()

CUDA SETUP: PyTorch settings found: CUDA_VERSION=118, Highest Compute Capability: 8.6.

CUDA SETUP: To manually override the PyTorch CUDA version please see:https://github.com/TimDettmers/bitsandbytes/blob/main/how_to_use_nonpytorch_cuda.md

CUDA SETUP: Loading binary C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\bitsandbytes\libbitsandbytes_cuda118.so...

argument of type 'WindowsPath' is not iterable

CUDA SETUP: Problem: The main issue seems to be that the main CUDA runtime library was not detected.

CUDA SETUP: Solution 1: To solve the issue the libcudart.so location needs to be added to the LD_LIBRARY_PATH variable

CUDA SETUP: Solution 1a): Find the cuda runtime library via: find / -name libcudart.so 2>/dev/null

CUDA SETUP: Solution 1b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_1a

CUDA SETUP: Solution 1c): For a permanent solution add the export from 1b into your .bashrc file, located at ~/.bashrc

CUDA SETUP: Solution 2: If no library was found in step 1a) you need to install CUDA.

CUDA SETUP: Solution 2a): Download CUDA install script: wget https://github.com/TimDettmers/bitsandbytes/blob/main/cuda_install.sh

CUDA SETUP: Solution 2b): Install desired CUDA version to desired location. The syntax is bash cuda_install.sh CUDA_VERSION PATH_TO_INSTALL_INTO.

CUDA SETUP: Solution 2b): For example, "bash cuda_install.sh 113 ~/local/" will download CUDA 11.3 and install into the folder ~/local

Traceback (most recent call last):

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\transformers\utils\import_utils.py", line 1086, in _get_module

return importlib.import_module("." + module_name, self.name)

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\importlib_init_.py", line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "", line 1050, in _gcd_import

File "", line 1027, in _find_and_load

File "", line 1006, in _find_and_load_unlocked

File "", line 688, in _load_unlocked

File "", line 883, in exec_module

File "", line 241, in _call_with_frames_removed

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\transformers\modeling_utils.py", line 85, in

from accelerate import version as accelerate_version

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\accelerate_init_.py", line 3, in

from .accelerator import Accelerator

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\accelerate\accelerator.py", line 35, in

from .checkpointing import load_accelerator_state, load_custom_state, save_accelerator_state, save_custom_state

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\accelerate\checkpointing.py", line 24, in

from .utils import (

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\accelerate\utils_init_.py", line 131, in

from .bnb import has_4bit_bnb_layers, load_and_quantize_model

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\accelerate\utils\bnb.py", line 42, in

import bitsandbytes as bnb

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\bitsandbytes_init_.py", line 6, in

from . import cuda_setup, utils, research

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\bitsandbytes\research_init_.py", line 1, in

from . import nn

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\bitsandbytes\research\nn_init_.py", line 1, in

from .modules import LinearFP8Mixed, LinearFP8Global

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\bitsandbytes\research\nn\modules.py", line 8, in

from bitsandbytes.optim import GlobalOptimManager

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\bitsandbytes\optim_init_.py", line 6, in

from bitsandbytes.cextension import COMPILED_WITH_CUDA

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\bitsandbytes\cextension.py", line 20, in

raise RuntimeError('''

RuntimeError:

CUDA Setup failed despite GPU being available. Please run the following command to get more information:

python -m bitsandbytes

Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them

to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes

and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "C:\Users\harum\AppData\Roaming\flat\features\stable-diffusion-webui\repository\launch.py", line 48, in

main()

File "C:\Users\harum\AppData\Roaming\flat\features\stable-diffusion-webui\repository\launch.py", line 44, in main

start()

File "C:\Users\harum\AppData\Roaming\flat\features\stable-diffusion-webui\repository\modules\launch_utils.py", line 432, in start

import webui

File "C:\Users\harum\AppData\Roaming\flat\features\stable-diffusion-webui\repository\webui.py", line 13, in

initialize.imports()

File "C:\Users\harum\AppData\Roaming\flat\features\stable-diffusion-webui\repository\modules\initialize.py", line 16, in imports

import pytorch_lightning # noqa: F401

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\pytorch_lightning_init_.py", line 35, in

from pytorch_lightning.callbacks import Callback # noqa: E402

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\pytorch_lightning\callbacks_init_.py", line 14, in

from pytorch_lightning.callbacks.batch_size_finder import BatchSizeFinder

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\pytorch_lightning\callbacks\batch_size_finder.py", line 24, in

from pytorch_lightning.callbacks.callback import Callback

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\pytorch_lightning\callbacks\callback.py", line 25, in

from pytorch_lightning.utilities.types import STEP_OUTPUT

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\pytorch_lightning\utilities\types.py", line 27, in

from torchmetrics import Metric

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\torchmetrics_init_.py", line 14, in

from torchmetrics import functional # noqa: E402

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\torchmetrics\functional_init_.py", line 82, in

from torchmetrics.functional.text.bleu import bleu_score

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\torchmetrics\functional\text_init_.py", line 30, in

from torchmetrics.functional.text.bert import bert_score # noqa: F401

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\torchmetrics\functional\text\bert.py", line 24, in

from torchmetrics.functional.text.helper_embedding_metric import (

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\torchmetrics\functional\text\helper_embedding_metric.py", line 26, in

from transformers import AutoModelForMaskedLM, AutoTokenizer, PreTrainedModel, PreTrainedTokenizerBase

File "", line 1075, in _handle_fromlist

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\transformers\utils\import_utils.py", line 1076, in getattr

module = self._get_module(self._class_to_module[name])

File "C:\Users\harum\AppData\Roaming\flat\miniconda\envs\stable-diffusion-webui\lib\site-packages\transformers\utils\import_utils.py", line 1088, in _get_module

raise RuntimeError(

RuntimeError: Failed to import transformers.modeling_utils because of the following error (look up to see its traceback):

CUDA Setup failed despite GPU being available. Please run the following command to get more information:

python -m bitsandbytes

Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them

to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes

and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues

バグが発生した状況
2023/09/01の12時ごろ自作LORAを導入しようとしていた過程で急にflatから起動できなくなりました。
それより以前は問題なく起動できていました。
また「webui-user.bat」からは起動できます。
再起動などを繰り返しましたが、解決しませんでした。
CUDAというものをインストールしないとダメなのでしょうか?

プログラムやPC環境に疎く、バグ報告というより質問のような形になってしまい申し訳ございません。
よろしくお願いします。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.