lllyasviel / lllyasviel/ControlNet
The site cannot be reached issue
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.1k
- Forks
- 3k
- PR merge metrics
- No merged PRs in 30d
Description
Hi Team,
I am trying to run the seg2image.py file to try some segmentation image to image translation tasks. I was able to install the packages successfully. For all the other libraries I had used the most recent ones and only for gradio, I had used the latest 3.X version (3.50.2).
I had some issues in loading the .pth file, after downloading from huggingface with the position_ids item, so I changed this command a bit in the gradio_seg2image.py file:
state_dict = load_state_dict('./models/control_sd15_seg.pth', location='cuda')
state_dict = { k: v for k, v in state_dict.items() if 'position_ids' not in k } #Changed line
model.load_state_dict(state_dict)
This was the only change I did in the code.
After installing all the relevant libraries I ran the following command and got these results. Could you please help if you are aware of the resolution.
(controlnet) C:\Users\projects\ML\ControlNet\ControlNet>python gradio_seg2image.py
logging improved.
Use Checkpoint: False
Checkpoint Number: [0, 0, 0, 0]
Use global window for all blocks in stage3
load checkpoint from local path: C:\Users\princ\Documents\ControlNet\ControlNet\annotator\ckpts\upernet_global_small.pth
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_sd15_seg.pth]
C:\Users\princ\Documents\ControlNet\ControlNet\gradio_seg2image.py:94: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
result_gallery = gr.Gallery(label='Output', show_label=False, elem_id="gallery").style(grid=2, height='auto')
C:\Users\princ\Documents\ControlNet\ControlNet\gradio_seg2image.py:94: GradioDeprecationWarning: The 'grid' parameter will be deprecated. Please use 'columns' in the constructor instead.
result_gallery = gr.Gallery(label='Output', show_label=False, elem_id="gallery").style(grid=2, height='auto')
Running on local URL: http://0.0.0.0:7860
To create a public link, set `share=True` in `launch()`.
On opening the URL on the browser, I got the following error:

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 by running python gradio_seg2image.py with the reported environment and opening http://0.0.0.0:7860 in a browser. Read gradio_seg2image.py around the Gallery setup and launch call, then compare the resulting browser error with the attached screenshot. Done means identifying the cause of the site-access failure and documenting or implementing a verified resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- huggingface, python
- Domain
- computer-vision, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100