radames / Real-Time-Latent-Consistency-Model

App showcasing multiple real-time diffusion models pipelines with Diffusers
https://huggingface.co/spaces/radames/Real-Time-Latent-Consistency-Model
Apache License 2.0
849 stars 100 forks source link

controlnet lora is not working ! #14

Closed kotaxyz closed 8 months ago

kotaxyz commented 8 months ago

i have a problem only imgtoimg works all other options not working here is the log while running controlnet lora

C:\Users\Genesis\Desktop\ai>conda.bat activate ←[32mINFO←[0m: Will watch for changes in these directories: ['C:\Users\Genesis\github\Real-Time-Latent-Consistency-Model'] ←[32mINFO←[0m: Uvicorn running on ←[1mhttp://127.0.0.1:7860←[0m (Press CTRL+C to quit) ←[32mINFO←[0m: Started reloader process [←[36m←[1m15520←[0m] using ←[36m←[1mStatReload←[0m WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.1.0+cu121 with CUDA 1201 (you have 2.1.0+cu118) Python 3.10.11 (you have 3.10.9) Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers) Memory-efficient attention, SwiGLU, sparse and more won't be available. Set XFORMERS_MORE_DETAILS=1 for more details A matching Triton is not available, some optimizations will not be enabled. Error caught was: No module named 'triton' TIMEOUT: 0.0 SAFETY_CHECKER: None MAX_QUEUE_SIZE: 0 device: cuda unet\diffusion_pytorch_model.safetensors not found Loading pipeline components...: 100%|████████████████████████████████████████████████████| 6/6 [00:11<00:00, 1.95s/it] You have disabled the safety checker for <class 'diffusers.pipelines.controlnet.pipeline_controlnet_img2img.StableDiffusionControlNetImg2ImgPipeline'> by passing safety_checker=None. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 . Loading pipeline components...: 100%|████████████████████████████████████████████████████| 6/6 [00:01<00:00, 5.41it/s] You have disabled the safety checker for <class 'diffusers.pipelines.controlnet.pipeline_controlnet_img2img.StableDiffusionControlNetImg2ImgPipeline'> by passing safety_checker=None. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 . unet\diffusion_pytorch_model.safetensors not found Loading pipeline components...: 100%|████████████████████████████████████████████████████| 6/6 [00:16<00:00, 2.74s/it] You have disabled the safety checker for <class 'diffusers.pipelines.controlnet.pipeline_controlnet_img2img.StableDiffusionControlNetImg2ImgPipeline'> by passing safety_checker=None. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .

===================================BUG REPORT=================================== Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues

binary_path: C:\Users\Genesis\anaconda3\envs\lcm\lib\site-packages\bitsandbytes\cuda_setup\libbitsandbytes_cuda116.dll CUDA SETUP: Loading binary C:\Users\Genesis\anaconda3\envs\lcm\lib\site-packages\bitsandbytes\cuda_setup\libbitsandbytes_cuda116.dll... INFO: Started server process [18472] INFO: Waiting for application startup. INFO: Application startup complete. INFO: 127.0.0.1:64657 - "GET /queue_size HTTP/1.1" 200 OK INFO: 127.0.0.1:64657 - "GET /?theme=dark HTTP/1.1" 200 OK INFO: 127.0.0.1:64661 - "GET /queue_size HTTP/1.1" 200 OK INFO: ('127.0.0.1', 64662) - "WebSocket /ws" [accepted] New user connected: 1984d996-c502-49d8-b410-fe535fbffa2a INFO: connection open INFO: 127.0.0.1:64661 - "GET /stream/1984d996-c502-49d8-b410-fe535fbffa2a HTTP/1.1" 200 OK INFO: 127.0.0.1:64663 - "GET /queue_size HTTP/1.1" 200 OK INFO: 127.0.0.1:64663 - "GET /queue_size HTTP/1.1" 200 OK INFO: 127.0.0.1:64665 - "GET /queue_size HTTP/1.1" 200 OK ERROR:root:Error: 1005 Traceback (most recent call last): File "C:\Users\Genesis\github\Real-Time-Latent-Consistency-Model\app-controlnetlora.py", line 286, in handle_websocket_data data = await websocket.receive_bytes() File "C:\Users\Genesis\AppData\Roaming\Python\Python310\site-packages\starlette\websockets.py", line 122, in receive_bytes self._raise_on_disconnect(message) File "C:\Users\Genesis\AppData\Roaming\Python\Python310\site-packages\starlette\websockets.py", line 105, in _raise_on_disconnect raise WebSocketDisconnect(message["code"]) starlette.websockets.WebSocketDisconnect: 1005 User disconnected: 1984d996-c502-49d8-b410-fe535fbffa2a INFO: connection closed INFO: 127.0.0.1:64703 - "GET /?theme=dark HTTP/1.1" 200 OK INFO: 127.0.0.1:64703 - "GET /favicon.ico HTTP/1.1" 404 Not Found INFO: 127.0.0.1:64707 - "GET /queue_size HTTP/1.1" 200 OK INFO: ('127.0.0.1', 64710) - "WebSocket /ws" [accepted] New user connected: b6e74ba1-dd78-42b8-95cc-82a97b2ee09e INFO: connection open INFO: 127.0.0.1:64707 - "GET /stream/b6e74ba1-dd78-42b8-95cc-82a97b2ee09e HTTP/1.1" 200 OK INFO: 127.0.0.1:64711 - "GET /queue_size HTTP/1.1" 200 OK INFO: 127.0.0.1:64711 - "GET /queue_size HTTP/1.1" 200 OK

here is the bat file

@echo on call "C:\Users\Genesis\anaconda3\condabin\activate.bat" cd ""C:\Users\Genesis\github\Real-Time-Latent-Consistency-Model\" call activate lcm

uvicorn app-controlnetlora:app --host 127.0.0.1 --port 7860 --reload ::uvicorn app-img2img:app --host 127.0.0.1 --port 7860 --reload ::uvicorn app-txt2img:app --host 127.0.0.1 --port 7860 --reload ::TIMEOUT=120 SAFETY_CHECKER=TRUE MAX_QUEUE_SIZE=4 uvicorn app-img2img:app --host 127.0.0.1 --port 7860 --reload pause

radames commented 8 months ago

hi @kotaxyz I'm not sure about this error, but it looks like bitsandbytes, maybe try this suggestion here? https://github.com/TimDettmers/bitsandbytes/issues/862#issuecomment-1805173400

radames commented 8 months ago

actually @kotaxyz I'm not sure why bitsandbytes is involved on your env 🤔

kotaxyz commented 8 months ago

still same issue after resolving the issues in the log

C:\Users\Genesis\Desktop\ai>call "C:\Users\Genesis\anaconda3\condabin\activate.bat"

C:\Users\Genesis\Desktop\ai>conda.bat activate ←[32mINFO←[0m: Will watch for changes in these directories: ['C:\Users\Genesis\github\Real-Time-Latent-Consistency-Model'] ←[32mINFO←[0m: Uvicorn running on ←[1mhttp://127.0.0.1:7861←[0m (Press CTRL+C to quit) ←[32mINFO←[0m: Started reloader process [←[36m←[1m9868←[0m] using ←[36m←[1mStatReload←[0m TIMEOUT: 0.0 SAFETY_CHECKER: None MAX_QUEUE_SIZE: 0 device: cuda vae\diffusion_pytorch_model.safetensors not found Loading pipeline components...: 100%|████████████████████████████████████████████████████| 6/6 [00:08<00:00, 1.38s/it] You have disabled the safety checker for <class 'diffusers.pipelines.controlnet.pipeline_controlnet_img2img.StableDiffusionControlNetImg2ImgPipeline'> by passing safety_checker=None. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 . Loading pipeline components...: 100%|████████████████████████████████████████████████████| 6/6 [00:00<00:00, 7.06it/s] You have disabled the safety checker for <class 'diffusers.pipelines.controlnet.pipeline_controlnet_img2img.StableDiffusionControlNetImg2ImgPipeline'> by passing safety_checker=None. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 . vae\diffusion_pytorch_model.safetensors not found Loading pipeline components...: 100%|████████████████████████████████████████████████████| 6/6 [00:13<00:00, 2.30s/it] You have disabled the safety checker for <class 'diffusers.pipelines.controlnet.pipeline_controlnet_img2img.StableDiffusionControlNetImg2ImgPipeline'> by passing safety_checker=None. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 . INFO: Started server process [5968] INFO: Waiting for application startup. INFO: Application startup complete. INFO: ('127.0.0.1', 65488) - "WebSocket /ws" [accepted] New user connected: 92d4b999-db60-4a5f-9be1-23f9ad55c087 INFO: connection open INFO: 127.0.0.1:65489 - "GET /stream/92d4b999-db60-4a5f-9be1-23f9ad55c087 HTTP/1.1" 200 OK INFO: 127.0.0.1:65490 - "GET /queue_size HTTP/1.1" 200 OK

kotaxyz commented 8 months ago

i have tested the app-controlnet.py here and it works fine in the same env https://huggingface.co/spaces/radames/Real-Time-Latent-Consistency-Model/tree/main but the one in the repo here dosnt work for me only img2img

radames commented 8 months ago

hi @kotaxyz , could you please try with newest codebase? it matches the code on huggingface now thanks