You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i want to inference a photo,but it have a error, i need help,please to point my question of program.
`import cv2
import os
import numpy as np
os.environ['CUDA_VISIBLE_DEVICES']='0'
import torch
from basicsr.models import build_model
from basicsr.utils.options import parse_options
if name=='main':
opt, args = parse_options('.', is_train=False)
device = 'cuda:0'
opt['network_g']['img_size'] = 512 // 4
model = build_model(opt)
It's not your fault; rather, the GPU Memory is too small for IPG. You can change to GPUs with a larger memory (like V100 with 32G memory), or you may refer to https://github.com/gladzhang/ART/blob/main/basicsr/models/art_model.py that crops the image into pieces first and then send them into the model.
i want to inference a photo,but it have a error, i need help,please to point my question of program.
`import cv2
import os
import numpy as np
os.environ['CUDA_VISIBLE_DEVICES']='0'
import torch
from basicsr.models import build_model
from basicsr.utils.options import parse_options
if name=='main':
opt, args = parse_options('.', is_train=False)
device = 'cuda:0'
opt['network_g']['img_size'] = 512 // 4
model = build_model(opt)
The text was updated successfully, but these errors were encountered: