Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot drag & drop a created image #1540

Closed
GoodCharles opened this issue Dec 21, 2023 · 3 comments
Closed

Cannot drag & drop a created image #1540

GoodCharles opened this issue Dec 21, 2023 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@GoodCharles
Copy link

Read Troubleshoot

[x] I admit that I have read the Troubleshoot before making this issue.

Describe the problem
I wish to further manipulate the image but dragging and dropping does nothing. I am using Firefox

Full Console Log
{
"Prompt": "A humanoid bio-mechanic android standing in a highly futuristic and rundown hallway of a derelict spaceship. In the style of H.R. Giger with a mixture of futuristic industrial look of Chris Foss and Peter Elson",
"Negative Prompt": "",
"Fooocus V2 Expansion": "A humanoid bio-mechanic android standing in a highly futuristic and rundown hallway of a derelict spaceship. In the style of H.R. Giger with a mixture of futuristic industrial look of Chris Foss and Peter Elson, vibrant colors, open background, cinematic color, dynamic dramatic atmosphere, full detailed, creative, positive, romantic, cute, fine detail, pretty",
"Styles": "['Fooocus V2', 'Fooocus Enhance', 'Fooocus Sharp', 'Misc Horror', 'Misc Macabre']",
"Performance": "Quality",
"Resolution": "(1152, 896)",
"Sharpness": 2,
"Guidance Scale": 4,
"ADM Guidance": "(1.5, 0.8, 0.3)",
"Base Model": "juggernautXL_version6Rundiffusion.safetensors",
"Refiner Model": "None",
"Refiner Switch": 0.5,
"Sampler": "dpmpp_2m_sde_gpu",
"Scheduler": "karras",
"Seed": 7142657090438643968,
"LoRA 1": "sd_xl_offset_example-lora_1.0.safetensors : 0.1",
"Version": "v2.1.854"
}

@Kralg
Copy link

Kralg commented Dec 22, 2023

I am also unable to drag and drop. I am using firefox on windows.

@mashb1t
Copy link
Collaborator

mashb1t commented Dec 22, 2023

duplicate of #1425

@mashb1t mashb1t added the duplicate This issue or pull request already exists label Dec 28, 2023
@mashb1t mashb1t closed this as completed Dec 28, 2023
@BassAzayda
Copy link

i made a bookmarklet here:

javascript:(function(){let draggedImageData=null;let currentDropZone=null;function handleDragStart(event){const img=event.target;draggedImageData=img.src;}function handleDragOver(event){event.preventDefault();currentDropZone=event.currentTarget;}function handleDrop(event){event.preventDefault();if(!draggedImageData||!currentDropZone){return;}const dropZone=currentDropZone.closest('.image-container > div:first-child');if(!dropZone){return;}fetch(draggedImageData).then(res=> res.blob()).then(blob=>{const file=new File([blob],"dragged-image.png",{type:blob.type});const dummyFileList={0:file,length:1,item:index=> dummyFileList[index]};let dropEvent=new Event('drop',{bubbles:true});Object.defineProperty(dropEvent,'dataTransfer',{value:{files:dummyFileList}});dropZone.dispatchEvent(dropEvent);console.log('Drop event triggered successfully for drop zone');}).catch(error=> console.error('Error creating File from image:',error));draggedImageData=null;currentDropZone=null;}function addEventListeners(){document.querySelectorAll('.thumbnail-item img').forEach(img=>{img.addEventListener('dragstart',handleDragStart);img.addEventListener('dragend',handleDrop);});document.querySelectorAll('.image-container > div:first-child').forEach(dropZone=>{dropZone.addEventListener('dragover',handleDragOver);dropZone.addEventListener('drop',handleDrop);});}addEventListeners();const observer=new MutationObserver(mutationsList=>{for(let mutation of mutationsList){if(mutation.type==='childList'){mutation.addedNodes.forEach(node=>{if(node.matches&&node.matches('.thumbnail-item img')){addEventListeners();}});}}});observer.observe(document.body,{childList:true,subtree:true});console.log('Automatic image drop trigger is now active');})();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants