Skip to content

Commit

Permalink
custom pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwisecodes committed Nov 29, 2024
1 parent 168ae75 commit 8233576
Show file tree
Hide file tree
Showing 4 changed files with 483 additions and 62 deletions.
4 changes: 3 additions & 1 deletion apps/nextjs/src/app/image-spike/[slug]/images.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const ImagesPage = ({ pageData }: { pageData: PageData }) => {
};

const trpcMutations = {
"Custom Pipeline": trpc.imageGen.customPipeline.useMutation(),
"Stable Diffusion Ultra": trpc.imageGen.stableDifUltra.useMutation(),
"Stable Diffusion 3.0 & 3.5": trpc.imageGen.stableDif3.useMutation(),
"Stable Diffusion Core": trpc.imageGen.stableDifCore.useMutation(),
Expand Down Expand Up @@ -110,7 +111,8 @@ const ImagesPage = ({ pageData }: { pageData: PageData }) => {
if (
source === "Stable Diffusion Ultra" ||
source === "Stable Diffusion 3.0 & 3.5" ||
source === "Stable Diffusion Core"
source === "Stable Diffusion Core" ||
source === "Custom Pipeline"
) {
updateColumn(columnId, {
imageSearchBatch: [
Expand Down
8 changes: 7 additions & 1 deletion apps/nextjs/src/app/image-spike/image-spike.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ const ImageSpike = ({ lessons }: { lessons: any }) => {
const lessonTitles = lessons.map((lesson: any) => ({
sessionId: lesson.id,
lessonTitle: lesson?.output?.lessonPlan?.title || "",
hasThreeCycles:
!!lesson?.output?.lessonPlan?.cycle1 &&
!!lesson?.output?.lessonPlan?.cycle2 &&
!!lesson?.output?.lessonPlan?.cycle3,
}));

return (
Expand All @@ -16,11 +20,13 @@ const ImageSpike = ({ lessons }: { lessons: any }) => {
({
sessionId,
lessonTitle,
hasThreeCycles,
}: {
sessionId: string;
lessonTitle: string;
hasThreeCycles: boolean;
}) => {
if (!lessonTitle) {
if (!lessonTitle || !hasThreeCycles) {
return null;
}
return (
Expand Down
Loading

0 comments on commit 8233576

Please sign in to comment.