Spaces:
Sleeping
Apply for community grant: Academic project (gpu)
We propose a large generative model for hands. This includes generating hand images given hand poses and fixing malformed AI generated hands, and even more. But we would need gpu to host this service. More information can be found at our paper https://arxiv.org/abs/2412.02690 and website https://ivl.cs.brown.edu/research/foundhand.html Thank you!
Looks like the error is raised after 10 seconds or something when clicking the crop button in 1. As this Space is using private models, I can't check it on my end, but you might want to check where exactly the error is raised first.
@hysts
Thanks for your comments! I fixed the GPU task aborted
error. It looks like the Mediapipe was not compatible with the ZeroGPU.
But I got another problem at this line of my code:
If I do image.to("cuda")
, it give the following error
CUDA must not be initialized in the main process on Spaces with Stateless GPU environment
However, if I don't do image.to("cuda")
, it gives me the error below.
Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor
What is the best practice of moving the input tensors to the cuda device? Could you please help me with this?
@Chaerin5
Nice! Thanks for looking into it.
As for the new error, I'm not 100% sure, but I think that's because you are decorating a function defined inside another function.
Can you try moving https://huggingface.co/spaces/Chaerin5/FoundHand/blob/32ecde5ddd92139a4c9c08320874c9866dd075be/app.py#L325-L332 outside of https://huggingface.co/spaces/Chaerin5/FoundHand/blob/32ecde5ddd92139a4c9c08320874c9866dd075be/app.py#L259 ?
It works right now. Thank you so much for your support!