Versions

  • v5

    11/3/2024
    Open: Version
    Changes from v4 to v5
    +1
    -1
    ⦚ 17 unchanged lines ⦚
    });

    const result = await fal.run("fal-ai/flux/flux-pro/v1.1", {
    input: {
    prompt,
    ⦚ 124 unchanged lines ⦚
    ⦚ 17 unchanged lines ⦚
    });

    const result = await fal.run("fal-ai/flux-pro/v1.1", {
    input: {
    prompt,
    ⦚ 124 unchanged lines ⦚
  • v4

    11/3/2024
    Open: Version
    Changes from v3 to v4
    +0
    -0
    ⦚ 146 unchanged lines ⦚
    ⦚ 146 unchanged lines ⦚
  • v3

    11/3/2024
    Open: Version
    Changes from v2 to v3
    +0
    -0
    ⦚ 146 unchanged lines ⦚
    ⦚ 146 unchanged lines ⦚
  • v2

    11/3/2024
    Open: Version
    Changes from v1 to v2
    +1
    -1
    ⦚ 17 unchanged lines ⦚
    });

    const result = await fal.run("fal-ai/flux-pro/v1.1", {
    input: {
    prompt,
    ⦚ 124 unchanged lines ⦚
    ⦚ 17 unchanged lines ⦚
    });

    const result = await fal.run("fal-ai/flux/flux-pro/v1.1", {
    input: {
    prompt,
    ⦚ 124 unchanged lines ⦚
  • v1

    11/3/2024
    Open: Version
    Changes from v0 to v1
    +1
    -1
    ⦚ 17 unchanged lines ⦚
    });

    const result = await fal.run("fal-ai/flux/schnell", {
    input: {
    prompt,
    ⦚ 124 unchanged lines ⦚
    ⦚ 17 unchanged lines ⦚
    });

    const result = await fal.run("fal-ai/flux-pro/v1.1", {
    input: {
    prompt,
    ⦚ 124 unchanged lines ⦚
  • v0

    11/3/2024
    Open: Version
    +146
    -0

    /** @jsxImportSource https://esm.sh/react */
    import { createFalClient } from "https://esm.sh/@fal-ai/client";
    import React, { useState } from "https://esm.sh/react";
    import { createRoot } from "https://esm.sh/react-dom/client";
    import { falProxyRequest } from "https://esm.town/v/stevekrouse/falProxyRequest";

    function App() {
    const [prompt, setPrompt] = useState("");
    const [imageUrl, setImageUrl] = useState("");
    const [loading, setLoading] = useState(false);

    const generateImage = async (e?: React.FormEvent) => {
    e?.preventDefault();
    setLoading(true);
    try {
    const fal = createFalClient({
    proxyUrl: "/api/fal/proxy",
    });

    const result = await fal.run("fal-ai/flux/schnell", {
    input: {
    prompt,
    image_size: "landscape_4_3",
    num_inference_steps: 4,
    num_images: 1,
    enable_safety_checker: true,
    sync_mode: true,
    },
    });
    setImageUrl(result.data.images[0].url);
    } catch (error) {
    console.error("Error generating image:", error);
    } finally {
    setLoading(false);
    }
    };
1
Next
ascarden-faldemoapp.web.val.run
Updated: November 3, 2024