lllyasviel / lllyasviel/FramePack

Help Needed: TypeError: argument of type 'bool' is not iterable with Gradio in FramePack

Open
#425 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
17.3k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Dear lllyasviel,

I hope this message finds you well. I’m reaching out to seek your assistance with an issue I’m encountering while running the FramePack project (demo_gradio.py) on my system. I’ve been trying to resolve this for several days but haven’t been able to make progress, and I’d greatly appreciate your expertise.

Environment Details
Operating System: WSL (Ubuntu 22.04)
Python Version: 3.10
Gradio Version: 5.4.0
Other Dependencies:
torch (latest version, compatible with CUDA)
diffusers, transformers, safetensors, numpy, pillow
fastapi, uvicorn (versions unknown, installed as Gradio dependencies)
Project: FramePack (demo_gradio.py), for image-to-video generation
Issue Description
When I run demo_gradio.py and access the Gradio interface (http://127.0.0.1:7862), I encounter a 500 Server Error with the following traceback:

text

複製
TypeError: argument of type 'bool' is not iterable
File "/home/kaworukevin/framepack_new/framepack/framepack_env_CUDA/lib/python3.10/site-packages/gradio/client/utils.py", line 880, in get_type
if "const" in schema:
This error occurs even after I’ve minimized the Gradio components in the script to only the essentials (gr.Image, gr.Textbox, gr.Button, and gr.Video), removing all non-essential components and parameters (like info, elem_classes, etc.).

Steps I’ve Taken
Minimized Gradio Components: I simplified the script to only include basic components, removing gr.Dataset, gr.HTML, gr.Group, gr.Slider, and gr.Checkbox. However, the error persists.
Tried Different Gradio Versions:
Downgraded to Gradio 4.44.0, but the issue remained.
Upgraded back to Gradio 5.4.0 (since I successfully ran the script with this version on April 29th or 28th, 2025), but the error still occurs.
Fixed Other Issues:
Resolved ValueError: When localhost is not accessible by monkey-patching httpx.head.
Fixed WSL IP and port forwarding issues, ensuring the Gradio server starts correctly.
Fixed AttributeError: Cannot call click outside of a gradio.Blocks context by moving event bindings inside the with block: context.
Confirmed CUDA Acceleration: I’ve installed acceleration plugins (likely torch.compile), and there are no CUDA-related errors in the logs.
Background
Interestingly, I successfully ran this script with Gradio 5.4.0 on April 29th or 28th, 2025, in the same environment. However, when I tried running it again recently, I started encountering this error. I suspect that an update to some dependency (e.g., pydantic, fastapi) might have caused the issue, or there might be a subtle configuration error in the script that I’ve overlooked.

Questions
Have you encountered this TypeError: argument of type 'bool' is not iterable issue with Gradio in FramePack? If so, how did you resolve it?
Can you recommend a specific Gradio version that works reliably with FramePack in a WSL environment with Python 3.10?
Are there specific versions of dependencies (e.g., pydantic, fastapi) that I should use to avoid this error?
Could there be something in the FramePack script causing this issue, even after minimizing the Gradio components?
I’ve attached the latest log file (framepack_20250501_112617.log) and a screenshot of the error for your reference. I can provide the full script or additional logs if needed.

Thank you so much for your time and help! I’m really looking forward to getting FramePack running again.

Best regards,

Kevin

framepack_20250501_112617.log

Image
framepack_20250501_112617.log

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with demo_gradio.py and the reported traceback in gradio/client/utils.py at get_type, then reproduce the failure with the stated Python, Gradio, and WSL environment. Compare the dependency versions and attached logs to identify the triggering configuration; done means the cause and a verified dependency or script-level resolution are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.