StoryDiffusion icon indicating copy to clipboard operation
StoryDiffusion copied to clipboard

NameError: name 'pipe' is not defined

Open Speedway1 opened this issue 1 year ago • 6 comments

Running with gradio, getting this error:

Traceback (most recent call last): File "/data/misc/storydiffusion_env/lib/python3.11/site-packages/gradio/queueing.py", line 501, in call_prediction output = await route_utils.call_process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/misc/storydiffusion_env/lib/python3.11/site-packages/gradio/route_utils.py", line 258, in call_process_api output = await app.get_blocks().process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/misc/storydiffusion_env/lib/python3.11/site-packages/gradio/blocks.py", line 1710, in process_api result = await self.call_function( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/misc/storydiffusion_env/lib/python3.11/site-packages/gradio/blocks.py", line 1262, in call_function prediction = await utils.async_iteration(iterator) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/misc/storydiffusion_env/lib/python3.11/site-packages/gradio/utils.py", line 517, in async_iteration return await iterator.anext() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/misc/storydiffusion_env/lib/python3.11/site-packages/gradio/utils.py", line 510, in anext return await anyio.to_thread.run_sync( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/misc/storydiffusion_env/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/misc/storydiffusion_env/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "/data/misc/storydiffusion_env/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run result = context.run(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/misc/storydiffusion_env/lib/python3.11/site-packages/gradio/utils.py", line 493, in run_sync_iterator_async return next(iterator) ^^^^^^^^^^^^^^ File "/data/misc/storydiffusion_env/lib/python3.11/site-packages/gradio/utils.py", line 676, in gen_wrapper response = next(iterator) ^^^^^^^^^^^^^^ File "/data/misc/StoryDiffusion/gradio_app_sdxl_specific_id.py", line 505, in process_generation del pipe ^^^^ NameError: name 'pipe' is not defined

Speedway1 avatar May 05 '24 11:05 Speedway1

Trying different models, only RealVision runs, others all give similar errors to above.

However, RealVision crashes with "RuntimeError: The size of tensor a (576) must match the size of tensor b (1152) at non-singleton dimension 3"

So none of the models are working at the moment.

Speedway1 avatar May 05 '24 13:05 Speedway1

Hi, @Speedway1 , I have modified the code, but do not know whether solving your problem. could you git pull and run again?

Z-YuPeng avatar May 05 '24 17:05 Z-YuPeng

I got this error too. RuntimeError: The expanded size of the tensor (576) must match the existing size (1152) at non-singleton dimension 3. Target sizes: [2, 20, 576, 576]. Tensor sizes: [1152, 1152] every models are not working sadly.

clcchosun0509 avatar May 05 '24 21:05 clcchosun0509

Hi, @Speedway1 , I have modified the code, but do not know whether solving your problem. could you git pull and run again?

Thank you, we're actually going to refresh the build, that's scheduled for this evening, so we will have a clean pull of the code then, with your fix. We will be able to report back to you after the tests on this new build.

Speedway1 avatar May 06 '24 12:05 Speedway1

Hi, @Speedway1 , I have modified the code, but do not know whether solving your problem. could you git pull and run again?

Unfortunately still only "RealVision" option works. All the others give and error. Same as before. It did git pull as suggested.

Speedway1 avatar May 06 '24 22:05 Speedway1

Correction, "Unstable" is now working too.

Here is the list of working: Unstable RealVision

SDXL: Started download, will report back when finished but looks like will now work.

These not working: Juggernaut

Here are the errors: Juggernaut ERROR: ^^^^^^^^^^^^^^^^^^^ File "/data/misc/storydiffusion_env/lib/python3.11/site-packages/diffusers/pipelines/pipeline_utils.py", line 1789, in download raise EnvironmentError( OSError: Could not find the necessary safetensors weights in {'text_encoder_2/pytorch_model.bin', 'unet/diffusion_pytorch_model.bin', 'vae/diffusion_pytorch_model.bin', 'text_encoder/pytorch_model.bin'} (variant=None)

Speedway1 avatar May 06 '24 23:05 Speedway1

The issue seems to have been resolved in the latest version; the issue will be temporarily closed.

Z-YuPeng avatar May 09 '24 06:05 Z-YuPeng

image 因为这个提示,我升级了gradio==4.29.0 然后出现了同样的问题,退回到requirements里指定的4.22.0版本后问题修复了

meigami0 avatar May 16 '24 14:05 meigami0