This is the error I am getting:
File "<ipython-input-30-56bb89b51cc1>", line 4
pass = 50 #@param {type:"integer"}
^
SyntaxError: invalid syntax
I am using a Google Colab for VQGAN+CLIP AI Text to Image Generation: https://colab.research.google.com/drive/1go6YwMFe5MX6XM9tv-cnQiSTU50N9EeT?usp=sharing and the code with the error is not included in the Colab, but is found here: https://tuscriaturas.miraheze.org/wiki/Ayuda:Generar_im%C3%A1genes_con_VQGAN%2BCLIP/English#Code_for_generating_the_zip The default code is supposed to save every 50th image to a .zip automatically. Deleting the line that gives the error saves every single image, which in this particular case is 1,350 images. I tried looking up this issue, but my lack of knowledge doesn't help and I can't find an example of this exact issue. I tried changing 'pass' to 'intervals' thinking that would work for some reason and it just ignored that line entirely. I hope I gave enough detail and I apologize if this is a stupid issue but I am trying to learn and have hit a wall. I appreciate any help. Here is the code for the entire cell.
# @title Create a zip with all of the images (or some)
initial_image = 0 #@param {type:"integer"}
final_image = 1350 #@param {type:"integer"}
pass = 50 #@param {type:"integer"}
filename = "files.zip" #@param {type:"string"}
import zipfile
if final_image == -1:
final_image = i
zipf = zipfile.ZipFile(filename, 'w', zipfile.ZIP_DEFLATED)
for i in tqdm(range(initial_image, final_image+1)):
fname = f"{i:04}.png"
zipf.write(f"steps/{fname}", f"{filename.split('.')[0]}-{fname}")
zipf.close()
print(filename, "created. Downloading… A download dialog will be open when the download is ready.")
from google.colab import files
files.download(filename)