wan-video/wan-2.2-i2v-fast - générateur vidéo

Intermédiaire

Ceci est unContent Creation, Multimodal AIworkflow d'automatisation du domainecontenant 15 nœuds.Utilise principalement des nœuds comme If, Set, Code, Wait, HttpRequest. Générer des vidéos à partir d'images avec Wan 2.2 I2V Fast AI et l'API Replicate

Prérequis
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "meta": {
    "instanceId": "0722e12f-74ba-4466-90ba-9a0a95c540a4",
    "model_name": "wan-2.2-i2v-fast",
    "model_type": "video",
    "version_id": "309fbbedb17f8e9c50f6141a13c27e2ce71cf11bf78f01419f05f334ece056b5",
    "model_owner": "wan-video",
    "generated_at": "2025-08-01T14:50:46.463257"
  },
  "name": "wan-video/wan-2.2-i2v-fast - Video Generator",
  "nodes": [
    {
      "id": "141f9103-2715-4fd3-90d2-6886837a9e67",
      "name": "Déclencheur manuel",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -896,
        -176
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b4fcc003-ed0d-48e5-b2a7-421540f7bdec",
      "name": "Définir le jeton API",
      "type": "n8n-nodes-base.set",
      "position": [
        -608,
        -80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "api_token",
              "name": "api_token",
              "type": "string",
              "value": "YOUR_REPLICATE_API_TOKEN"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "0269ca90-dcfa-4f2f-a470-7e3525990193",
      "name": "Définir les paramètres vidéo",
      "type": "n8n-nodes-base.set",
      "position": [
        -288,
        -128
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "api_token",
              "name": "api_token",
              "type": "string",
              "value": "={{ $('Set API Token').item.json.api_token }}"
            },
            {
              "id": "seed",
              "name": "seed",
              "type": "number",
              "value": -1
            },
            {
              "id": "image",
              "name": "image",
              "type": "string",
              "value": "https://picsum.photos/512/512"
            },
            {
              "id": "prompt",
              "name": "prompt",
              "type": "string",
              "value": "A person walking through a magical forest with glowing particles"
            },
            {
              "id": "go_fast",
              "name": "go_fast",
              "type": "boolean",
              "value": true
            },
            {
              "id": "num_frames",
              "name": "num_frames",
              "type": "number",
              "value": 81
            },
            {
              "id": "resolution",
              "name": "resolution",
              "type": "string",
              "value": "480p"
            },
            {
              "id": "aspect_ratio",
              "name": "aspect_ratio",
              "type": "string",
              "value": "16:9"
            },
            {
              "id": "sample_shift",
              "name": "sample_shift",
              "type": "number",
              "value": 12
            },
            {
              "id": "frames_per_second",
              "name": "frames_per_second",
              "type": "number",
              "value": 16
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "988fa446-a835-42b1-85b2-bf710cf9cc04",
      "name": "Créer une prédiction vidéo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -64,
        -128
      ],
      "parameters": {
        "url": "https://api.replicate.com/v1/predictions",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "jsonBody": "={\n  \"version\": \"wan-video/wan-2.2-i2v-fast:309fbbedb17f8e9c50f6141a13c27e2ce71cf11bf78f01419f05f334ece056b5\",\n  \"input\": {\n    \"seed\": {{ $json.seed }},\n    \"image\": \"{{ $json.image }}\",\n    \"prompt\": \"{{ $json.prompt }}\",\n    \"go_fast\": {{ $json.go_fast }},\n    \"num_frames\": {{ $json.num_frames }},\n    \"resolution\": \"{{ $json.resolution }}\",\n    \"aspect_ratio\": \"{{ $json.aspect_ratio }}\",\n    \"sample_shift\": {{ $json.sample_shift }},\n    \"frames_per_second\": {{ $json.frames_per_second }}\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $json.api_token }}"
            },
            {
              "name": "Prefer",
              "value": "wait"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "35f6027a-0699-4dcd-a6c8-7458d650fcd7",
      "name": "Attendre 5s",
      "type": "n8n-nodes-base.wait",
      "position": [
        160,
        -128
      ],
      "webhookId": "d2c4ca16-0eb2-45b4-8a2d-eec2f99df89c",
      "parameters": {
        "unit": "seconds",
        "amount": 5
      },
      "typeVersion": 1
    },
    {
      "id": "dc279cf0-a929-469a-b06a-0ed88e1b021c",
      "name": "Vérifier le statut",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        384,
        -128
      ],
      "parameters": {
        "url": "=https://api.replicate.com/v1/predictions/{{ $('Create Video Prediction').item.json.id }}",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Set API Token').item.json.api_token }}"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "f49e049e-3f24-4880-a9bc-167ba8297595",
      "name": "Est terminé ?",
      "type": "n8n-nodes-base.if",
      "position": [
        528,
        -240
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c93d7ba1-0ef9-4087-aa10-389cb2a2c6bd",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "succeeded"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "68f190ee-445e-4d2e-8b00-d740e73e69b6",
      "name": "A échoué ?",
      "type": "n8n-nodes-base.if",
      "position": [
        848,
        -80
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d1bfd044-3a07-4c18-b55f-72d192596139",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "failed"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "0787f721-240b-47c3-a92f-aa3b4f0ed922",
      "name": "Attendre 10s",
      "type": "n8n-nodes-base.wait",
      "position": [
        720,
        128
      ],
      "webhookId": "51a05aef-e220-406d-8c2c-e59c82c3e26e",
      "parameters": {
        "unit": "seconds",
        "amount": 10
      },
      "typeVersion": 1
    },
    {
      "id": "ffd67248-d3df-4b2d-a116-a1d6066116dd",
      "name": "Réponse de succès",
      "type": "n8n-nodes-base.set",
      "position": [
        832,
        -320
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "success-response",
              "name": "response",
              "type": "object",
              "value": "={{ { success: true, video_url: $json.output, prediction_id: $json.id, status: $json.status, message: 'Video generated successfully' } }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "31888641-709b-4277-b746-d53dba002965",
      "name": "Réponse d'erreur",
      "type": "n8n-nodes-base.set",
      "position": [
        1344,
        144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "error-response",
              "name": "response",
              "type": "object",
              "value": "={{ { success: false, error: $json.error || 'Video generation failed', prediction_id: $json.id, status: $json.status, message: 'Failed to generate video' } }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "9df74e9c-1f1a-45d2-a706-f847989538c9",
      "name": "Afficher le résultat",
      "type": "n8n-nodes-base.set",
      "position": [
        1552,
        -144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "final-result",
              "name": "final_result",
              "type": "object",
              "value": "={{ $json.response }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "a849da1f-94d1-4351-85eb-1c921fc764a5",
      "name": "Journaliser la requête",
      "type": "n8n-nodes-base.code",
      "position": [
        160,
        -320
      ],
      "parameters": {
        "jsCode": "// Log generation details for monitoring\nconst data = $input.all()[0].json;\n\nconsole.log('wan-video/wan-2.2-i2v-fast Request:', {\n  timestamp: new Date().toISOString(),\n  prediction_id: data.id,\n  model_type: 'video'\n});\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "79a7f679-5c6d-48ff-b3ec-e3894085177a",
      "name": "Note adhésive9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        -304
      ],
      "parameters": {
        "color": 4,
        "width": 580,
        "height": 320,
        "content": "=======================================\n        WAN-2.2-I2V-FAST GENERATOR\n=======================================\nFor any questions or support, please contact:\n    Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n   - YouTube: https://www.youtube.com/@YaronBeen/videos\n   - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n======================================="
      },
      "typeVersion": 1
    },
    {
      "id": "15258dae-227a-45dc-a341-a755345bb33a",
      "name": "Note adhésive4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        48
      ],
      "parameters": {
        "color": 4,
        "width": 589,
        "height": 1958,
        "content": "## 🤖 **WAN-VIDEO/WAN-2.2-I2V-FAST - VIDEO GENERATION WORKFLOW**\n\n**🔥 Powered by Replicate API and n8n Automation**\n\n---\n\n### 📝 **Model Overview**\n\n- **Owner**: wan-video\n- **Model**: wan-2.2-i2v-fast\n- **Type**: Video Generation\n- **API Endpoint**: https://api.replicate.com/v1/predictions\n\n**🎯 What This Model Does:**\nA very fast and cheap PrunaAI optimized version of Wan 2.2 A14B image-to-video\n\n---\n\n### 📋 **Parameter Reference**\n\n**🔴 Required Parameters:** prompt, image\n**🔵 Optional Parameters:** seed, go_fast, num_frames, resolution, aspect_ratio, sample_shift, frames_per_second\n\n**📖 Detailed Parameter Guide:**\n- **seed** (integer): Random seed. Leave blank for random\n- **image** (string): Input image to generate video from\n- **prompt** (string): Prompt for video generation\n- **go_fast** (boolean): Go fast (Default: True)\n- **num_frames** (integer): Number of video frames. 81 frames give the best results (Default: 81)\n- **resolution** (string): Resolution of video. 16:9 corresponds to 832x480px, and 9:16 is 480x832px (Default: 480p)\n- **aspect_ratio** (string): Aspect ratio of video. 16:9 corresponds to 832x480px, and 9:16 is 480x832px (Default: 16:9)\n- **sample_shift** (number): Sample shift factor (Default: 12)\n- *...and 1 more parameters*\n\n---\n\n### 🔧 **Workflow Components Explained**\n\n**🎯 Manual Trigger**\n- Starts the workflow execution\n- Click to begin video generation process\n\n**🔐 Set API Token** \n- Configures your Replicate API authentication\n- Replace 'YOUR_REPLICATE_API_TOKEN' with your actual token\n- Essential for accessing the wan-video/wan-2.2-i2v-fast model\n\n**⚙️ Set Video Parameters**\n- Configures all input parameters for the model\n- Includes both required and optional parameters\n- Pre-filled with sensible defaults for testing\n\n**🚀 Create Video Prediction**\n- Sends the generation request to Replicate API\n- Uses the video parameters you configured\n- Returns a prediction ID for status tracking\n\n**⏳ Wait & Status Checking Loop**\n- Waits 5 seconds then checks prediction status\n- Continues checking until completion or failure\n- Implements intelligent retry logic with 10-second delays\n\n**✅ Success/Error Handling**\n- Routes successful completions to success response\n- Handles failures gracefully with error details\n- Returns structured JSON response with URLs/errors\n\n**📊 Logging & Monitoring**\n- Logs all requests for debugging and monitoring\n- Tracks timestamps and prediction IDs\n- Helps identify issues during development\n\n---\n\n### 🌟 **Key Benefits**\n\n- **🎨 Instant Video Generation**: Transform ideas into videos using state-of-the-art AI\n- **🔄 Automated Workflow**: Handles the complete generation pipeline automatically\n- **🛡️ Error Resilience**: Built-in retry logic and comprehensive error handling\n- **📈 Production Ready**: Includes logging, monitoring, and structured responses\n- **🔧 Customizable**: Easy to modify parameters and extend functionality\n- **⚡ Efficient Processing**: Optimized API calls with intelligent status checking\n\n---\n\n### 🚀 **Quick Start Instructions**\n\n1. **🔑 Get Your API Key**\n   - Sign up at https://replicate.com\n   - Navigate to your account settings\n   - Copy your API token\n\n2. **🔧 Configure the Workflow**\n   - Replace 'YOUR_REPLICATE_API_TOKEN' with your actual token\n   - Adjust parameters in the 'Set Video Parameters' node\n   - Customize the prompt or other inputs as needed\n\n3. **▶️ Execute the Workflow**\n   - Click the 'Manual Trigger' to start\n   - Monitor the execution in the n8n interface\n   - Check logs for detailed execution information\n\n4. **📥 Get Your Results**\n   - Successful generations return a URL to your video\n   - Download or use the generated content as needed\n   - Results are available immediately upon completion\n\n---\n\n### 🔍 **Troubleshooting Guide**\n\n**Common Issues:**\n- **Invalid API Token**: Ensure your Replicate token is valid and has sufficient credits\n- **Parameter Validation**: Check that required parameters match expected types\n- **Generation Timeout**: Some videos take longer - monitor the logs\n- **Output Format**: Verify the model returns the expected output format\n\n**Best Practices:**\n- Test with default parameters first\n- Monitor your Replicate usage and billing\n- Keep API tokens secure and never commit them to code\n- Use appropriate parameter values for your use case\n\n---\n\n**🔗 Additional Resources:**\n- Model Documentation: https://replicate.com/wan-video/wan-2.2-i2v-fast\n- Replicate API Docs: https://replicate.com/docs\n- n8n Documentation: https://docs.n8n.io\n\n---"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "versionId": "1",
  "connections": {
    "35f6027a-0699-4dcd-a6c8-7458d650fcd7": {
      "main": [
        [
          {
            "node": "dc279cf0-a929-469a-b06a-0ed88e1b021c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0787f721-240b-47c3-a92f-aa3b4f0ed922": {
      "main": [
        [
          {
            "node": "dc279cf0-a929-469a-b06a-0ed88e1b021c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "68f190ee-445e-4d2e-8b00-d740e73e69b6": {
      "main": [
        [
          {
            "node": "31888641-709b-4277-b746-d53dba002965",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "0787f721-240b-47c3-a92f-aa3b4f0ed922",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a849da1f-94d1-4351-85eb-1c921fc764a5": {
      "main": [
        [
          {
            "node": "35f6027a-0699-4dcd-a6c8-7458d650fcd7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dc279cf0-a929-469a-b06a-0ed88e1b021c": {
      "main": [
        [
          {
            "node": "f49e049e-3f24-4880-a9bc-167ba8297595",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f49e049e-3f24-4880-a9bc-167ba8297595": {
      "main": [
        [
          {
            "node": "ffd67248-d3df-4b2d-a116-a1d6066116dd",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "68f190ee-445e-4d2e-8b00-d740e73e69b6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b4fcc003-ed0d-48e5-b2a7-421540f7bdec": {
      "main": [
        [
          {
            "node": "0269ca90-dcfa-4f2f-a470-7e3525990193",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "31888641-709b-4277-b746-d53dba002965": {
      "main": [
        [
          {
            "node": "9df74e9c-1f1a-45d2-a706-f847989538c9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "141f9103-2715-4fd3-90d2-6886837a9e67": {
      "main": [
        [
          {
            "node": "b4fcc003-ed0d-48e5-b2a7-421540f7bdec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ffd67248-d3df-4b2d-a116-a1d6066116dd": {
      "main": [
        [
          {
            "node": "9df74e9c-1f1a-45d2-a706-f847989538c9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "988fa446-a835-42b1-85b2-bf710cf9cc04": {
      "main": [
        [
          {
            "node": "a849da1f-94d1-4351-85eb-1c921fc764a5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Création de contenu, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds15
Catégorie2
Types de nœuds7
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
Yaron Been

Yaron Been

@yaron-nofluff

Building AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34