]> git.cworth.org Git - zombocom-ai/log
zombocom-ai
17 months agoAdd dependencies on express-session and session-file-store
Carl Worth [Thu, 8 Dec 2022 05:46:42 +0000 (21:46 -0800)]
Add dependencies on express-session and session-file-store

Again, this auto-commit was created with:

npm install express-session
        npm install session-file-store

17 months agoMake the safety prompt dynamic
Carl Worth [Thu, 8 Dec 2022 01:46:13 +0000 (17:46 -0800)]
Make the safety prompt dynamic

And significantly more interesting, I think.

17 months agoFix bug in clearing the spinner after image generation is done
Carl Worth [Thu, 8 Dec 2022 01:11:47 +0000 (17:11 -0800)]
Fix bug in clearing the spinner after image generation is done

The function is clearTimeout, not cancelTimeout.

17 months agoAdd exception handling to execution of image generation script
Carl Worth [Thu, 8 Dec 2022 01:05:58 +0000 (17:05 -0800)]
Add exception handling to execution of image generation script

So that if the script fails for some reason, the server doesn't crash.

17 months agoTimeout on image generation after 60 seconds
Carl Worth [Thu, 8 Dec 2022 00:57:18 +0000 (16:57 -0800)]
Timeout on image generation after 60 seconds

If the image doesn't come back, just hide the spinner and bring back
the form so they can try again.

17 months agoDisplay spinner while image is being generated
Carl Worth [Thu, 8 Dec 2022 00:47:43 +0000 (16:47 -0800)]
Display spinner while image is being generated

And hide it again when that's over.

17 months agoPrepend images as they are generated
Carl Worth [Thu, 8 Dec 2022 00:37:13 +0000 (16:37 -0800)]
Prepend images as they are generated

So that the most-recently-generated image is always there at the top,
without requiring a big scroll to reach it.

17 months agoHide image-generation form while generation is happening
Carl Worth [Thu, 8 Dec 2022 00:35:49 +0000 (16:35 -0800)]
Hide image-generation form while generation is happening

Giving the user a queue that something is happening (and helping to
avoid queueing the generation of multiple identical images).

17 months agoPut the safety-prompt button up by the label of the textarea it controls
Carl Worth [Thu, 8 Dec 2022 00:25:32 +0000 (16:25 -0800)]
Put the safety-prompt button up by the label of the textarea it controls

Hopefully this is both more intuitive and lays out better.

17 months agoAllow user to zoom
Carl Worth [Thu, 8 Dec 2022 00:10:10 +0000 (16:10 -0800)]
Allow user to zoom

Which can be important to be able to see an image more clearly.

17 months agoLimit generated filename to something not crazy
Carl Worth [Wed, 7 Dec 2022 19:58:07 +0000 (11:58 -0800)]
Limit generated filename to something not crazy

Since otherwise, with a crazy-long prompt, we could exceed the limit
of the filesystem, (which I think is 255 characters for what I'm using
for the server currently). In this commit, we don't use more than 200
characters from the prompt itself, to which we could add 10 from the
seed and another handful for separators and a file extension, so that
should be good.

17 months agoSwitch to new 2.1 model of Stable Diffusion and also 768x768 pixels
Carl Worth [Wed, 7 Dec 2022 19:52:44 +0000 (11:52 -0800)]
Switch to new 2.1 model of Stable Diffusion and also 768x768 pixels

That's a slightly more expensive mode to run in, but should still give
up to 1000 images for only $10.

17 months agoGenerate new structure for images
Carl Worth [Wed, 7 Dec 2022 18:17:52 +0000 (10:17 -0800)]
Generate new structure for images

Using both a figure and a figcaption for each image. This allows for
more structured styling.

17 months agoFix a mix-up of "code" vs. "seed"
Carl Worth [Wed, 7 Dec 2022 09:35:04 +0000 (01:35 -0800)]
Fix a mix-up of "code" vs. "seed"

The UI at the top-level facing the users uses "code", but the API down
deep uses "seed" so there has to be a switch at some point, which
wasn't quite correct before this fix.

17 months agoFix DOM code so that prompt and code appear for each image
Carl Worth [Wed, 7 Dec 2022 09:31:43 +0000 (01:31 -0800)]
Fix DOM code so that prompt and code appear for each image

The DOM really does make things so painful!

17 months agoReplay previous images to a client when it first connects
Carl Worth [Wed, 7 Dec 2022 08:58:06 +0000 (00:58 -0800)]
Replay previous images to a client when it first connects

so that the images are just as persistent as the comments

17 months agoClient: Add received images to the DOM
Carl Worth [Wed, 7 Dec 2022 08:54:37 +0000 (00:54 -0800)]
Client: Add received images to the DOM

Nothing fancy here for stlying yet, but it should be functional at least.

17 months agoHook the server up to actually generate images
Carl Worth [Wed, 7 Dec 2022 08:31:56 +0000 (00:31 -0800)]
Hook the server up to actually generate images

And the images are even being sent back to the clients, (but they are
just ignoring those events for now).

17 months agoAdd generate_image.py script
Carl Worth [Wed, 7 Dec 2022 07:55:29 +0000 (23:55 -0800)]
Add generate_image.py script

Which uses the dreamstudio interface to Stable Diffusion to generate
images from a text prompt. This does require an API key and has non-zero
cost, but I'm willing to do this for now, (and fortunately, the Stable
Diffusion code itself is entirely open-source so I could switch to my
own hardware when I decide to).

17 months agoAdd code to submit image generation instructions to the server
Carl Worth [Wed, 7 Dec 2022 06:35:20 +0000 (22:35 -0800)]
Add code to submit image generation instructions to the server

Though the server is just printing them on the console for now, and not
actually doing any image generation yet.

17 months agoFix typo
Carl Worth [Wed, 7 Dec 2022 06:22:52 +0000 (22:22 -0800)]
Fix typo

Zombocom, not Zombcom

17 months agoShift flex layout down into a new div below form-row
Carl Worth [Wed, 7 Dec 2022 06:19:22 +0000 (22:19 -0800)]
Shift flex layout down into a new div below form-row

Since flex was interfering with the grid we had working before.

17 months agoDrop explicit size from numeric code text input
Carl Worth [Wed, 7 Dec 2022 06:14:13 +0000 (22:14 -0800)]
Drop explicit size from numeric code text input

We're using CSS and flex to let this grow instead.

17 months agoSimple reword of "Numeric code" placeholder text
Carl Worth [Wed, 7 Dec 2022 06:06:17 +0000 (22:06 -0800)]
Simple reword of "Numeric code" placeholder text

Trying to make it more clear (and ensure it fits).

17 months agoAnd now read in saved comments at server start
Carl Worth [Wed, 7 Dec 2022 06:02:26 +0000 (22:02 -0800)]
And now read in saved comments at server start

So we should now have persistent messages across server restarts.

17 months agoWrite comments out to disk when the server exits
Carl Worth [Wed, 7 Dec 2022 05:39:24 +0000 (21:39 -0800)]
Write comments out to disk when the server exits

Which is half of what we need for fully persistent messages, (will
need to also load them at startup).

17 months agoAdd peristence of comments
Carl Worth [Wed, 7 Dec 2022 05:21:29 +0000 (21:21 -0800)]
Add peristence of comments

The server saves every message it receives, and replays them to each
new client when it joins.

Note: The server is only holding messages in memory, so there's not
yet any persistence across server restarts.

17 months agoAdd the second half necessary for functional comments
Carl Worth [Wed, 7 Dec 2022 04:24:27 +0000 (20:24 -0800)]
Add the second half necessary for functional comments

The server emits the comment back to all clients and the client appends
to a <ul> item (through simple DOM manipulations).

17 months agoAdd a (half)-functional comment field
Carl Worth [Wed, 7 Dec 2022 04:18:59 +0000 (20:18 -0800)]
Add a (half)-functional comment field

This sends the comment from the client to the server (but not back again).

The server process simply prints the comment out on its console.

17 months agoMake a socket connection from client to server
Carl Worth [Wed, 7 Dec 2022 04:11:15 +0000 (20:11 -0800)]
Make a socket connection from client to server

Nothing useful yet, just a print on the server side to prove it's working.

17 months agoAdd socket.io as a dependency
Carl Worth [Wed, 7 Dec 2022 04:07:40 +0000 (20:07 -0800)]
Add socket.io as a dependency

This commit was made with:

npm install socket.io

17 months agoFloat the "safety prompt" button to the right.
Carl Worth [Wed, 7 Dec 2022 02:02:05 +0000 (18:02 -0800)]
Float the "safety prompt" button to the right.

Starting to get this form to look like what I want.

17 months agoAllow the generate button to get its own styling
Carl Worth [Wed, 7 Dec 2022 01:52:33 +0000 (17:52 -0800)]
Allow the generate button to get its own styling

This needs to the be the equivalent of a "big red button" (even if not red).

17 months agoRestrict code input field to 10 characters
Carl Worth [Wed, 7 Dec 2022 01:50:19 +0000 (17:50 -0800)]
Restrict code input field to 10 characters

It really shouldn't need to be longer than that.

17 months agoMake the prompt a textarea to fit more text into it.
Carl Worth [Wed, 7 Dec 2022 01:44:43 +0000 (17:44 -0800)]
Make the prompt a textarea to fit more text into it.

Helping to suggest that this can be a rather long input.

17 months agoMake the "Safety Prompt" button actually do something.
Carl Worth [Wed, 7 Dec 2022 01:28:20 +0000 (17:28 -0800)]
Make the "Safety Prompt" button actually do something.

Eventually it will be a bit more dynamic than this.

17 months agoMove some padding from every p to a new "content" div
Carl Worth [Wed, 7 Dec 2022 01:21:55 +0000 (17:21 -0800)]
Move some padding from every p to a new "content" div

Trying to bring sanity to this mess styling.

17 months agoAdd some labels to the form fields
Carl Worth [Wed, 7 Dec 2022 01:04:30 +0000 (17:04 -0800)]
Add some labels to the form fields

To make it a little more clear what is going on.

17 months agoFix the mute toggle
Carl Worth [Wed, 7 Dec 2022 01:00:07 +0000 (17:00 -0800)]
Fix the mute toggle

Which we broke by dropping its id in the previous commit.

17 months agoAdd a "volume" class to the volume button
Carl Worth [Wed, 7 Dec 2022 00:57:05 +0000 (16:57 -0800)]
Add a "volume" class to the volume button

Since we recently added other buttons that shouldbe styled differently.

17 months agoAdd a simple form to the main page
Carl Worth [Wed, 7 Dec 2022 00:53:47 +0000 (16:53 -0800)]
Add a simple form to the main page

To allow for submitting a prompt to generate, (not that it does anything yet).

17 months agoRewrite primary path as /index.html
Carl Worth [Wed, 7 Dec 2022 00:45:52 +0000 (16:45 -0800)]
Rewrite primary path as /index.html

Since that's what we have Apache configured to look for.

17 months agoAdd a simple express server
Carl Worth [Wed, 7 Dec 2022 00:36:53 +0000 (16:36 -0800)]
Add a simple express server

And an HTML file for it to serve, (copied in from the zombocom-static
repository I made earlier today).

17 months agoAdd express4 as a dependency
Carl Worth [Tue, 6 Dec 2022 23:38:31 +0000 (15:38 -0800)]
Add express4 as a dependency

The changes here were made by running:

npm install express@4

And then adding the package-locj.json file (containing frozen versions
of all dependencies) and also ignoring the node_modules directory.

17 months agoAdd initial packages.json
Carl Worth [Tue, 6 Dec 2022 23:35:55 +0000 (15:35 -0800)]
Add initial packages.json

Just declaring a name, version, and description for this package.

Note: This is from following the tutorial at:

    https://socket.io/get-started/chat