Skip to content

frankchieng/stable-diffusion-php

Repository files navigation

stable-diffusion-php

stability updates new engine stable-diffusion-xl-1024-v0-9, the resolution improved a lot with 1024*1024, adding negative prompt with weights

stable diffusion text2img ,img2img,imginpaint and image upscaling of AI with php

stability.ai API text to image, image to image, image mask inpainting with canvas and image upscaling with php coding

you can experience with the latest stable diffusion SDXL beta engine here.

you should define your own stability.ai api key in the config.inc.php file.If you see openAI configuration,just ignore it,i've implemented chatgpt and openai whisper audio to text already,but this project is just for image content.

because the stability.ai API documents has no clue of php version, develop from scratch FYI.If it's available for you, give me a star for supporting.

php+mysql+jquery supported by php version >= 7.4.33

stabilityai.php is the text to image landing page. sdimg2img.php is the image to image landing page. (upload img should be multiply of 64, otherwise the REST server will response with error) sdupscaling.php is the image upscaling landing page. sdimginpaint.php is the image mask inpaint landing page.

chrome browser and mobile phone visit with various jquery plugins.

tips:the whole project contains chatgpt and stable diffusion,so js/chat.js includes some chatgpt javascript,you should ignore it, backend administration contains chatgpt tokens consumption and fees codes and wechat userinfo,wepay integrated in this whole project,anyone want to follow leave a message here

plan for future: complete various image generation AI functionalities ,cuz stability.ai currently has no controlnet API for use, continue to follow the latest info on official website.

SDXL 0.9 new engine generation: image image image image image

text to image generating examples: image image image image

image to image generating examples:

original pic:

image

prompt: a bedroom,a laptop on desk

image image

image upscaling examples: resolution 512*512

image

resolution 1024*1024

image

resolution 2048*2048

image

image mask inpaint generation examples:

original pic:

image

canvas mask img:

image

prompt:batman face

mask inpaint image:

image

image

if anyone interested can contact me on my individual Weixin:

image

About

stability.ai API text to image and image to image with php coding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published