lllyasviel / lllyasviel/ControlNet
NameError: name 'apply_canny' is not defined
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.1k
- Forks
- 3k
- PR merge metrics
- No merged PRs in 30d
Description
(control) F:\ControlNet-main>python F:\ControlNet-main\gradio_canny2image.py
logging improved.
Enabled sliced_attention.
logging improved.
Enabled clip hacks.
cuda
cuda
No module 'xformers'. Proceeding without it.
ControlLDM: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Loaded model config from [./models/cldm_v15.yaml]
Loaded state_dict from [./models/control_any3_openpose.pth]
Running on local URL: http://0.0.0.0:7861
To create a public link, set share=True in launch().
Traceback (most recent call last):
File "F:\1\envs\control\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "F:\1\envs\control\lib\site-packages\gradio\blocks.py", line 1015, in process_api
result = await self.call_function(
File "F:\1\envs\control\lib\site-packages\gradio\blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "F:\1\envs\control\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "F:\1\envs\control\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "F:\1\envs\control\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "F:\ControlNet-main\gradio_canny2image.py", line 33, in process
detected_map = apply_canny(img, low_threshold, high_threshold)
NameError: name 'apply_canny' is not defined
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with gradio_canny2image.py, especially process at line 33, and inspect the surrounding imports and related Canny-processing entry points. Reproduce the Gradio action that reaches process, then verify it completes without the reported NameError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100