lllyasviel / ControlNet

Let us control diffusion models!
Apache License 2.0
30.67k stars 2.75k forks source link

The site cannot be reached issue #649

Open princepatrick opened 9 months ago

princepatrick commented 9 months ago

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: controlnet_load_issue

HangWeiLiang commented 8 months ago

I have the same error

loanBRNT commented 8 months ago

just replace 0.0.0.0 by localhost in your search bar

Jacky-MYQ commented 3 months ago

just replace 0.0.0.0 by localhost in your search bar只需在搜索栏中将0.0.0.0替换为localhost即可

wow! It's ok! Thank you!