NokiMo
Aitrepreneur
Aitrepreneur

patreon


1-Click INSTALL FLUX PROMPT GENERATOR

Hey everyone! I've created a 1-click installer for the super cool and useful Flux Prompt Generator that allows you to generate and expand your prompt for Flux from either an image or from some basic simple text.

The installer of course automates the entire install process for the tool!

Here's how it works:

1. Download the FLUX_PROMPTER_AUTO_INSTALL.bat

2. Create a new folder on your computer and place the file inside

3. Launch the FLUX_PROMPTER_AUTO_INSTALL.bat file to begin the install

4. To use it you can either use a Groq Api key
Inside the app.py file, On line 337: self.groq_client = Groq(api_key="YOUR-GROQ-API-KEY") replace YOUR-GROQ-API-KEY by your API GROQ Key if you wanna use Groq for the text generation.

OR

IF YOU WANT TO USE EVERYTHING LOCALLY:

Download and install ollama: https://ollama.com/

Once Ollama is running in the background, download the Llama 3 8B model by running this command in a new cmd window:

ollama run llama3

Once the llama 3 8B model is downloaded, go in the Flux prompter, check the "Use Ollama (local)" checkbox and you are good to go.


Also do not forget to put the launcher.bat file inside the folder so that you can easily launch it the next time you want to use it 😉


You can also use the online version if you need it

As always, supporting me on Patreon allows me to keep creating helpful resources like this for the community. Thank you for your support - now go have some fun😉!

1-Click INSTALL FLUX PROMPT GENERATOR

Comments

Is there somewhere I can access the tutorial video?

Big Moose

It would be nice to have some .sh onclick installer for people not on windows or server installation🙏🙏

VitalClean

Hi I just installed this prompt gen and is great thanks for the post ... but I had a thought I have been wanting to try the silly taverns items from earlyer is ths LLM suitable to run sillytavern locally ?

McNutt family

could a multitude of reasons, first open a command prompt window and drag and drop the installer file inside the window, then press enter, this should avoid the window from closing and it will at least give us an error code we can use to troubleshoot the error, make also sure that you have disabled any antivirus/firewall from running and blocking the file/connection. This could also be a bad initial python install, you need to uninstall any of your current python installations and reinstall it correctly. Go to the add and remove programs, search for python and uninstall both the current python version and the python install program. Once this is done, go here and download this installer: https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe Run it and check the “Add python 3.10 to Path” checkbox and continue with the installation. You can check that the right python version is installed by opening a new command prompt window and typing: python --version and it should give you the 3.10.11 version Then just relaunch the 1-click installer in a new folder and try again.

Aitrepreneur

It just closes on me, doesn't give me an error or anything.

Salvador Fonseca

where do I set dark mode? thanks

loughlin john

could a multitude of reasons, first open a command prompt window and drag and drop the installer file inside the window, then press enter, this should avoid the window from closing and it will at least give us an error code we can use to troubleshoot the error, make also sure that you have disabled any antivirus/firewall from running and blocking the file/connection. This could also be a bad initial python install, you need to uninstall any of your current python installations and reinstall it correctly. Go to the add and remove programs, search for python and uninstall both the current python version and the python install program. Once this is done, go here and download this installer: https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe Run it and check the “Add python 3.10 to Path” checkbox and continue with the installation. You can check that the right python version is installed by opening a new command prompt window and typing: python --version and it should give you the 3.10.11 version Then just relaunch the 1-click installer in a new folder and try again.

Aitrepreneur

I was able to make it work. But I had to downgrade the following packages: pip install torch==2.3.1 torchvision==0.18.1 Kept getting error: OSError: [WinError 126] The specified module could not be found Also the Ollama works. I entered the IP address of my self hosted Ollama. Trying it out so far

Victor

I have an Ollama running on a server (Not local), is it possible to put the ip address of the Ollama and port?

Victor

it doesnt open the cmd opens then closes right away

james

you can dl the llama2-uncensored model by running this command in a cmd window: ollama run llama2-uncensored then edit the app.py file on line 544, replace llama3 by llama2-uncensored so that it looks like this: ollama_model = gr.Textbox(label="Ollama Model Name", value="llama2-uncensored", visible=False) then just relaunch the webui

Aitrepreneur

im pretty sure i have dolphin 3.1 llama model, can i swap it or is llama 2 uncensored enough? i have a rtx 4090 if thats a concern with the larger models.

LtCzr

Ok, I'll try that later, thank you.

Otaku_Hedgehog

I was having that problem where nothing would happen with launcher.bat until i moved that file inside the FLUX-Prompt-Generator folder which has the env folder next to it. Now it opens fine.

Kryptonic

Download this: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&channel=Release&version=VS2022&source=VSLandingPage&passive=false&cid=2030 and check the workload "Desktop Development with C++”

Aitrepreneur

Hi K, I got this error during installation: Successfully installed Jinja2-3.1.4 MarkupSafe-2.1.5 PyYAML-6.0.2 Pygments-2.18.0 accelerate-0.33.0 aiofiles-23.2.1 aiohappyeyeballs-2.3.5 aiohttp-3.10.3 aiosignal-1.3.1 altair-5.4.0 annotated-types-0.7.0 anyio-4.4.0 async-timeout-4.0.3 attrs-24.2.0 certifi-2024.7.4 charset-normalizer-3.3.2 click-8.1.7 colorama-0.4.6 coloredlogs-15.0.1 contourpy-1.2.1 cycler-0.12.1 datasets-2.21.0 devicetorch-0.1.12 diffusers-0.28.0 dill-0.3.8 distro-1.9.0 einops-0.8.0 exceptiongroup-1.2.2 fastapi-0.112.0 ffmpy-0.4.0 filelock-3.15.4 fonttools-4.53.1 frozenlist-1.4.1 fsspec-2024.6.1 gekko-1.2.1 gradio-4.32.2 gradio_client-0.17.0 groq-0.9.0 h11-0.14.0 httpcore-1.0.5 httpx-0.27.0 huggingface-hub-0.24.5 humanfriendly-10.0 idna-3.7 importlib_metadata-8.2.0 importlib_resources-6.4.0 jsonschema-4.23.0 jsonschema-specifications-2023.12.1 kiwisolver-1.4.5 markdown-it-py-3.0.0 matplotlib-3.9.2 mdurl-0.1.2 mpmath-1.3.0 multidict-6.0.5 multiprocess-0.70.16 narwhals-1.4.1 networkx-3.3 numpy-1.26.4 optimum-1.21.3 orjson-3.10.7 packaging-24.1 pandas-2.2.2 peft-0.12.0 pillow-10.4.0 protobuf-5.27.3 psutil-6.0.0 pyarrow-17.0.0 pydantic-2.8.2 pydantic_core-2.20.1 pydub-0.25.1 pyparsing-3.1.2 pyreadline3-3.4.1 python-dateutil-2.9.0.post0 python-multipart-0.0.9 pytz-2024.1 referencing-0.35.1 regex-2024.7.24 requests-2.32.3 rich-13.7.1 rouge-1.0.1 rpds-py-0.20.0 ruff-0.5.7 safetensors-0.4.4 semantic-version-2.10.0 sentencepiece-0.2.0 setuptools-75.1.0 shellingham-1.5.4 six-1.16.0 sniffio-1.3.1 starlette-0.37.2 sympy-1.13.2 timm-1.0.8 tokenizers-0.19.1 tomlkit-0.12.0 torch-2.4.0 torchvision-0.19.0 tqdm-4.66.5 transformers-4.43.4 typer-0.12.3 typing_extensions-4.12.2 tzdata-2024.1 urllib3-2.2.2 uvicorn-0.30.6 websockets-11.0.3 xxhash-3.4.1 yarl-1.9.4 zipp-3.20.0 Traceback (most recent call last): File "e:\NET\AI\FLUX-Prompt-Generator\app.py", line 10, in import torch File "e:\NET\AI\FLUX-Prompt-Generator\env\Lib\site-packages\torch\__init__.py", line 148, in raise err OSError: [WinError 126] Uvedený modul nebyl nalezen. Error loading "e:\NET\AI\FLUX-Prompt-Generator\env\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.

BrokenBrush

Ok I did all that. Python is now updated to 3.10.11 on my computer, but I still have the same problem when I try to run LAUNCHER.bat, even after I move it to a new folder.

Otaku_Hedgehog

you need to uninstall any of your current python installations and reinstall it correctly. Go to the add and remove programs, search for python and uninstall both the current python version and the python install program. Once this is done, go here and download this installer: https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe Run it and check the “Add python 3.10 to Path” checkbox and continue with the installation. You can check that the right python version is installed by opening a new command prompt window and typing: python --version and it should give you the 3.10.11 version Then just relaunch the 1-click installer in a new folder and try again.

Aitrepreneur

you need to uninstall any of your current python installations and reinstall it correctly. Go to the add and remove programs, search for python and uninstall both the current python version and the python install program. Once this is done, go here and download this installer: https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe Run it and check the “Add python 3.10 to Path” checkbox and continue with the installation. You can check that the right python version is installed by opening a new command prompt window and typing: python --version and it should give you the 3.10.11 version Then just relaunch the 1-click installer in a new folder and try again.

Aitrepreneur

you need to uninstall any of your current python installations and reinstall it correctly. Go to the add and remove programs, search for python and uninstall both the current python version and the python install program. Once this is done, go here and download this installer: https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe Run it and check the “Add python 3.10 to Path” checkbox and continue with the installation. You can check that the right python version is installed by opening a new command prompt window and typing: python --version and it should give you the 3.10.11 version Then just relaunch the 1-click installer in a new folder and try again.

Aitrepreneur

The system cannot find the path specified. Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

Solutheis

running into an issue stating python isn't installed have the latest version is there a different one required

Solutheis

I got this error while installing J:\CurrentAi\StableComfyD02\FluxPrompter\FLUX-Prompt-Generator>python -m venv env 'python' is not recognized as an internal or external command, operable program or batch file.

Lenny Gordon

Ok, I did that and then CMD gives me this message: "The system cannot find the path specified. python: can't open file 'C:\\Users\\Brandon\\app.py': [Errno 2] No such file or directory"

Otaku_Hedgehog

Anyone get a fix??

Yiluwidi Dreaming

open a cmd window and drag an drop the launcher file inside and run it, it will at least give an error we can use to troubleshoot

Aitrepreneur

@Steve Thanks. This lead me to be able to fix this issue. However, to get the required libomp140.x86_64.dll, I installed Visual Studio 2022 Community version and included the workload "Desktop Development with C++” .

SiCc

Yes I did that, the CMD briefly pops up and then immediately closes.

Otaku_Hedgehog

Once you have installed it with the bat file you put the launcher.bat inside the folder and then launch it from there

Aitrepreneur

same, followed all instructions, but it closes.

LyG

worked for me! Thanks!

Foundation Comics

@Steve This worked!!! Thank you!!!

J

Found a solution that worked for me, your mileage may vary. I was missing libomp140.x86_64.dll in the C:\Windows\System32\ folder downloaded from dll-files.com at https://www.dll-files.com/download/00637fe34a6043031c9ae4c6cf0a891d/libomp140.x86_64.dll.html?c=SFBZZ1pVUEV1c2tUOXh2dzB4WFJJQT09 placed in the system32 folder and it's all working now. I believe the dll is part of the VC_redist.X64 but is not in the present version, so installing older versions may work. Hope this was helpful. Solution found on https://discuss.pytorch.org/t/failed-to-import-pytorch-fbgemm-dll-or-one-of-its-dependencies-is-missing/201969.

Steve Cloke

Same for me

Steve Cloke

Same error.

SiCc

same issue. It opens something and it closes instantly.

Kevin McKinney

I followed your instructions to use the Flux Prompt Generator locally up to the "go in the FLUX prompter" part. How do I open the prompter? I double-clicked on LAUNCHER.bat but nothing happens?

Otaku_Hedgehog

Same error, found a fix yet?

NateMac00

Thanks mate

James Stewart

Ooh yeah building this into the mega all-in-one workflow for flux would be incredible!

Sam Shennan

I got this error: File "E:\AI\Flux\FLUX-Prompt-Generator\app.py", line 10, in import torch File "E:\AI\Flux\FLUX-Prompt-Generator\env\lib\site-packages\torch\__init__.py", line 148, in raise err OSError: [WinError 126] The specified module could not be found. Error loading "E:\AI\Flux\FLUX-Prompt-Generator\env\lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.

Robb

For context I was using the "Joybot" I think it was called, I get a gateway error trying to use it now and cannot confirm that is the proper name.

Kinky Dovahkiin

Hello, it simply could be something else, but is the online model on hugging face different from the local model? It gave me much better prompts from images than the locally run.

Kinky Dovahkiin

Hi, where do I find launch()? I try to make this service accessable in my LAN. Or do i yust add share=True in the launcher.bat like this: CALL env\Scripts\activate share=True

Benni

doh! I always forget about nfsw stuff... but it's easy to fix, for now you can just dl the llama2-uncensored model by running this command in a cmd window: ollama run llama2-uncensored then edit the app.py file on line 544, replace llama3 by llama2-uncensored so that it looks like this: ollama_model = gr.Textbox(label="Ollama Model Name", value="llama2-uncensored", visible=False) then just relaunch the webui, should work now :)

Aitrepreneur

You could yes, technically part of the upscaler uses the Florence model to generate a caption so yes

Aitrepreneur

Hi K, for research purposes of course, I tried the Flux Prompter locally using some NSFW stuff and got this error message: I cannot create explicit content. Is there a different prompt you'd like me to work with? Any way around this?

James Stewart

I have a question, I saw a video from the nerdy roadent that was using LLMs to generate prompts inside comfyUI... can this flux prompt generator be used inside comfyUI as well?

Daniel Cuche

Hey man! finally joined.. firt time here XD..

Daniel Cuche


Related Creators