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

/generate for image generation #464

Closed
wants to merge 28 commits into from
Closed

Conversation

nsarrazin
Copy link
Collaborator

@nsarrazin nsarrazin commented Sep 28, 2023

Simpler than agents, just uses /generate [prompt] to generate images.

Contains:

  • Support for file uploads to mongodb from the backend
  • Serving files from mongodb
  • Letting the front-end know about files in message
  • Modular tools env variable (tools defined in .env using TOOLS var, see readme)

@nsarrazin nsarrazin marked this pull request as ready for review September 29, 2023 12:51
@nsarrazin
Copy link
Collaborator Author

nsarrazin commented Oct 2, 2023

I played with settings a bit, I think

TOOLS = `[
  {
    "name" : "textToImage",
    "model" : "stabilityai/stable-diffusion-xl-base-1.0",
    "parameters" : {
      "num_inference_steps" : 25,
      "guidance_scale": 8
    }
  },

gives the best balance between quality & performance, since we're not using the refiner. We could increase the number of steps but the trade off would be extra load on the endpoint/slower response time.

@nsarrazin nsarrazin requested a review from gary149 October 2, 2023 16:01
@nsarrazin
Copy link
Collaborator Author

For visibility on the feature we can use one of the examples prompt in the UI:

image image
    "promptExamples": [
      {
        "title": "Draw a llama with SDXL 📷",
        "prompt": "/generate funky colorful llama wearing sunglasses, cartoon"
      }, {
        "title": "Code a snake game",
        "prompt": "Code a basic snake game in python, give explanations for each step."
      }, {
        "title": "Assist in a task",
        "prompt": "How do I make a delicious lemon cheesecake?"
      }
    ],

@nsarrazin nsarrazin added enhancement New feature or request tools front This issue is related to the front-end of the app. back This issue is related to the Svelte backend or the DB labels Oct 3, 2023
Copy link
Contributor

@julien-blanchon julien-blanchon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool stuff ! How it's going on ?

@nsarrazin
Copy link
Collaborator Author

Closing this for now, I think we can implement it easily if we want when #531 is done.

@nipierre
Copy link

Hi @nsarrazin, any news on this feature as #531 merged ? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back This issue is related to the Svelte backend or the DB enhancement New feature or request front This issue is related to the front-end of the app. tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants