Vetchems / sd-civitai-browser

An extension to help download models from CivitAi without leaving WebUI
GNU Affero General Public License v3.0
179 stars 130 forks source link

Should we fork this repo and make a new official one? #9

Open thetrebor opened 1 year ago

thetrebor commented 1 year ago

@Vetchems might not have time or desire to maintain it and isn't merging pull requests yet. Should we settle on a fork and continue development? I'd like to see something that can manage the models versions with CivitAI so you can keep up to date with updated releases without having to manually manage them. And i'd like for it to help suggest tags based on the model info you download.

vt-idiot commented 1 year ago

I took the current pull requests and tried to get them working together in some way.

Disclaimer: I have no idea how gradio extensions work. I hardly know Python. I pulled one of the following until I had it working: giphy

it would be nice to somehow be able to select a preview image, but it's very much at "gets er done" status for my own purposes now!

thetrebor commented 1 year ago

give my version a shot and see if you like how it functions. I think we came to some convergent ideas. I didn't bother changing things to png. I just wanted to have a list of images that worked with "model preview" plugin so it was easy to go back and view what the model was supposed to do after the fact

vt-idiot commented 1 year ago

have you diverged further than the 2 PR's you had here? because I just pulled them into my own fork and built off of that. haven't used the model viewer plugin, but I mainly use civitai for LoRA browsing anyways

thetrebor commented 1 year ago

i haven't yet, but instead of us all diverging further it would be nice to rebase around something we can all contribute to. i dont' have to be the center of gravity. happy to shift contributions to wherever.

I think the same process would work for LORAs. Might make sense to eventually merge the civitai browser and the model viewer anyway so you can see what you ahve and what's new in each category.

thetrebor commented 1 year ago

I just committed a couple more little fixes to my fork.

vt-idiot commented 1 year ago

If you're better versed in Gradio's intricacies and Python itself, I've no qualms with you taking the lead, you probably have more time to dedicate to it than I can - just wanted a functional civitai browser for the Colab I maintain/use.

Re: images/previews - the built in "extra networks" functionality only looks for LoRA or TI name.png or LoRA or TI name.preview.png for its thumbnails - and they have to be adjacent to the safetensors/pt files. It was why I made the enumerate loop break after saving 1 image. Now that I have content_type passed through to the image saver and the model folder selection is "cleaner", I think I can make it keep your functionality for checkpoints and keep my functionality for everything else with a simple "if content_type == "Checkpoint"

I'll PR your fork later this evening and take a look at it - or just edit my own to do "both" and let you know.

thetrebor commented 1 year ago

Pull my version from last night and see if you like it. It might already be done. I think I need to add the .preview.png text to the image for LORA but beyond that it should just work

On Feb 24, 2023 at 11:50:52 AM, vt-idiot @.***> wrote:

If you're better versed in Gradio's intricacies and Python itself, I've no qualms with you taking the lead, you probably have more time to dedicate to it than I can - just wanted a functional civitai browser for the Colab I maintain/use.

Re: images/previews - the built in "extra networks" functionality only looks for LoRA or TI name.png or LoRA or TI name.preview.png for its thumbnails - and they have to be adjacent to the safetensors/pt files. It was why I made the enumerate loop break after saving 1 image. Now that I have content_type passed through to the image saver and the model folder selection is "cleaner", I think I can make it keep your functionality for checkpoints and keep my functionality for everything else with a simple "if content_type == "Checkpoint"

I'll PR your fork later this evening and take a look at it - or just edit my own to do "both" and let you know.

— Reply to this email directly, view it on GitHub https://github.com/Vetchems/sd-civitai-browser/issues/9#issuecomment-1444004022, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKV5XYBBHG3Z223PRQSS3WZDRGZANCNFSM6AAAAAAVEQP3AQ . You are receiving this because you authored the thread.Message ID: @.***>

vt-idiot commented 1 year ago

I'll take a look at it. The .preview suffix is more important for textual inversion embeddings, but I applied it to everything out of laziness. I'm not sure if CivitAI hosts any that are .png embeddings rather than .pt - so keeping it there was my way of preventing clobbering. And unfortunately it doesn't have any way to deal with having the {i} incremented suffix you had. Altho for .png embeddings it might just display the embedding itself as a preview, not sure, haven't used one in a while.

thetrebor commented 1 year ago

For mine I just said if {i} is 0, copy the file to the format the ui expects. That way the model plugin view is happy and the a1111 interface gets what it wants. Disk is cheap. In fact some of them are probably jpegs I’m just naming pngs because the browser doesn’t care and uses the file header to display them anyway.

On Feb 24, 2023 at 12:35:19 PM, vt-idiot @.***> wrote:

I'll take a look at it. The .preview suffix is more important for textual inversion embeddings, but I applied it to everything out of laziness. I'm not sure if CivitAI hosts any that are .png embeddings rather than .pt - so keeping it there was my way of preventing clobbering. And unfortunately it doesn't have any way to deal with having the {i} incremented suffix you had. Altho for .png embeddings it might just display the embedding itself as a preview, not sure, haven't used one in a while.

— Reply to this email directly, view it on GitHub https://github.com/Vetchems/sd-civitai-browser/issues/9#issuecomment-1444099905, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKV5RAEV7OEMHQY24UPC3WZDWNPANCNFSM6AAAAAAVEQP3AQ . You are receiving this because you authored the thread.Message ID: @.***>

Tobe2d commented 1 year ago

@thetrebor I tested your forked and I cant get it to show up in the ui. Removed it and copy the origianl repo and it show up in hte ui.

Any idea why your fork not showing up?

thetrebor commented 1 year ago

Sounds like a parse error in the Python. Did you see any output in the a1111 console? Maybe you don’t have one of the includes.

On Tue, Feb 28, 2023 at 5:19 PM Tobe2d @.***> wrote:

@thetrebor https://github.com/thetrebor I tested your forked and I cant get it to show up in the ui. Removed it and copy the origianl repo and it show up in hte ui.

Any idea why your fork not showing up?

— Reply to this email directly, view it on GitHub https://github.com/Vetchems/sd-civitai-browser/issues/9#issuecomment-1449001047, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKV5RZZ56C5BGZR7OA633WZZ2X3ANCNFSM6AAAAAAVEQP3AQ . You are receiving this because you were mentioned.Message ID: @.***>

Tobe2d commented 1 year ago

@thetrebor I see this:

Error loading script: civitai-api.py
Traceback (most recent call last):
  File "E:\stable-diffusion-webui\modules\scripts.py", line 229, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "E:\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1017, in get_code
  File "<frozen importlib._bootstrap_external>", line 947, in source_to_code
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "E:\stable-diffusion-webui\extensions\sd-civitai-browser\scripts\civitai-api.py", line 19
        # Maximum number of retries
    ^
SyntaxError: invalid non-printable character U+00A0
thetrebor commented 1 year ago

That's the last time I trust the GitHub web editor. I'll check out the repo properly on my SD machine and push an update that doesn't have nonsense characters in it today.

thetrebor commented 1 year ago

This should be corrected now in the main branch on the theTrebor fork.

Tobe2d commented 1 year ago

@thetrebor yes! it is working now ;-)

thetrebor commented 1 year ago

I've opened discussions and bug tracking on the Fork in thetrebor if we want to reconvene there.

etherealxx commented 1 year ago

@thetrebor Sorry if i might be late here. But as far as i know, when this repo died, axsddlr forked it, and because he disabled the issue tab, i forked it, which then the changes was pushed into camenduru's fork, and ppl using his colab uses his fork too.

And now that you made this fork, would be nice if you and @camenduru work together on a single fork😊

thetrebor commented 1 year ago

Happy to work with whoever. As long as the forks are comparable. I’m happy to have my additions merged into theirs. Are they actively working on it? I feel like a more featureful model manager for a1111 is really the core desire here right?

On Mar 25, 2023 at 5:28:18 AM, Etherealxx @.***> wrote:

@thetrebor https://github.com/thetrebor Sorry if i might be late here. But as far as i know, when this repo died, axsddlr forked it https://github.com/axsddlr/sd-civitai-browser, and because he disabled the issue tab, i forked it https://github.com/etherealxx/sd-civitai-browser, which then the changes was pushed into camenduru's fork https://github.com/camenduru/sd-civitai-browser, and ppl using his colab https://github.com/camenduru/stable-diffusion-webui-colab uses his fork too.

And now that you made this fork https://github.com/thetrebor/sd-civitai-browser, would be nice if you and @camenduru https://github.com/camenduru work together on a single fork😊

— Reply to this email directly, view it on GitHub https://github.com/Vetchems/sd-civitai-browser/issues/9#issuecomment-1483776178, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKV5TVQOUS7LMWD6QQQNDW523DFANCNFSM6AAAAAAVEQP3AQ . You are receiving this because you were mentioned.Message ID: @.***>

vt-idiot commented 1 year ago

Whelp, my fork is dead now with the Gradio update. Either of you have one working?

Disregard that, seems to work fine.

thetrebor commented 1 year ago

Mine was working as of a couple days ago. Let me test it with a pull and update tomorrow.

On Mar 25, 2023 at 9:57:28 PM, vt-idiot @.***> wrote:

Whelp, my fork is dead now with the Gradio update. Either of you have one working?

— Reply to this email directly, view it on GitHub https://github.com/Vetchems/sd-civitai-browser/issues/9#issuecomment-1483970363, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKV5V3K7CDIL62LHUSIILW56PARANCNFSM6AAAAAAVEQP3AQ . You are receiving this because you were mentioned.Message ID: @.***>

Vetchems commented 1 year ago

Hi everyone,

As you have seen I have not been able to be around much.

This project was never intended to be anything more than a quick and dirty way to pull models from civitai, It was created purely to avoid having to sign up to download on a remote server. I don't have much coding knowledge and never really thought this would even catch on. My biggest hope was that it inspired someone with better knowledge to make something better.

I will not likely be updating this as I don't feel I have the knowledge to add anything useful but i'm happy for anyone to continue working on this.

Vetchems commented 1 year ago

@thetrebor thank you for picking up on this, it appears to have become way more popular than I ever expected.

etherealxx commented 1 year ago

@Vetchems yes especially in the colab community, where it's not as easy as local installation to just download from civitai website. Your extension helps beginners a lot, especially mobile users. Hope you will continue this, or, atleast, supporting the forks😊

Also, thanks to your extension, it inspired me to do coding stuff too! I was a noob months ago, and i use your extension as my reference to learn how python and gradio works😋

thetrebor commented 1 year ago

Okay, apart from Gradio being a dumpster fire in general, my fork of the plugin still works. I was able to download a model and use it.

Are there features in the other forks that people want or do we just re-home to one of the forks and get the plugin link in A1111 changed?

On Mar 26, 2023 at 12:39:04 AM, Etherealxx @.***> wrote:

@Vetchems https://github.com/Vetchems yes especially in the colab community, where it's not as easy as local installation to just download from civitai website. Your extension helps beginners a lot, especially mobile users. Hope you will continue this, or, atleast, supporting the forks😊

Also, thanks to your extension, it inspired me to do coding stuff too! I was a noob months ago, and i use your extension as my reference to learn how python and gradio works😋

— Reply to this email directly, view it on GitHub https://github.com/Vetchems/sd-civitai-browser/issues/9#issuecomment-1483993100, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKV5TGI4ZJHXQJKJQRFY3W57B6RANCNFSM6AAAAAAVEQP3AQ . You are receiving this because you were mentioned.Message ID: @.***>

Tobe2d commented 1 year ago

@thetrebor yes it is still working and downloading however, I think the best 1st step for this project is to re-home and get the plugin link in Automatic1111 changed. After that in the new home we can discuss functions and fetures so it stays contained in one place.

thetrebor commented 1 year ago

Who wants to be the new baseline? That person is volunteering to get the PR done for A1111 to update the plugins list ;)

On Mar 27, 2023 at 11:33:27 AM, Tobe2d @.***> wrote:

@thetrebor https://github.com/thetrebor yes it is still working and downloading however, I think the best 1st step for this project is to re-home and get the plugin link in Automatic1111 changed. After that in the new home we can discuss functions and fetures so it stays contained in one place.

— Reply to this email directly, view it on GitHub https://github.com/Vetchems/sd-civitai-browser/issues/9#issuecomment-1485347716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKV5TCONQ4JHWDE6IXKTDW6GXMPANCNFSM6AAAAAAVEQP3AQ . You are receiving this because you were mentioned.Message ID: @.***>

Tobe2d commented 1 year ago

How to do that? if I say me what do I have to do?

thetrebor commented 1 year ago

Do you know how to make a PR? If not I should just do it

On Mon, Mar 27, 2023 at 2:57 PM Tobe2d @.***> wrote:

How to do that? if I say me what do I have to do?

— Reply to this email directly, view it on GitHub https://github.com/Vetchems/sd-civitai-browser/issues/9#issuecomment-1485703859, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKV5TEAVUP7FFGLN53CYDW6HPJBANCNFSM6AAAAAAVEQP3AQ . You are receiving this because you were mentioned.Message ID: @.***>

camenduru commented 1 year ago

Should we fork this repo and make a new official one?

Hi everyone, first of all, thanks to all for the contributions to the community ❤️ I believe this is the official repository, @Vetchems could you please add your active developers to your collaborators list?

Vetchems commented 1 year ago

@thetrebor I have merged your latest changes with this repo, do you have a way I can contact you off here? I can add you as a contributer here and stuff to save the hassle of switching links and repos etc i'm just not too familiar with git. let me know

thetrebor commented 1 year ago

I've accepted your invite, thank you. You can email me directly at Robert+civit@robertmaefs.com

Khayoon commented 1 year ago

Does it require running the "Start Stable-Diffusion" cell again, to load in the new textual inversions?

thetrebor commented 1 year ago

You should just be able to do the refresh on those panels in the front page. No reload required. It’s a little hidden. There’s a button under the “generate” button that reveals the textual inversion browser. In that spot you can see the “refresh” button that will update the list with new options and logos.

I still have to fix the image download for the thumbnail.

On Apr 12, 2023 at 12:30:28 PM, Saif Khayoon @.***> wrote:

Does it require running the "Start Stable-Diffusion" cell again, to load in the new textual inversions?

— Reply to this email directly, view it on GitHub https://github.com/Vetchems/sd-civitai-browser/issues/9#issuecomment-1505578301, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACKV5WVMCB7ODA4JQ4FMRDXA3KCJANCNFSM6AAAAAAVEQP3AQ . You are receiving this because you were mentioned.Message ID: @.***>