Skip to content

Commit

Permalink
Merge pull request #43 from KevinBatdorf/stable-diffusion-v2
Browse files Browse the repository at this point in the history
Add stable diffusion v2 test version
  • Loading branch information
KevinBatdorf authored Nov 25, 2022
2 parents 20cae07 + e716975 commit a3c84ef
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-production-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
CI: true

- name: Package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: stable-diffusion
retention-days: 5
Expand Down
8 changes: 7 additions & 1 deletion cypress/support/gutenberg.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ export const closeBlockInserter = () => {
};
export const addBlock = (slug) => {
cy.openBlockInserter();
cy.get(`button[class*="${slug}"]`).click();
cy.window().then((win) => {
cy.waitUntil(() =>
win.document.querySelector(`button[class*="${slug}"]`),
);
cy.get(`button[class*="${slug}"]`).should('exist');
cy.get(`button[class*="${slug}"]`).click({ force: true });
});
};
export const wpDataSelect = (store, selector, ...parameters) => {
cy.window().then((win) => {
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: kbat82
Tags: block, stable diffusion, ai, prompt, artificial intelligence, generate, pokemon, dall-e, midjourney
Tested up to: 6.1
Stable tag: 0.6.0
Stable tag: 0.7.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -56,6 +56,9 @@ We also offer additional features on top of the Replicate API, such as prompt/ou

== Changelog ==

= 0.7.0 - 2022-11-24 =
- Feature: Add test version of Stable Diffusion v2

= 0.6.0 - 2022-11-22 =
- Feature: Add OpenJourney model - Stable Diffusion fine tuned on Midjourney v4 images.

Expand Down
8 changes: 5 additions & 3 deletions src/components/features/PromptGenerator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ export const PromptGenerator = ({

// For now only show on this model
if (
!['stability-ai/stable-diffusion', 'prompthero/openjourney'].includes(
currentModel,
)
![
'stability-ai/stable-diffusion',
'prompthero/openjourney',
'cjwbw/stable-diffusion-v2',
].includes(currentModel)
)
return null;

Expand Down
9 changes: 9 additions & 0 deletions src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ export const models: ModelAttributes[] = [
),
image: 'https://bucketeer-be99e627-94e7-4e5b-a292-54eeb40ac303.s3.amazonaws.com/public/models_models_featured_image/c63d605d-b5e3-4fb0-9b0d-79f00a710f7c/out-0.png',
},
{
id: 'cjwbw/stable-diffusion-v2',
name: __('Stable Diffusion v2 (Test)', 'stable-diffusion'),
description: __(
'Test implimentation of Stable Diffusion V2',
'stable-diffusion',
),
image: 'https://bucketeer-be99e627-94e7-4e5b-a292-54eeb40ac303.s3.amazonaws.com/public/models_models_featured_image/d8e0c1ca-1256-43d2-b5e6-773c61ffc629/out-0_2.png',
},
{
id: 'lambdal/text-to-pokemon',
name: __('Text to Pokémon', 'stable-diffusion'),
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export type AvailableModels =
| 'stability-ai/stable-diffusion'
| 'cjwbw/stable-diffusion-v2'
| 'lambdal/text-to-pokemon'
| 'prompthero/openjourney'
| 'methexis-inc/img2prompt'
Expand Down
2 changes: 1 addition & 1 deletion stable-diffusion.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: Generate unique images from text prompts using machine learning, all in the cloud.
* Requires at least: 5.8
* Requires PHP: 7.0
* Version: 0.6.0
* Version: 0.7.0
* Author: Kevin Batdorf
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down

0 comments on commit a3c84ef

Please sign in to comment.