Wednesday, 17 December 2025

Workflow script autogenerate autodownload firefly_autodownload_firefox_blob_final.js

 

Ya 👍 BETUL SEKALI — dan susunannya sudah rapi & benar.
Saya ringkaskan ulang langkah demi langkah (versi final & clean) supaya bisa kamu jadikan catatan permanen.


✅ LANGKAH DEMI LANGKAH (FINAL WORKFLOW)


1️⃣ Install Playwright + Firefox

Dijalankan sekali saja:

npm install playwright
npx playwright install firefox

✔️ Mengunduh Firefox versi Playwright
✔️ Dipakai otomatis oleh script
✔️ Tidak mengganggu Firefox sistem


2️⃣ Struktur folder (SESUAI GAMBAR KAMU ✅)

fire-playwright/
├── downloads/                      ← hasil image tersimpan
├── firefox-profile/                ← profile login Firefly (persistent)
├── node_modules/
├── firefly_autodownload_firefox_blob_final.js
├── prompts.txt                     ← daftar prompt (1 baris = 1 prompt)
├── package.json
└── package-lock.json

📌 Ini struktur ideal & recommended


3️⃣ Isi prompts.txt

Contoh:

faceless child astronaut holding a flag, line art, coloring book style
faceless child baker baking bread in a kitchen, line art, coloring book
faceless child doctor checking a patient, line art illustration

📌 Satu baris = satu prompt
📌 Tidak perlu tanda kutip


4️⃣ Jalankan script

node firefly_autodownload_firefox_blob_final.js

Lalu:

  1. Firefox terbuka (1 window saja ✅)

  2. Login Adobe Firefly manual

  3. Atur:

    • Model

    • Aspect ratio

  4. Kembali ke terminal → tekan ENTER

  5. Biarkan script bekerja


5️⃣ Hasil akhir

  • Image muncul di folder downloads/

  • Nama file otomatis dari prompt

  • Tidak dobel

  • Tidak replace

  • Aman sampai ratusan prompt


🧠 KENAPA STRUKTUR INI BENAR?

KomponenFungsi
firefox-profile/Simpan login & setting Firefly
downloads/Output aman (bukan blob)
savedBlobs Set()Cegah duplikat
before/after countIsolasi hasil per prompt
Firefox PlaywrightLebih stabil untuk blob

⚠️ HAL YANG TIDAK PERLU LAGI

❌ Chrome
acceptDownloads
❌ klik tombol Download
❌ rename manual file
❌ copy-paste blob


🏁 KESIMPULAN

✔️ Langkah kamu 100% benar
✔️ Struktur folder ideal
✔️ Workflow sudah matang
✔️ Siap dipakai rutin / skala besar


Ya 👍 BENAR — dari sisi file yang kamu BUAT manual, hanya dua itu.


✅ FILE YANG KAMU BUAT SENDIRI

1️⃣ Script utama

firefly_autodownload_firefox_blob_final.js

✔️ Ini inti semuanya
✔️ Berisi seluruh logic automation
✔️ Tidak perlu file JS lain


2️⃣ Daftar prompt

prompts.txt

✔️ 1 baris = 1 prompt
✔️ Bisa diedit kapan saja
✔️ Bisa ganti, tambah, kurangi tanpa ubah script


📁 FILE / FOLDER LAIN → DIBUAT OTOMATIS

ItemDibuat olehKeterangan
node_modules/npmLibrary Playwright
package.jsonnpmMetadata project
package-lock.jsonnpmLock dependency
firefox-profile/ScriptSimpan login Firefly
downloads/ScriptHasil image

👉 Tidak perlu kamu sentuh


🧠 RINGKASAN SUPER SINGKAT

  • ✍️ Kamu hanya bikin 2 file

  • ⚙️ Sisanya otomatis

  • 🔁 Ganti prompt → tinggal edit prompts.txt

  • ▶️ Jalankan ulang script


💡 Tips kecil (best practice)

  • Backup firefox-profile/ → supaya login aman

  • Jangan hapus downloads/ saat script jalan

  • Kalau ganti akun Adobe → hapus firefox-profile/ lalu login ulang



Share:

0 comments:

Post a Comment