πΆ NOTICE: CushyStudio is still in development. It updates and breaks often. We are working hard to make a stable version. Current Focus is on improving the install experience and switching to some real production-ready database πΆ
π₯οΈ Cushy Studio: A modern and cross-platform software to Play and Work with Generative AI Art. Explore and build generative Apps. π Image, π₯ Video, and π§ 3d. Welcome to the future.
π Cushy Apps: Self-contained, use-case-centric applications with dedicated UIs that make generative art simple for everyone. Find the app for you need in the Cushy Library, from general-purpose Apps to very specific ones for dedicated use cases.
π Cushy SDK: Automate your work or tackle specific use cases by building your own App. CushyStudio is packed with power-user tools to support you in building the "app" of your dreams. Once ready, share it with the world through the cushy app library.
βοΈ Cushy Cloud: A cloud GPU renting service is launching soon so you can play with any demanding app, even on mobile devices. Fair prices to fund the CushyStudio growth, and grow the community. Growing the community includes revenue sharing with app creators when users rent GPU to use their app.
π Cushy Foundation: Cushy is made to last. Free and Open source. It builds on proven technologies like ComfyUI, Stable Diffusion, FFmpeg, or ImageMagick. It features an extensible core and a professional UI with dockable panes. It is LLM-friendly. The project is early, but I'm (rvion) committed to growing this. If you like this, please, sponsor my work:
media 1: CushyStudio
media 2: CushyStudio gallery
- a list of apps ready to be used
media 3: ComfyUI on steroids
Art blooms in bytes, vast,
In Cushy realms, ideas soar,
For all, art awakes.
media 4: Sample Video (placeholder until real video)
2023-11-15_01-17-02.mp4
-
download this repository,
git clone https://github.com/rvion/CushyStudio --depth 1 cd CushyStudio
-
click
_windows_INSTALL.bat
(on windows)_macos_INSTALL.sh
(on macos)_linux_INSTALL.sh
(on linux)
- click
_windows_START.bat
(on windows)_macos_START.sh
(on macos)_linux_START.sh
(on linux)
You can update CushyStudio in two ways:
-
- Safest: Close Cushy, and run the
1_update.sh
(mac, Linux) or1_update.bat
(window)
- Safest: Close Cushy, and run the
-
- Fastest: Click the update button in the top navbar (may not work when dependencies changes)
- CushyStudio uses a powerful dock system to organize your workspace.
- Every panel can be moved around, and even detached from the main window.
- Use ctrl+w or cmd+w to close the current tab
- Use the
Library
panel to select theCushyStudio/prompt
card. - Pick a model and click
run
to see it in action
- Open the
Library
panel to select theCushyStudio/prompt
card.
- Lots of Shorcuts, and way more to come.
- Right-clicking any tooltip / menu / dropdown handle make the tooltip persistently visible
- left and right borders fold back when tab handle is clicked
- click any version number to reveal a update system
- β Quickly switch between various ComfyUI setups
- β Parallelize work across multiple instances
- β Automatically download images in your local outputs folder
- β Automatically upload missing files
- β Powerful image hashing system to avoid duplicate uploads
ποΈ CushyStudio is directly compatible with ComfyUI workflow json format and images. Add them to the action folder to quickly use them inside CushyStudio.
You can convert them to actions in cone click t
- baked in prompt-master system prompt to quickly try llms
- ability to define custom agents / customize every system prompts
- open-router based
- => you have access to all the models chatgpt4, claude 2, various unfiltered llama flavors, etc.
2023-10-19_00-39-13.mp4
- β Embedded Civitai browser so you can find and copy models refs for download
- β Civitai custom ComfyUI Nodes support
- β Dedicated Civitai widgets to augment your allow your apps to select CivitAI models directly
Layers, effects, masks, blending modes, ...and more. Always one click away
π In case you have a problem, check the logs and report what you see
- Define your own UI
- Build one or many prompts with custom logic in TypeScript
- Type-safe experience pushed to the MAXIMUM
- Every single value/enum is typed
- A built-in standard library made to quickly build your dream workflow
- Use lambda to get completion only for the node that produces the value needed
Creating Apps is easy. In this section, we will
- Understand how CushyStudio works,
- See how to create a custom deck
- See how to edit your apps
- See how to publish your deck on the library
-
On startup, CushyStudio connect to your ComfyUI server(s)
-
CushyStudio then scans your
ComfyUI
install and generates the whole TypeScript SDK supporting all your custom nodes, assets, models installed, etc. -
All your custom nodes, models, and images will be converted to
enums
,classes
,helpers
, etc, allowing you to create Apps with maximum type safety and completion. you can check the generated SDK atschema/global.d.ts
.- π this file is updated after each ComfyUI connection.
- π It means it will only be created after the first successful connection to your ComfyUI instance
An Action
is self-contained.
- A widget definition (
"ui"
function) - An execution logic (
"run"
function)- The
"run"
function will receive the widget value when you click therun
button
- The
Here is a very simple card that prints the value you enter
card({
ui: (form) => ({ name: form.str({}) }),
run: (runtime) => runtime.print('Hello World')
})
A Package
is a folder containing
- A list of Apps
- A list of
assets
- A list of
prefabs
- Some
documentation
about how to use those apps - Some
metadata
for proper library indexing.
Decks are made to be shared.
- You can download
Decks
from theLibrary
panel - You can publish
Decks
from theLibrary
panel
-
Click the
[+ Create Package]
button at the top of theLibrary
-
Enter your
github username
anddeck name
- π Your
github username
will be your dedicated namespace in the library - π All your decks will live under the
library/<username>/
folder
- π Your
-
Click
[OK]
- It will create those files
library/<username>/<deckname>/readme.md
- A readme file to explain what your deck is about
library/<username>/<deckname>/cushy-deck.json
- Manifest that lists all your apps for better library integration
library/<username>/<deckname>/_prefab.ts
- A file where you can place your prefabs.
- It contains some example prefabs for you to build upon
- The file starts with an
_
so it's not listed in CushyStudio
library/<username>/<deckname>/sample-card-1.ts
- First sample action
library/<username>/<deckname>/sample-action-2.ts
- Second sample action
- It will create those files
-
Open the
sample-action-1.ts
card -
Click the
[edit]
button to open the card invscode
- π Everything is preconfigured to run correctly in vscode and make you productive right away
- π For this, you need to open the whole CushyStudio folder within vscode
- π (NOT just the action folder, NOR the action file itself)
card('demo1-basic', {
author: 'rvion',
ui: (form) => ({ positive: form.str({ label: 'Positive', default: 'flower' }), }),
run: async (action, form) => {
// Build a ComfyUI graph
const graph = action.nodes
const ckpt = graph.CheckpointLoaderSimple({ ckpt_name: 'albedobaseXL_v02.safetensors' })
const seed = action.randomSeed()
const sampler = graph.KSampler({
seed: seed,
steps: 20,
cfg: 14,
sampler_name: 'euler',
scheduler: 'normal',
denoise: 0.8,
model: ckpt,
positive: graph.CLIPTextEncode({ text: form.positive, clip: ckpt }),
negative: graph.CLIPTextEncode({ text: '', clip: ckpt }),
latent_image: graph.EmptyLatentImage({ width: 512, height: 512, batch_size: 1 }),
})
graph.SaveImage({
images: graph.VAEDecode({ samples: sampler, vae: ckpt }),
filename_prefix: 'ComfyUI',
})
// Run the graph you built
await action.PROMPT()
},
})
A Card
is a file containing
- An UI definition (widgets, form, styles, default values, tabs, etc...)
- A piece of code that runs your action
- ...And more
The simplest way to modularize your Apps is to build prefabs
.
Prefabs
allow you to re-use parts of your apps in other apps.Prefabs
allow you to re-use parts of your apps multiple times in your cardPrefabs
are functions that can addwidgets
(ui part) orsubgraphs
(execution part).Prefabs
allow you to build complex apps very efficiently.
Best practices:
- Usually, your
Package
will contain one or manyprefab
files, - You can The main
prefab
used by the built-indeck
here:library/CushyStudio/default/_prefab.ts
:
- π A
ui prefab
is afunction
that takes aformBuilder
and returns aWidget
. - π A
run prefab
is a function that takes aruntime
and modifies itsgraph
or performs other actions. - π A
util prefab
is a helper function that does whatever.
Example:
// FILE: `_ui.ts`
import type { FormBuilder } from 'src/controls/FormBuilder'
// π this is a ui prefab you can use in any card you want.
export const ui_startImage = (form: FormBuilder) =>
form.group({
items: () => ({
startImage: form.imageOpt({ group: 'latent' }),
width: form.int({ default: 512, group: 'latent', step: 128, min: 128, max: 4096 }),
height: form.int({ default: 512, group: 'latent', step: 128, min: 128, max: 4096 }),
batchSize: form.int({ default: 1, group: 'latent', min: 1, max: 20 }),
}),
})
To use a prefab
in your card, you can simply import it and use it.
ui prefabs
are made to be used in theui
function of your card.run prefabs
are made to be used in therun
function of your card.run prefabs
are made to be used in therun
function of your card.
// FILE: `card1.ts`
import { ui_startImage } from './_ui'
card({
name: 'card1',
ui: (formBuilder) => {
return {
a: ui_startImage(formBuilder), // π HERE
b: ui_startImage(formBuilder), // π HERE
c: formBuilder.int({ default: 1 }),
}
},
run: async (flow, p) => {
flow.print(`startImage: ${p.a.startImage}`)
flow.print(`startImage: ${p.b.startImage}`)
},
})
The resulting card looks like this:
CushyStudio aims to be accessible to non-programmers, while still being powerful enough for advanced users. You don't need to know typescript to get started, you can just learn what you need along the way.
This section is not a typescript tutorial, but rather a list of points of attention you may need to pay attention to when building apps if you're not a typescript developer.
Be careful to understand those various notations for functions
const fn = () => ({ a: 1 })
// π π
This is equivalent to:
const fn = () => {
return {a: 1}
}
Or to
function fn() {
return {a: 1}
}
Publishing your deck/apps is easy!
-
When creating a deck, CushyStudio automatically
- initializes the git repository for you.
- configures remote to point to the GitHub repository with the same name as your deck
-
Create a GitHub repository. (https://github.com/new)
-
Commit your deck files
- You can one-click the
publish
button in your deck entry in the library - You can follow the instructions given by Git Hub on the new repository page
- You can one-click the
-
Open an issue asking to add your
Package
to theLibrary
.
SHOW EXAMPLE
cd library/rvion
git init
Initialized empty Git repository in /Users/loco/dev/CushyStudio/library/rvion/.git/
git add .
git commit -m "first commit"
[master (root-commit) 602fab1] first commit
4 files changed, 146 insertions(+)
create mode 100644 mask-face.ts
create mode 100644 rembg.ts
create mode 100644 replace-part.ts
create mode 100644 test.ts
git remote add origin [email protected]:rvion/cushy-example-deck.git
Then open an issue asking there
In case you want to know more about the CLA, here are some answers to questions you might have: If your questions are not covered, you can take a look at the full FAQ: https://github.com/rvion/CushyStudio/blob/master/docs/FAQ.md
A: Absolutely! I'm committed to keeping CushyStudio 100% open source and free to use as a tool. Create assets, art, games β you name it. It's your creation, and I'm just here to help you make it.
A: For now, CushyStudio is licensed under AGPL as I aim to guide the project towards sustainability. I plan to transition to GPLV3 in the future, once the project achieves a stable foundation. This choice is designed to safeguard the project and its dedicated community. Rest assured, utilizing CushyStudio for asset creation remains unrestricted. My primary intention is to prevent the unauthorized resale or commercialization of CushyStudio as a service.
A: No, and that's a promise. CushyStudio will always be free and open source. While I do have plans to offer complementary services (like cloud GPU services), the core of CushyStudio will remain free for all. Again, I simply wish to prevent the unauthorized resale or commercialization of CushyStudio as a service.
Thank you for your understanding and patience in going through this agreement. Together, let's make CushyStudio better for everyone! πͺπ
Full theming capabilities using DaisyUI themes.
TODO: add screenshots here.