GithubHelp home page GithubHelp logo

CPU Device Segfaults about esrgan HOT 7 CLOSED

xinntao avatar xinntao commented on May 29, 2024
CPU Device Segfaults

from esrgan.

Comments (7)

xinntao avatar xinntao commented on May 29, 2024

Hi @Beinsezii
I tested with CPU mode (with PyTorch 1.0) and there is no crash.
BTW, if you have cuda, why not try using GPU mode?

from esrgan.

Beinsezii avatar Beinsezii commented on May 29, 2024

A 1000x1000 image uses more than my 8 gigabytes of VRAM. Main area I use fancy up-scaling is for converting <=1080p images to better fit newer (4k) screens.
It's not really a big deal since I wrote a simply python command line utility that uses PIL and Imagemagick to split an into smaller strips and recombine them, which therefore lets me process basically any image with CUDA.
Since its not reproducible on your end, later I could try playing around with some stuff to see if anything bites.

from esrgan.

CMcGill avatar CMcGill commented on May 29, 2024

A 1000x1000 image uses more than my 8 gigabytes of VRAM. Main area I use fancy up-scaling is for converting <=1080p images to better fit newer (4k) screens.
It's not really a big deal since I wrote a simply python command line utility that uses PIL and Imagemagick to split an into smaller strips and recombine them, which therefore lets me process basically any image with CUDA.
Since its not reproducible on your end, later I could try playing around with some stuff to see if anything bites.

Any chance you could share this utility? I'm about to do something similar, but this would save some effort. Thanks!

from esrgan.

Beinsezii avatar Beinsezii commented on May 29, 2024

Any chance you could share this utility? I'm about to do something similar, but this would save some effort. Thanks!

Uhhhh I guess. I've never shared code before and this script in particular is rather incomplete, so it's kinda archaic with almost no documentation or error processing, but here you go.

File in my cloud drive
--Github doesn't want me sharing a .py file. Mildly ironic.

It's a command-line utility, so you use it like you would any other. argparse generates help info, so image_split.py -h or something should work. I'm booted in Windows instead of Arch right now so I can't test it myself.
Needs Python 3.6+, imagemagick, and Python Imaging Library (PIL)

from esrgan.

CMcGill avatar CMcGill commented on May 29, 2024

Any chance you could share this utility? I'm about to do something similar, but this would save some effort. Thanks!

Uhhhh I guess. I've never shared code before and this script in particular is rather incomplete, so it's kinda archaic with almost no documentation or error processing, but here you go.

File in my cloud drive
--Github doesn't want me sharing a .py file. Mildly ironic.

It's a command-line utility, so you use it like you would any other. argparse generates help info, so image_split.py -h or something should work. I'm booted in Windows instead of Arch right now so I can't test it myself.
Needs Python 3.6+, imagemagick, and Python Imaging Library (PIL)

That works quite well, thanks!

from esrgan.

Frenzie avatar Frenzie commented on May 29, 2024

I encountered a segmentation fault as well, but not on smaller images like the sample baboon. I don't know the precise cut-off point, but 710 x 443 seems to be sufficiently large to trigger it.

It's unlikely to be a RAM issue, because it doesn't exceed ~1.2 GB (and I have a total of 32).

$ python3 test.py models/RRDB_ESRGAN_x4.pth
Model path models/RRDB_ESRGAN_x4.pth. 
Testing...
1 ultima7
/home/frans/.local/lib/python3.7/site-packages/torch/nn/modules/upsampling.py:129: UserWarning: nn.Upsample is deprecated. Use nn.functional.interpolate instead.
  warnings.warn("nn.{} is deprecated. Use nn.functional.interpolate instead.".format(self.name))
Segmentation fault

@Beinsezii

--Github doesn't want me sharing a .py file. Mildly ironic.

It'll work as an archive of various sorts:
image_split.py.tar.gz

But yeah, otherwise they want you to use a gist, I guess.

from esrgan.

svelle avatar svelle commented on May 29, 2024

I encountered a segmentation fault as well, but not on smaller images like the sample baboon. I don't know the precise cut-off point, but 710 x 443 seems to be sufficiently large to trigger it.

It's unlikely to be a RAM issue, because it doesn't exceed ~1.2 GB (and I have a total of 32).

I have this exact same error and tried to troubleshoot for the past few days with no success. Any help would be appreciated!

from esrgan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.