Code Monkey home page Code Monkey logo

Comments (12)

jmoney7823956789378 avatar jmoney7823956789378 commented on July 23, 2024 1

Here's startup, followed by my invoked command:

2023-06-08 00:09:34,765  INFO Starting oobabot, core version 0.1.10
2023-06-08 00:09:34,765  INFO Oobabooga is at ws://10.20.230.242:5005/
2023-06-08 00:09:34,773  INFO Connected to Oobabooga!
2023-06-08 00:09:34,773  INFO Stable Diffusion is at ws://10.20.230.240:7860
2023-06-08 00:09:34,789 DEBUG Stable Diffusion: Using desired sampler 'DPM++ SDE Karras'
2023-06-08 00:09:34,802 DEBUG Stable Diffusion: Options are already set correctly, no changes made.
2023-06-08 00:09:34,812  INFO Stable Diffusion: Available models: anything-v4.0-pruned-fp16, detailedprojectv4-fin, eden_V16, HoloAOM_3A1B, HoloKukiv2.2EyeFix-fp16, level4_v40BakedVAEFp16, level4_v50BakedVAEFp16, pastelMixStylizedAnime_pastelMixPrunedFP16, v2-1_768-ema-pruned, minaimix_, 512-base-ema
2023-06-08 00:09:34,812 DEBUG Stable Diffusion: Using negative prompt: easynegative, ng_dee...
2023-06-08 00:09:34,812  INFO Connected to Stable Diffusion!
2023-06-08 00:09:34,813  INFO Connecting to Discord... 

Here is a screenshot of output. For reference, I currently have the SD model "minaimix_" loaded. Draw word is "draw".

1686183326_Discord_6XDdiauuKt

This output is found in the logs, and is identical all three times I invoked the draw word.

2023-06-08 00:11:16,065 DEBUG Found image prompt: obama
2023-06-08 00:11:16,065 DEBUG Request from stoop poops in -DM-
2023-06-08 00:11:16,066 DEBUG Stable Diffusion: Image request (nsfw: False): obama

from oobabot.

chrisrude avatar chrisrude commented on July 23, 2024 1

Will take a look in the next few days, I likely made some error. Thanks for the detailed report!

from oobabot.

chrisrude avatar chrisrude commented on July 23, 2024

Cool, I didn't know you could keep multiple models in ram at once! The reason I hadn't added it before is the presumed delay in switching models.

from oobabot.

jmoney7823956789378 avatar jmoney7823956789378 commented on July 23, 2024

You can opt to keep last # models in RAM.

from oobabot.

jmoney7823956789378 avatar jmoney7823956789378 commented on July 23, 2024

Could you consider adding a command to query the SD server for available loras?
I've been reading the docs and it looks like there is a lot of potential for customization.
1.2.3.4:7860/sdapi/v1/loras
should return a huge json formatted list, including lora names, location, meta, etc.
I think we should only need the name and/or alias, to be used in a SD request prompt.
You can also request available models at: /sdapi/v1/sd-models but I'm still not sure if you can switch to a new model via api.
AUTOMATIC1111/stable-diffusion-webui#8041
This thread seems to have a method implemented, but as for how you'd tell the bot which model to use, I'm thinking maybe something like a slash command. Same method could be valid for asking the bot to query loras.

from oobabot.

chrisrude avatar chrisrude commented on July 23, 2024

I made a small change for this: bc2f11c

If a message request contains the name of a Stable Diffusion checkpoint, we will use that checkpoint to generate that specific image, then change back to the default afterwards.

We'll log the valid names at startup, to make it easier.

e.g.

Hi Rosie, make me a picture with Anything-V3.0 of a cat

Let me know what you think!

from oobabot.

jmoney7823956789378 avatar jmoney7823956789378 commented on July 23, 2024

Awesome. Really amazing stuff you're putting together!
Any potential for a /models or /loras to show available options in chat?

from oobabot.

jmoney7823956789378 avatar jmoney7823956789378 commented on July 23, 2024

If a message request contains the name of a Stable Diffusion checkpoint, we will use that checkpoint to generate that specific image, then change back to the default afterwards.

Unfortunately I haven't been able to get this to generate correctly.
It was set to AnythingV3.0, for reference.
I gave the prompt "tewi use 512-base-ema.ckpt to draw obama" and "tewi use 512-base-ema to draw obama", but it continued to use AnythingV3.0.

from oobabot.

chrisrude avatar chrisrude commented on July 23, 2024

Interesting; what do the logs say during startup and when the image generation is attempted? It should print out a message at each of those times related to models.

from oobabot.

jmoney7823956789378 avatar jmoney7823956789378 commented on July 23, 2024

Looks like I got it to work, but you have to include the model in the actual SD prompt.
Mentioning in any of the models before the SD invoke word is just ignored.
1686273168_Discord_29trdfVsKl

from oobabot.

chrisrude avatar chrisrude commented on July 23, 2024

So I was inspired by your earlier PR, and also anticipating users adding a bunch of requests saying "well I also want to be able to set xxx=yyyy can you add that please". 333b4b8

So, I expanded settings.yml to allow for a new parameter, user_override_params. This is what it sounds like -- any param name listed can be overridden, by setting param=value in the message.

It's required that all param names also appear in request_params, as we use that to determine the parameter's type for validation purposes.

Since this means we might now have multiple multi-word values, I changed the behavior of np= to instead take a quoted string. In fact a quoted string will now work for any value, so you can say something like:
np="cats, dogs, helicopters" sampler="DPM++ SDE Karras", steps=20

And it would work as you'd expect. Leaving out the quotes wouldn't work, as it would just take the text up until the first whitespace.

I also cleaned up the half-assed code I wrote to set model checkpoints above, and incorporated it in to work as just described.

Let me know what you think!

from oobabot.

jmoney7823956789378 avatar jmoney7823956789378 commented on July 23, 2024

So I was inspired by your earlier PR, and also anticipating users adding a bunch of requests saying "well I also want to be able to set xxx=yyyy can you add that please". 333b4b8

So, I expanded settings.yml to allow for a new parameter, user_override_params. This is what it sounds like -- any param name listed can be overridden, by setting param=value in the message.

It's required that all param names also appear in request_params, as we use that to determine the parameter's type for validation purposes.

Since this means we might now have multiple multi-word values, I changed the behavior of np= to instead take a quoted string. In fact a quoted string will now work for any value, so you can say something like: np="cats, dogs, helicopters" sampler="DPM++ SDE Karras", steps=20

And it would work as you'd expect. Leaving out the quotes wouldn't work, as it would just take the text up until the first whitespace.

I also cleaned up the half-assed code I wrote to set model checkpoints above, and incorporated it in to work as just described.

Let me know what you think!

It's working great!
I saw you pretty much redid the whole params part to be pretty open-ended, which is awesome.
Thank you for all that you do!

from oobabot.

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.