我想在Google Colaboratory上运行Forge Neo
!pip install -U protobuf
!pip uninstall -y tensorflow tensorflow-cpu tensorflow-gpu tf-keras
!pip install -U "protobuf\>=5.28.0"
!pip install gradio-rangeslider
%cd /content/sd-webui-forge-neo
!python launch.py --share
我尝试按照上面的语法在Colab上安装forge-neo以运行ZIT,但我遇到了下面的错误,无法生成图像。
当我向ChatGPT询问时,它让我检查“ControlNet的 Resize / Processor Resolution”是否被设置为 -1,但由于这个错误,该选项甚至没有出现。我已经尽我所能让它运行,但这已经变成了一个无休止的循环。请帮忙。
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/gradio/routes.py", line 1298, in predict
output = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/gradio/route_utils.py", line 354, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/gradio/blocks.py", line 2187, in process_api
inputs = await self.preprocess_data(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/gradio/blocks.py", line 1849, in preprocess_data
processed_input.append(block.preprocess(inputs_cached))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/gradio/components/slider.py", line 163, in preprocess
Number.raise_if_out_of_bounds(payload, self.minimum, self.maximum)
File "/usr/local/lib/python3.12/dist-packages/gradio/components/number.py", line 129, in raise_if_out_of_bounds
raise Error(f"Value {num} is less than minimum value {minimum}.")
gradio.exceptions.Error: 'Value -1 is less than minimum value 64.'
解决方案
楼主省略了很多细节,例如 launch.py 的内容,而且我无法 重现 那个错误。
我执行了 mkdir 以创建一个新目录,然后用 cd 进入该目录,接着在MacOS Tahoe 26.3(这不是Linux)上执行了以下命令。
uv init --python python3.13
uv add gradio-rangeslider protobuf tensorflow tf-keras
source .venv/bin/activate
python -c 'import gradio, tensorflow
它们执行成功,没有报错,安装了以下库:
% uv pip list | egrep 'gradio|proto|tensor|tf'
gradio 5.50.0
gradio-client 1.14.0
gradio-rangeslider 0.0.8
protobuf 7.35.1
tensorflow 2.21.0
tf-keras 2.21.0
也许你更愿意使用一个更新的CPython解释器。
站内所有文章版权归属LeftHeroAI导航站,无授权禁止任何主体转载、抄袭、复制内容,亦不得私自架设镜像站点。一经侵权,本站将通过法律途径追责。