Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various improvements #48

Open
wants to merge 38 commits into
base: master
Choose a base branch
from

Conversation

ashleykleynhans
Copy link

@ashleykleynhans ashleykleynhans commented Feb 29, 2024

  • Refactored the Gradio demo and added support for batch upscaling.
  • Changed the default LLaVA model from 13B to 7B to reduce VRAM consumption.
  • Added download_models.py script to easily download the models.
  • Updated requirements.
  • Added Replicate demo, RunPod template and YouTube tutorial to README.
  • Removed IntelliJ IDE files.

@FurkanGozukara
Copy link

FurkanGozukara commented Feb 29, 2024

this includes so many of my code. what you are doing is so inappropriate.

write your own code and make your own pull request don't make other people code like your own

please discard the pull request of the gradio app. i don't allow my gradio coding to be merged

@JasonGUTU JasonGUTU added the enhancement New feature or request label Feb 29, 2024
@FurkanGozukara
Copy link

@JasonGUTU just to let you know this guy taken so much code of my gradio app. All those new features simply. I don't allow my app to be merged here. I am not funded or paid by anyone. If i get funded I will happily contribute even more.

@JasonGUTU
Copy link
Collaborator

@JasonGUTU just to let you know this guy taken so much code of my gradio app. All those new features simply. I don't allow my app to be merged here. I am not funded or paid by anyone. If i get funded I will happily contribute even more.

Thank you for your information. We will handle this properly.

@ashleykleynhans Thanks also for your pull request. We will also carefully consider your input.

Thank you all for your attention. @ashleykleynhans @FurkanGozukara .

@ashleykleynhans
Copy link
Author

ashleykleynhans commented Feb 29, 2024

Yes, I borrowed some code from @FurkanGozukara's Github repo but it had the same license as this repo as the time so there was no issue with me using any code from it. Also, in the spirit of Open Source, I believe it is only fair to contribute changes back to the upstream that you forked so that everyone can benefit from the changes. I also don't get paid for my work and fixed a few issues with the code that I borrowed from the fork. If you want the contributions to be credited to your own Github username, then I suggest creating a PR to push your changes upstream in future.

The MIT licence permits me to "use, copy, modify, merge, publish, distribute" the forked version, and the @FurkanGozukara's repo had the exact same MIT license at the time the PR was created, he has since changed it, but he is now claiming rights to the full gradio application that he never even wrote, he only made some minor changes to it.

"Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so

https://github.com/FurkanGozukara/SUPIR/blob/master/LICENSE

@FurkanGozukara
Copy link

FurkanGozukara commented Feb 29, 2024

I changed my license and I don't allow. Fund me and I will happily contribute even more. This is how I am making my living right now. I need support.

@ashleykleynhans
Copy link
Author

I changed my license and I don't allow. Fund me and I will happily contribute even more. This is how I am making my living right now. I need support.

You can't change the license after the fact. It was MIT licence at the time I borrowed a small amount of code from your fork. I don't get paid for my work either, I contribute back to the upstream in the spirit of "Open Source", so its unreasonable of you to expect me to fund you. You make money from your "1-Click Installers" on Patreon, I don't make any money from my contributions.

@kodxana
Copy link

kodxana commented Feb 29, 2024

@JasonGUTU so after thinking about this situation I came up with proposal of turning @FurkanGozukara fork into Dual-License model. That way repo still has MIT license but all changes made by @FurkanGozukara are under AGPL license and are term of copyright.
As the code was MIT there is no reason to remove commits as they are under MIT.
After PR FurkanGozukara#2 is merged all future changes in fork made by @FurkanGozukara are copyrighted to him.

That should clean the situation.

@RexLeeGrey
Copy link

RexLeeGrey commented Mar 3, 2024

Does this repository still not work on 4090?

OutOfMemoryError: CUDA out of memory. Tried to allocate 32.00 MiB. GPU 0 has a total capacity of 23.99 GiB of which 0 bytes is free. Including non-PyTorch memory, this process has 17179869184.00 GiB memory in use. Of the allocated memory 22.58 GiB is allocated by PyTorch, and 447.33 MiB is reserved by PyTorch
but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)

@MatthewK78
Copy link

Does this repository still not work on 4090?

python gradio_demo.py --no_llava --loading_half_params --use_tile_vae --use_image_slider

@RexLeeGrey
Copy link

python gradio_demo.py --no_llava --loading_half_params --use_tile_vae --use_image_slider

Thank you. It's in effect.

@RexLeeGrey
Copy link

Request: When upgrading images in bulk, the file name can be named after the source file name.

@ashleykleynhans
Copy link
Author

ashleykleynhans commented Mar 4, 2024

Request: When upgrading images in bulk, the file name can be named after the source file name.

This has now been done, the output image will have _upscaled appended to the original filename you set Number Of Images To Generate to 1. If you set Number Of Images To Generate to a value higher than 1, the output images will have _upscaled_ + image number appended to the original filename.

For example:

-rw-r--r-- 1 root root 1221765 Mar  4 09:42 ashley_upscaled_1.png
-rw-r--r-- 1 root root 1175997 Mar  4 09:43 ashley_upscaled_2.png

@RexLeeGrey
Copy link

Request: When upgrading images in batch, you can set a fixed resolution that allows dynamic scaling regardless of the size of the input image.

@ashleykleynhans
Copy link
Author

Request: When upgrading images in batch, you can set a fixed resolution that allows dynamic scaling regardless of the size of the input image.

Out of scope for this PR, please log an issue for feature requests.

@ashleykleynhans
Copy link
Author

@JasonGUTU any news on whether this PR will be merged?

@gee666
Copy link

gee666 commented Mar 12, 2024

@FurkanGozukara i think it's very much ok, if you want your job to be paid, and I know that you have amazing projects, and I learned valuable things from you, but this particular project is not allowed by the authors to be used commercially. It means that you can't ask people for payment for working on this particular repository.

@gessyoo
Copy link

gessyoo commented Mar 25, 2024

Request: I've tried to implement a batch process for gradio_demo_face.py but haven't succeeded yet. Could you please add the option to batch process a directory of face images to gradio_demo_face.py?

@MatthewK78
Copy link

MatthewK78 commented Mar 29, 2024

Since it's taking so long for this to be merged, I thought I'd help out anyone lurking who might want to try this awesome PR with this awesome repository, but they're not sure how to do it in a simple and easy way. Assuming you're already familiar with 'git clone' and 'git pull', simply use this: git pull origin refs/pull/48/head

@MatthewK78
Copy link

MatthewK78 commented Mar 30, 2024

I've been successfully using this on Windows 11 with Python 3.10.13, torch 2.2.2+cu121, torchvision 0.17.2+cu121, triton 3.0.0, transformers==3.32.1 flash_attn==2.5.6 numpy==1.26.4 httpx==0.27.0 accelerate==0.20.3 scikit-learn==1.4.1.post1 matplotlib==3.8.3 opencv-python==4.9.0.80 pandas==2.2.1 Pillow==10.2.0 pytorch-lightning==2.2.1 scipy==1.12.0 diffusers==0.27.2

Direct link to a zip with Windows Triton 3.0.0 wheels for both Python 3.10 and 3.11: https://github.com/wkpark/triton/actions/runs/7855606361/artifacts/1235582193
...which was discovered here: https://github.com/wkpark/triton/actions/workflows/integration-tests.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants