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

feat: add image generation with ncnn-stablediffusion #272

Merged
merged 8 commits into from
May 16, 2023
Merged

Conversation

mudler
Copy link
Owner

@mudler mudler commented May 16, 2023

LocalAIImages2

Example with curl:

curl http://localhost:8080/v1/images/generations -H "Content-Type: application/json" -d '{
            "prompt": "floating hair, portrait, ((loli)), ((one girl)), cute face, hidden hands, asymmetrical bangs, beautiful detailed eyes, eye shadow, hair ornament, ribbons, bowties, buttons, pleated skirt, (((masterpiece))), ((best quality)), colorful|((part of the head)), ((((mutated hands and fingers)))), deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, Octane renderer, lowres, bad anatomy, bad hands, text",
            "size": "256x256"
          }'
mode=0 mode=1 (winograd/sgemm)
test b643343452981
b6441997879 winograd2
winograd winograd3

This PR adds golang bindings for https://github.com/EdVince/Stable-Diffusion-NCNN in order to generate images with stable diffusion.

Currently supports up to 512x512 image size.

To enable: make GO_TAGS=stablediffusion build
Requires: opencv, libgomp

@mudler mudler force-pushed the image-gen branch 3 times, most recently from ecee188 to 9e89204 Compare May 16, 2023 15:10
@mudler mudler marked this pull request as ready for review May 16, 2023 16:34
@mudler mudler linked an issue May 16, 2023 that may be closed by this pull request
@mudler mudler merged commit 9d051c5 into master May 16, 2023
3 checks passed
@mudler mudler deleted the image-gen branch May 16, 2023 17:32
@sumersm7
Copy link

how to use diffrent models with this. or where to get models compatible with ncnn.

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

Successfully merging this pull request may close these issues.

feature: image generation
2 participants