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
Hello @victorca25, I'd like to replicate highres fix, but am unsure how it works exactly. I mainly use diffusers so I must use your repo to replicate highres fix.
If I wanted to use 4x-UltraSharp, upscale it by 1.5, with 25 highres steps and a denoising of 0.4. What should the code look like?
this is how the default code looks like:
import torch
from PIL import Image
import numpy as np
from run import load_model, run
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = load_model('upscaler/4x-UltraSharp.pth', device)
path_to_image = 'img11.png'
image = Image.open(path_to_image).convert('RGB')
sr_image =run(model,image)
pil_image = Image.fromarray(sr_image)
pil_image.save('u3.png')
I hope you see my issue soon and thanks in advance for your time.
The text was updated successfully, but these errors were encountered:
The original idea with this repo was to run a model with many images in a directory directly from the command line, but making a script like the one you want to use for the Hires Fix with diffusers would be very simple, since it happens on the pixel-space.
Hello @victorca25, I'd like to replicate highres fix, but am unsure how it works exactly. I mainly use diffusers so I must use your repo to replicate highres fix.
If I wanted to use 4x-UltraSharp, upscale it by 1.5, with 25 highres steps and a denoising of 0.4. What should the code look like?
this is how the default code looks like:
I hope you see my issue soon and thanks in advance for your time.
The text was updated successfully, but these errors were encountered: