Anyone know why this isn't working?

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 1 year 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.

  • source