Giter Site home page Giter Site logo

Is torchtext mandatory? about diffbir HOT 7 CLOSED

zdyshine avatar zdyshine commented on June 18, 2024
Is torchtext mandatory?

from diffbir.

Comments (7)

0x3f3f3f3fun avatar 0x3f3f3f3fun commented on June 18, 2024

Can you please provide a more detailed explanation of your question? 😺

from diffbir.

zdyshine avatar zdyshine commented on June 18, 2024

No description provided.

Thanks for the reply!
There is torchtext in my local environment. When using DiffBIR and adapting to the inference environment, I found that pytorch_lightning has a dependency on torchtext, /opt/conda/lib/python3.8/site-packages/pytorch_lightning/utilities/apply_func.py. You can also run the code without torchtext installed. I uninstalled torchtext, and finally used the provided sample code to successfully run the results, but the quality of the recovered images was very poor, and I don't know why.
DIffBIR_github

The degradation of the input is not very complex, but the results are strange.

from diffbir.

0x3f3f3f3fun avatar 0x3f3f3f3fun commented on June 18, 2024

This issue is unrelated to torchtext. Your result is reasonable and falls under DiffBIR's bad cases. Currently, the stage1 model produces over-smoothed results, causing details like text and small faces to be erased in the first stage, making it impossible for the second stage to perform generation. Additionally, the image you've shown appears to be from a low-resolution video with video compression artifacts. In our experiments, we have also observed that DiffBIR tends to generate some noisy textures when dealing with such compression noise. These are known issues with DiffBIR at the moment, and we are actively working on improvements to enhance its performance. Thank you for bringing this issue to our attention!

from diffbir.

0x3f3f3f3fun avatar 0x3f3f3f3fun commented on June 18, 2024

You can improve DiffBIR's performance by tuning inference parameters, such as:

  • set sr_scale to a value larger than 1 to alleviate the "over-smoothed" problem.
  • set prompt guidance scale to a value larger than 1 to enable the negative prompt, which can reduce bad cases and improve the image quality.

Due to the stochastic nature of the diffusion model, you can also change the random seed to select a good result for yourself (we will never perform this action in our experiments!).

We hope these suggestions are helpful for you. Here are two examples with video compression artifacts:
diffbir_example2
diffbir_example3

from diffbir.

zdyshine avatar zdyshine commented on June 18, 2024

You can improve DiffBIR's performance by tuning inference parameters, such as:

  • set sr_scale to a value larger than 1 to alleviate the "over-smoothed" problem.
  • set prompt guidance scale to a value larger than 1 to enable the negative prompt, which can reduce bad cases and improve the image quality.

Due to the stochastic nature of the diffusion model, you can also change the random seed to select a good result for yourself (we will never perform this action in our experiments!).

We hope these suggestions are helpful for you. Here are two examples with video compression artifacts: diffbir_example2 diffbir_example3

Thanks for the reply, I will try to adjust the parameters

from diffbir.

zdyshine avatar zdyshine commented on June 18, 2024

When I installed xformers==0.0.16, it prompted that torch requires 1.13. Have you encountered such a problem?
DIffBIR_github

from diffbir.

0x3f3f3f3fun avatar 0x3f3f3f3fun commented on June 18, 2024

Yes, I've encountered this problem as well. xformers has strict requirements for both PyTorch and CUDA versions. I recommend you to create a separate environment as shown in the README.md and then install the PyTorch version that matches with xformers.

from diffbir.

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.