olegchomp / TouchDiffusion

TouchDesigner implementation for real-time Stable Diffusion interactive generation with StreamDiffusion.
171 stars 9 forks source link

cannot access local variable 'pipe' where it is not associated with a value #18

Closed sergioalvira closed 4 days ago

sergioalvira commented 3 months ago

When I try making an engine I get this message: UnboundLocalError: cannot access local variable 'pipe' where it is not associated with a value. I am using the portable version, as I first had the error with the manual version. But still the same. What should I try to do?

sebpes commented 2 months ago

I have same issue

patrickolson81 commented 2 months ago

same issue

PetruninKV commented 2 months ago

+1 same issue

s-drca commented 2 months ago

Same issue. Any updates on the fix? Thanks! Maybe because Runway removed their diffusion model repos from their huggingface account about 2 weeks ago?

s-drca commented 2 months ago

The whole error. It says that the model load failed but the model is located in the checkpoints folder.

dreamshaper_8
Model load has failed. Doesn't exist.
401 Client Error. (Request ID: Root=1-66e808c5-50f581b34a5025c6166bf142;d509bd46-d017-4fa8-9822-bf211ce43648)

Repository Not Found for url: https://huggingface.co/api/models/runwayml/stable-diffusion-v1-5/revision/main.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password.
Traceback (most recent call last):
  File "C:\PODACI\Documents\Desktop\TouchDiffusion-main\.venv\Lib\site-packages\gradio\queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\PODACI\Documents\Desktop\TouchDiffusion-main\.venv\Lib\site-packages\gradio\route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\PODACI\Documents\Desktop\TouchDiffusion-main\.venv\Lib\site-packages\gradio\blocks.py", line 1935, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\PODACI\Documents\Desktop\TouchDiffusion-main\.venv\Lib\site-packages\gradio\blocks.py", line 1520, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\PODACI\Documents\Desktop\TouchDiffusion-main\.venv\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\PODACI\Documents\Desktop\TouchDiffusion-main\.venv\Lib\site-packages\anyio\_backends\_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "C:\PODACI\Documents\Desktop\TouchDiffusion-main\.venv\Lib\site-packages\anyio\_backends\_asyncio.py", line 859, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\PODACI\Documents\Desktop\TouchDiffusion-main\.venv\Lib\site-packages\gradio\utils.py", line 826, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "C:\PODACI\Documents\Desktop\TouchDiffusion-main\StreamDiffusion\webui.py", line 49, in stream_engine
    stream = StreamDiffusionWrapper(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\PODACI\Documents\Desktop\TouchDiffusion-main\StreamDiffusion\utils\wrapper.py", line 164, in __init__
    self.stream: StreamDiffusion = self._load_model(
                                   ^^^^^^^^^^^^^^^^^
  File "C:\PODACI\Documents\Desktop\TouchDiffusion-main\StreamDiffusion\utils\wrapper.py", line 480, in _load_model
    pipe=pipe,
         ^^^^
UnboundLocalError: cannot access local variable 'pipe' where it is not associated with a value
JaimanUp commented 2 months ago

anyone find a solution?

olegchomp commented 2 months ago

If you working with Portable version and have error about

Repository Not Found for url: https://huggingface.co/api/models/runwayml/stable-diffusion-v1-5/revision/main.

Navigate cmd to TouchDiffusion folder (where webui.bat) and then type in:

embedded_python\python.exe -m pip install --upgrade diffusers[torch]

CozySun6 commented 1 month ago

Guys u have to make sure that u really selected the 'Select model type' and the 'Select model' , which means u really have to click into the dropdown box ,and click the option ,that works for me.