Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.2.5.0 Seems don't support to use with cpu anymore. #306

Closed
k79e opened this issue Apr 25, 2022 · 6 comments
Closed

V0.2.5.0 Seems don't support to use with cpu anymore. #306

k79e opened this issue Apr 25, 2022 · 6 comments

Comments

@k79e
Copy link

k79e commented Apr 25, 2022

It seems it used a function that not support to run with cpu only.
pytorch/pytorch#74625

Error "slow_conv2d_cpu" not implemented for 'Half'
        Tile 1/12
Traceback (most recent call last):
  File "inference_realesrgan.py", line 124, in <module>
    main()
  File "inference_realesrgan.py", line 105, in main
    output, _ = upsampler.enhance(img, outscale=args.outscale)
  File "D:\Program1\Python38\lib\site-packages\torch\autograd\grad_mode.py", lin
e 27, in decorate_context
    return func(*args, **kwargs)
  File "E:\Real-ESRGAN-master\realesrgan\utils.py", line 188, in enhance
    self.tile_process()
  File "E:\Real-ESRGAN-master\realesrgan\utils.py", line 146, in tile_process
    output_start_x:output_end_x] = output_tile[:, :, output_start_y_tile:output_
end_y_tile,
UnboundLocalError: local variable 'output_tile' referenced before assignment
@xinntao
Copy link
Owner

xinntao commented Apr 26, 2022

please add --fp32 option to your command

@k79e
Copy link
Author

k79e commented Apr 27, 2022

It works!!

@k79e k79e closed this as completed Apr 27, 2022
@mudit514
Copy link

mudit514 commented May 6, 2022

Yes, it worked.

@nmunisa
Copy link

nmunisa commented May 9, 2022

please add --fp32 option to your command

how can I add this? please help me

learn.lr_find() --fp32
learn.recorder.plot()

#output:
LR Finder is complete, type {learner_name}.recorder.plot() to see the graph.

RuntimeError Traceback (most recent call last)
in ()
----> 1 learn.lr_find()
2 learn.recorder.plot()

10 frames
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py in _conv_forward(self, input, weight, bias)
442 _pair(0), self.dilation, self.groups)
443 return F.conv2d(input, weight, bias, self.stride,
--> 444 self.padding, self.dilation, self.groups)
445
446 def forward(self, input: Tensor) -> Tensor:

RuntimeError: "slow_conv2d_cpu" not implemented for 'Half'

@WASasquatch
Copy link

WASasquatch commented May 31, 2022

How can this be implemented for something like MindsEye Beta? I feel this should be default behavior, to fallback to CPU, not require manual input.

@RifkyA911
Copy link

@k79e
Author

it will push CPU only, how to work with GPU too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants