Anyone know why this isn’t working?

  • VioneT@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago
    There is no “Image to Image” or “AI Image Editor” working in Perchance.

    Looking at the code, it is generated through the AI code helper in which there are these sections:

      // AI Remove Object
      removeBtn.addEventListener('click', async function() {
        showLoading('Removing objects with AI...');
        
        // Simulate AI processing
        setTimeout(() => {
          if (selectedArea.isActive && selectedArea.width !== 0 && selectedArea.height !== 0) {
            // For demo: fill selection with a gradient (simulating AI inpainting)
            const gradient = ctx.createLinearGradient(
              selectedArea.x, selectedArea.y, 
              selectedArea.x + selectedArea.width, selectedArea.y + selectedArea.height
            );
      ...
      // Simulate AI object extraction
        setTimeout(() => {
          const img = new Image();
          img.onload = function() {
            // Scale the image
    

    Which is why it doesn’t work.