Apply for community grant: Academic project (gpu)

#1
by MykolaL - opened

StableDesign is a SOTA deep learning model that transforms images of empty rooms into fully furnished spaces based on text descriptions. This model pipeline won 2nd place in the Generative Interior Design 2024 competition (https://www.aicrowd.com/challenges/generative-interior-design-challenge-2024/leaderboards?challenge_round_id=1314) and outperform currently best pipeline for same task (https://huggingface.co/spaces/ml6team/controlnet-interior-design).
This demo would benefit greatly from GPU hardware for better interactivity and user experience.
Also it will be great to have GPU with 24 Gb VRAM to give the opportunity to deploy model for high resolution images.
Please refer to our github (https://github.com/Lavreniuk/generative-interior-design) for more details.

Hi @MykolaL , we've assigned ZeroGPU to this Space. Please check the compatibility and usage sections of this page so your Space can run on ZeroGPU.

Hi, @hysts , thank you very much!
however I have a problem with utilizing GPU. Locally it works good, but in space I faced next issue:
device = 'cuda'
but after self.pipe = self.pipe.to(device)
or any other models they are still on cpu, but I could print and see that device:0 in A100 gpu. At the same time when I have image "image_to_depth" it moved to gpu...
could you please help with it?

@MykolaL Thanks for testing ZeroGPU! Can you try instantiating your models in the global scope without using a class? ZeroGPU may not work well with classes that have a model as a field.

@hysts , thank you for the advice, now it is working perfect!

Awesome!!

what an amazing project, congrats

Dear @hysts , I have faced the issue with veeery long loading the page with this space. When I restart the space it is much better, but after a few hours problems come back. So I need to restart the app several times per day. Maybe you could help me with this problem?

image.png

@MykolaL Sorry about this issue. It's a known issue of gradio 4.25.0 and ZeroGPU, which is fixed in gradio==4.26.0. So upgrading the gradio version should fix it. You can change the gradio version in the README.md. https://huggingface.co/spaces/MykolaL/StableDesign/blob/f17a90ea63e1f6896e9fd2859c861b12aab31b0c/README.md?code=true#L7

@hysts , thank you for quick response, I will try it!

I'm seeing this error:

  File "/usr/local/lib/python3.10/site-packages/gradio/helpers.py", line 55, in create_examples
    examples_obj = Examples(
  File "/usr/local/lib/python3.10/site-packages/gradio/helpers.py", line 153, in __init__
    raise ValueError("If caching examples, `fn` and `outputs` must be provided")
ValueError: If caching examples, `fn` and `outputs` must be provided

I think it's related to this issue and you can avoid this error by adding cache_examples=False in gr.Examples for now. https://huggingface.co/spaces/MykolaL/StableDesign/blob/6369e62ee776689bccb4b429f96c49030e974acc/app.py#L325-L326

Sign up or log in to comment