Skip to content

How to do the equivalent in this repo? #5

Description

@alexblattner

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions