CushyStudio
Blog
  • 🛋️CushyStudio
  • Getting Started
    • 🛠️Installation
      • Installing Cushy
      • Updating Cushy
      • Scripts
      • Installing Modules
        • Install ComfyUI
        • Install FFMpeg (optional)
        • Installing Models
        • Install ImageMagick (optional)
    • 👋First Steps
      • Intro to Generative AI
      • Making an image
      • Coming From...
    • 🎁Built-in apps
      • CushyDiffusion
      • Rotate anything
      • Cushy Cascade
      • Remove Background
      • Slay the Spire - Art Pack
      • Manga Coloring
    • 🚶Cushy Interface
      • Draft Panel
      • Welcome Panel
      • Minipaint
      • File Explorer
      • Quick-Civitai
      • Iframes
        • Minipaint
        • Civitai
      • Image Comtext menu
    • 🍏Images, Videos, 3d scenes
      • Quick Actions
      • LLM (Large Language Model)
    • 😁Unified canvas
      • Starin
      • Inpainting
      • Outpainting
    • 🧪Prompting
      • adding Loras
  • Going further
    • 💡Creating apps
      • Creating a new App file
      • Prefabs
      • App Structure
      • Contextual Apps
      • For loops
      • App UI
      • Using ImageMagick in your app
    • ⚙️CushyKit
    • 🏈Importing from ComfyUI
    • 🤝Woking on Cushy
      • Setting up VSCode
      • Contributing on the UI
      • Contributing on top-level scripts
      • Database
      • Migrations
    • 🔥Troubleshooting
      • Page 1
  • Community
    • 🤝Community
    • 💬FAQs
      • ⁉️Can Cushy...
    • 📰News
    • 😁Changelog
    • 🚀Roadmap
    • 💬Blog
      • 2024-02-18 - creating the website
    • 🚂Other Softwares
      • Coming from Krita
      • Coming from A1111
      • Coming from ComfyUI
      • Coming from InvokeAI
      • Coming from Fooocus
    • Contributing
      • Supporting the team
      • Writing Docs
  • TEMP
    • ✨CushyStudio Features
    • 🛋️TEMPORARY
      • Manual
      • GPT alt A
      • GPT alt B
      • GPT alt C
Powered by GitBook
On this page
  • Make your app compatible
  • Add new entries to the image context menu
  • Support both beeing run as context action or standalone
  • Built-in examples to look at
Edit on GitHub
Export as PDF
  1. Going further
  2. Creating apps

Contextual Apps

CushyApps can be started form both context menu. this page shows how your custom app can support that

Contextual apps allow you start any app (workflow) from an existing image ( Image Comtext menu) or selection (Unified canvas)

Make your app compatible

  1. Add canStartFromImage

app({
   ...
   canStartFromImage: true,
})
  1. update your run handler to take a third param

    //                  👇👇👇👇👇
    run: async (run, ui, startImg) => {

Add new entries to the image context menu

once your CushyApp is start-from-image enabled, you can just create new drafts of your app.

Every draft will show as a new menu entry

Support both beeing run as context action or standalone

Supporting both is easy.

    run: async (run, ui, startImg) => {
        //  if  startImg is null, it will take ui.startImage instead
        let img = startImg ?? ui.startImage
    }

Built-in examples to look at

look at the library/quick-actions/*

  • library/built-in/quick-actions/quick-dispace.ts

  • library/built-in/quick-actions/quick-refine.ts

  • ...

PreviousApp StructureNextFor loops

Last updated 1 year ago

💡