Feeding Kandinsky V2.1 w/ Thousands of Disco Diffusion Prompts (Python Script included)

Опубликовано: 07 Апрель 2026
на канале: Quick-Eyed Sky
468
14

  / quick_eyed_sky   (to support my work, access the archive of hundreds of prompts, ideas, and images). You can take a month only!

So, I made a Python script to scrape all my old prompts from my old Disco Diffusion folders. It worked well and created a .csv file, a table.

Then, I used ChatGPT again to modify good old colabs. You can do that with Stable Diffusion (Deforum) or Kandinsky. It will be the subject of my next video here.

Here's the complete script if you want to play:

-----
import os
import json
import csv


def find_txt_files_and_extract_prompts(folder_to_process):
prompts = set()

for root, _, files in os.walk(folder_to_process):
print(f"Exploring folder: {root}") # Print the current folder being explored
for file in files:
if file.endswith('.txt'):
print(f"Processing file: {os.path.join(root, file)}") # Print the current file being processed
try:
with open(os.path.join(root, file), 'r', encoding='utf-8', errors='replace') as txt_file:
data = json.load(txt_file)
if 'text_prompts' in data:
if "0" in data['text_prompts']:
for item in data['text_prompts']["0"]:
prompts.add(item)
except json.JSONDecodeError:
print(f"Error decoding JSON in file {os.path.join(root, file)}")

return prompts


def save_prompts_to_csv(prompts, csv_filename):
with open(csv_filename, 'w', newline='') as csvfile:
csv_writer = csv.writer(csvfile)
csv_writer.writerow(['Prompts'])
for prompt in prompts:
csv_writer.writerow([prompt])


if _name_ == '__main__':
main_folder = '/your folder path'
project_directory = os.path.dirname(os.path.realpath(__file__))
csv_filename = os.path.join(project_directory, 'prompts.csv')

print(f"Starting to process folder: {main_folder}") # Print the folder being processed
prompts = find_txt_files_and_extract_prompts(main_folder)
save_prompts_to_csv(prompts, csv_filename)
print(f"Finished processing. Prompts saved to: {csv_filename}") # Print the output file path

-----

If you want to use the .csv in Kandinsky:
https://colab.research.google.com/dri...

Playlist of AI tutorials:    • Tutorials for Disco Diffusion (and other AIs)   if you want to make your own images.

Some of my music you hear on my clips:   / user-894673824  

------
Disco Diffusion Discord:   / discord  

Zippy's FAQ on Disco Diffusion: https://botbox.dev/disco-diffusion-ch...

A Traveler’s Guide to the Latent Space: https://sweet-hall-e72.notion.site/A-...