I'm guessing you were fixing an official SD 1.5 case and got an error.
Maybe this will work.
I'm sleepwalking so I could be wrong.

Yntec changed pull request status to merged
Owner

Thanks, the space builds and runs fine, but when clicking generate it time outs after 5 seconds, so people generate pictures but they're not shown because it has already shown the error and stopped listening. The underlying code is functionally equivalent to what was there before so I need to investigate what happens (if this fix doesn't work.)

Owner

Nope, still same problem, it timeouts after 5 seconds instead of waiting for the picture to be generated, so it's generated but the user never gets to see it. Will investigate after properly releasing the RadiantDiversions model (before its inference API closes and I can't generate samples anymore!)

Something is fundamentally wrong. I'll try to duplicate it on my end in a bit.

I think HF's server setup or status is screwed up!

ValueError: Could not complete request to HuggingFace API, Status Code: 500, Error: unknown error, Warnings: ['CUDA out of memory. Tried to allocate 30.00 MiB (GPU 0; 14.75 GiB total capacity; 1.90 GiB already allocated; 3.06 MiB free; 1.95 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF', 'There was an inference error: CUDA out of memory. Tried to allocate 30.00 MiB (GPU 0; 14.75 GiB total capacity; 1.90 GiB already allocated; 3.06 MiB free; 1.95 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF']

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/gradio/routes.py", line 321, in run_predict
    output = await app.blocks.process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1015, in process_api
    result = await self.call_function(fn_index, inputs, iterator, request)
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 856, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
  File "/home/user/app/app.py", line 1938, in send_it1
    output1=proc1(inputs)
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 812, in __call__
    outputs = utils.synchronize_async(
  File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 375, in synchronize_async
    return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 103, in sync
    raise return_result
  File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 56, in _runner
    result[0] = await coro
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1015, in process_api
    result = await self.call_function(fn_index, inputs, iterator, request)
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 856, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
  File "/usr/local/lib/python3.10/site-packages/gradio/external.py", line 282, in query_huggingface_api
    raise ValueError(
ValueError: Could not complete request to HuggingFace API, Status Code: 500, Error: unknown error, Warnings: ['CUDA out of memory. Tried to allocate 30.00 MiB (GPU 0; 14.75 GiB total capacity; 1.90 GiB already allocated; 3.06 MiB free; 1.95 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF', 'There was an inference error: CUDA out of memory. Tried to allocate 30.00 MiB (GPU 0; 14.75 GiB total capacity; 1.90 GiB already allocated; 3.06 MiB free; 1.95 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF']
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/gradio/routes.py", line 321, in run_predict
    output = await app.blocks.process_api(
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1015, in process_api
    result = await self.call_function(fn_index, inputs, iterator, request)
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 856, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
  File "/home/user/app/app.py", line 1938, in send_it1
    output1=proc1(inputs)
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 812, in __call__
    outputs = utils.synchronize_async(
  File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 375, in synchronize_async
    return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 103, in sync
    raise return_result
  File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 56, in _runner
    result[0] = await coro
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1015, in process_api
    result = await self.call_function(fn_index, inputs, iterator, request)
  File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 856, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 859, in run
    result = context.run(func, *args)
  File "/usr/local/lib/python3.10/site-packages/gradio/external.py", line 282, in query_huggingface_api
    raise ValueError(
ValueError: Could not complete request to HuggingFace API, Status Code: 500, Error: unknown error, Warnings: ['CUDA out of memory. Tried to allocate 30.00 MiB (GPU 0; 14.75 GiB total capacity; 1.90 GiB already allocated; 3.06 MiB free; 1.95 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF', 'There was an inference error: CUDA out of memory. Tried to allocate 30.00 MiB (GPU 0; 14.75 GiB total capacity; 1.90 GiB already allocated; 3.06 MiB free; 1.95 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF']
 Your Space is using an old version of Gradio (3.15.0) that is subject to security vulnerabilities. Please update to the latest version.
Owner

This may have been the death of Gradio 3.15.0, it works on Gradio 3.23.0, but that one breaks the UI, which is what I'm trying to archive! This backup by PeepDaSlan9 works: https://huggingface.co/spaces/PeepDaSlan9/B2BMGMT_ToyWorld - I guess if he tries to update it, it will break (if you duplicate that one, it won't build because runway/stable-diffusion-1.5 won't be found, if you do that and try to update the model list so it builds, it'll break like this one.)

I guess I'll let this one die and link to PeepDaSlan9's backup and accept the loss of 152 models that can't be used there, I wish I had made a more recent backup myself, heh, really, at the end I'm hanging on to the UI looks and the 20 hearts this space had, all functionality can be used elsewhere. Can I build a previous version of this space instead of the most recent code? That would solve it, because, reverting the changes doesn't fix it, but yesterday before I updated it worked fine, if I could only build that one...

Hmmm... if this is a trap to kill the vulnerable version of Gradio, it looks like a server crash type message...
Anyway, I just did a port similar to HFD already. It's part of the testing. Still testing.

Should we rejoice or mourn...
It seems to be able to generate.
https://huggingface.co/spaces/John6666/blitz_diffusion4

Owner

So, after you said that, I find hilarious that the first thing I did was change it from 2**32-1 to 3999999999 because I just couldn't wrap my head around the first one! πŸ˜‚πŸ˜…πŸ€£

Well, it's okay if it works, isn't it?
However, I think it's not good that there are Seeds that should be selectable but are not for the author's convenience.
If you leave the formula as it is, you only have to change two characters even if the Seed goes from the current 32-bit to 64-bit. (I don't know if that day ever comes.) The running speed could have changed 30+ years ago, but now it is pre-calculated, so it won't change a nanosecond.

Incidentally, even that formula of mine is actually lazy, and it would be more rigorous to do it this way. The result should be the same.

import numpy as np
MAX_SEED = np.iinfo(np.int32).max

https://huggingface.co/spaces/InstantX/InstantID/blob/main/app.py

Owner

should be selectable but are not for the author's convenience.

Well, part of the fun is designing these spaces, what people can do in them, as a sort of performance. 4294967295 is a number that is a technical limit, 3999999999 is a number I decided to put in there because it's the coolest number below it, though, of course, 3693693693 is even cooler, that'd be overdoing it. I made sure to let people know where they can use the extra 294967296 seeds if they really need them!

image.png

I bet they'd make the switch for negative prompts over the missing seeds, though! πŸ˜†

Then it's not a problem.

Owner
β€’
edited Sep 19

These ones now with a seed tab https://huggingface.co/spaces/Yntec/MiniToyWorld - https://huggingface.co/spaces/Yntec/ToyWorld - I can't tell you how much i appreciate that you brought us seeds!

https://huggingface.co/spaces/Yntec/blitz_diffusion/ finally up to date with blitz_diffusion4

I'm scared to look at the calendar and see how long it took me, so I won't!

The light theme is partly unadjusted, but seems fine?

It's not a complicated feature to break, but have you had any problems displaying images with metadata in it?
To be honest, I feared that Gradio might do something wrong.

With metadata, an image can be transformed from just an image into a dataset that can be used to accurately retrain the image model in the future.
Well, it doesn't have to be that big a deal, it can be a note of Seed and prompts.

brought us seeds!

Thanks also to Mr. multimodalart. He has been involved in most of the GUI-related production of HF's image-generating AI.
https://huggingface.co/posts/victor/964839563451127#66d1d7d46accd34f7500d78f

Sign up or log in to comment