ZenCtrl: Missing requirements

After installing requirements.txt and starting app.py it complains “No module named ‘flux’” pip install flux app.py now gives

Traceback (most recent call last):
  File "D:\Tests\ZenCtrl\ZenCtrl\app\gradio_app.py", line 9, in <module>
    from flux.condition import Condition
ModuleNotFoundError: No module named 'flux.condition'

What version of flux is needed? Can you update requirements.txt for all requirements?

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 28 (12 by maintainers)

Most upvoted comments

pushing in a few hours after some tests , sorry for that ! would love for you to try out and let us know ! i am working on the comfy node too , that might take a bit more time

hey Guys , sorry for being late , we’re checking the scripts making sure the dependencies and requirements are met and will update this in a bit

@saliou-k I also recommend creating a predefined path; See *** Fix lora path below.

@echo off
echo *** Cloning and setup
git clone https://github.com/FotographerAI/ZenCtrl.git
cd ZenCtrl
python -m venv venv
call venv\scripts\activate.bat

echo *** Installing dependencies
pip install --upgrade pip wheel setuptools
pip install torch==2.7.0+cu128 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip install -U "triton-windows>=3.3"
pip install https://huggingface.co/datasets/Softology-Pro/VoC/resolve/main/flash_attn-2.7.4.post1-cp310-cp310-win_amd64.whl
pip install -r requirements.txt

echo *** Setup weights
mkdir weights\zen2con_1440_17000
curl -L https://huggingface.co/fotographerai/zenctrl_tools/resolve/main/weights/zen2con_1440_17000/pytorch_lora_weights.safetensors -o weights\zen2con_1440_17000\pytorch_lora_weights.safetensors

echo *** Fix lora path
echo with open('app/gradio_app.py','r') as f: t=f.read().replace('path/to/weight/pytorch_lora_weights.safetensors','weights/zen2con_1440_17000/pytorch_lora_weights.safetensors'); open('app/gradio_app.py','w').write(t) > fix.py

To avoid “No module named ‘flux,’” I think this is the right way to start is?:

python -m app.gradio_app

Thank you. I had to copy the contents of the app folder to the root directory. Then it finds the needed flux. But now when app starts I get a missing error

Traceback (most recent call last):
  File "D:\Tests\ZenCtrl\ZenCtrl\gradio_app.py", line 119, in <module>
    examples=get_samples(),
  File "D:\Tests\ZenCtrl\ZenCtrl\gradio_app.py", line 101, in get_samples
    return [[Image.open(sample["image"]), sample["text"]] for sample in sample_list]
  File "D:\Tests\ZenCtrl\ZenCtrl\gradio_app.py", line 101, in <listcomp>
    return [[Image.open(sample["image"]), sample["text"]] for sample in sample_list]
  File "D:\Tests\ZenCtrl\ZenCtrl\venv\lib\site-packages\PIL\Image.py", line 3505, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'samples/1.png'

Can you add that to the samples directory so app starts?