Skip to content

Commit

Permalink
feat: use new image-to-image pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelass committed Apr 26, 2024
1 parent a3b6538 commit 8277b86
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/composite-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function CompositeArea({ background, isRunning }: CompositeParameters) {
const buffer = Buffer.from(arrayBuffer);

send({
action: "livePainting:imageBuffer",
action: "image-to-image:imageBuffer",
payload: { appId: APP_ID, buffer },
});
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/rendering-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function RenderingArea() {
onMessage(message) {
// eslint-disable-next-line default-case
switch (message.action) {
case "livePainting:generated": {
case "image-to-image:generated": {
if (imgReference.current) {
imgReference.current.src = message.payload;
}
Expand Down
12 changes: 6 additions & 6 deletions src/components/vj.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ export function VJ() {
const { send } = useSDK<unknown, string>(APP_ID, {
onMessage(message) {
switch (message.action) {
case "livePainting:started": {
case "image-to-image:started": {
setIsRunning(true);
setIsLoading(false);
break;
}

case "livePainting:stopped": {
case "image-to-image:stopped": {
setIsRunning(false);
setIsLoading(false);
break;
Expand All @@ -122,12 +122,12 @@ export function VJ() {

useWaveformAnalyzer(clearCounter);

useUnload(APP_ID, "livePainting:stop");
useUnload(APP_ID, "image-to-image:stop");

useEffect(() => {
if (isRunning) {
send({
action: "livePainting:settings",
action: "image-to-image:settings",
payload: {
prompt: [prompt, illustrationStyles[illustrationStyle]].join(", "),
seed,
Expand All @@ -149,14 +149,14 @@ export function VJ() {
onStop={() => {
setIsLoading(true);
send({
action: "livePainting:stop",
action: "image-to-image:stop",
payload: { appId: APP_ID },
});
}}
onStart={() => {
setIsLoading(true);
send({
action: "livePainting:start",
action: "image-to-image:start",
payload: { appId: APP_ID, stablefast: true },
});
}}
Expand Down

0 comments on commit 8277b86

Please sign in to comment.