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

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

Open
thetrebor opened this issue Feb 22, 2023 · 33 comments
Open

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

thetrebor opened this issue Feb 22, 2023 · 33 comments

Comments

@thetrebor
Copy link
Collaborator

@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
Copy link

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

  • The model folder logic didn't make any sense to me, so I had it determine the folder once when you hit "model info"
  • Changed the "new" folder option to "subfolder" without the new - default behavior is now to put the download directly in the appropriate folder. Downloading the hypothetical github_logo LoRA would just save it to models\Lora\github_logo_v1.safetensors or e.g. models\Lora\github_is_it_a_cat_or_what\github_logo_v1.safetensors with subfolder ticked
  • I personally never download checkpoints, and the image download button actually didn't seem to work outside of downloading checkpoints? I changed the behavior, it downloads one image, and uses pillow to actually save it as a png if it isn't already, since civitai only hosts jpg and the extra networks button only looks for pngs. and I did it REAL ugly too, with a break during the for loop, lmao. but it will function for saving a preview of TI, Lora, and Hypernetworks now!

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
Copy link
Collaborator Author

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
Copy link

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

@vt-idiot
Copy link

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
Copy link
Collaborator Author

thetrebor commented Feb 24, 2023 via email

@vt-idiot
Copy link

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
Copy link
Collaborator Author

thetrebor commented Feb 24, 2023 via email

@Tobe2d
Copy link

Tobe2d commented Feb 28, 2023

@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
Copy link
Collaborator Author

thetrebor commented Mar 1, 2023 via email

@Tobe2d
Copy link

Tobe2d commented Mar 1, 2023

@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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

@Tobe2d
Copy link

Tobe2d commented Mar 1, 2023

@thetrebor yes! it is working now ;-)

@thetrebor
Copy link
Collaborator Author

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

@etherealxx
Copy link

@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
Copy link
Collaborator Author

thetrebor commented Mar 25, 2023 via email

@vt-idiot
Copy link

vt-idiot commented Mar 26, 2023

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

Disregard that, seems to work fine.

@thetrebor
Copy link
Collaborator Author

thetrebor commented Mar 26, 2023 via email

@Vetchems
Copy link
Owner

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
Copy link
Owner

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

@etherealxx
Copy link

@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
Copy link
Collaborator Author

thetrebor commented Mar 27, 2023 via email

@Tobe2d
Copy link

Tobe2d commented Mar 27, 2023

@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
Copy link
Collaborator Author

thetrebor commented Mar 27, 2023 via email

@Tobe2d
Copy link

Tobe2d commented Mar 27, 2023

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

@thetrebor
Copy link
Collaborator Author

thetrebor commented Mar 27, 2023 via email

@camenduru
Copy link

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
Copy link
Owner

@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
Copy link
Collaborator Author

I've accepted your invite, thank you. You can email me directly at [email protected]

@Khayoon
Copy link

Khayoon commented Apr 12, 2023

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

@thetrebor
Copy link
Collaborator Author

thetrebor commented Apr 12, 2023 via email

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

No branches or pull requests

7 participants