Code Monkey home page Code Monkey logo

Comments (6)

Djdefrag avatar Djdefrag commented on May 18, 2024 1

Thank you, I will look into it 😄

from qualityscaler.

wildyaboku avatar wildyaboku commented on May 18, 2024

Sorry, I realize now that sf is "scaling factor" and you intended it to be 2 when using the BSRGANx2 model. It should still work the same. I'm curious to hear about the issues you were facing, because I'm successfully upscaling images of any size with the 2x model on the latest version using these changes.

I did encounter problems at one point when I set strict=False on load_state_dict and ran your existing code. The resulting images were wrong and discolored. But by removing the upconv2 code, it works as expected.

from qualityscaler.

Djdefrag avatar Djdefrag commented on May 18, 2024

Hi my friend, i resolved the problem just yeasterday! Thank you :D

It will be reintroduced in next release :)

from qualityscaler.

wildyaboku avatar wildyaboku commented on May 18, 2024

That's great news! Thank you so much for your hard work. 😄

If you are open to suggestions for the next version, may I suggest adding a window title, and allowing images to be dragged and dropped into the application again? Otherwise, let me know if you are open for PRs on these after the next release. 😄

Thank you!

from qualityscaler.

Djdefrag avatar Djdefrag commented on May 18, 2024

Thank you my friend ❤️

Unfortunately customtkinter doesn't support any kind of drag&drop, I'm also following a thread on github about it but I don't see any development :(

from qualityscaler.

wildyaboku avatar wildyaboku commented on May 18, 2024

I was able to get drag and drop working, although I haven't fully implemented it in a usable state yet. The trick is to use tkinterdnd2 and create a custom Tk class like so:

class Tk(CTk, TkinterDnD.DnDWrapper):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.TkdndVersion = TkinterDnD._require(self)

Then, replace your window line with this:

    window = Tk();

With this alone, the app will continue working as before. However, you can now listen for drag and drop on something like the up_background:

def get_path(event):
    print(event.data)

def place_up_background():
    up_background = CTkLabel(master  = window,
                            text    = "",
                            fg_color = dark_color,
                            font     = bold12,
                            anchor   = "w")

    up_background.place(relx = 0.5,
                        rely = 0.0,
                        relwidth = 1.0,
                        relheight = 1.0,
                        anchor = tk.CENTER)

    up_background.drop_target_register(DND_ALL)
    up_background.dnd_bind("<<Drop>>", get_path)

Now, the drop cursor is displayed, and dropping a file will successfully print the file path.

Does that help? Perhaps this is worth its own issue, if you'd like me to open one for more exploration.

from qualityscaler.

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.