#@title Run for generating images. import uuid prompt = "photo of ohwx:1.5 man,Pixar, 4k, 8k, unreal engine, octane render photorealistic by cosmicwonder, hdr, photography by cosmicwonder, high definition, symmetrical face, volumetric lighting, dusty haze, photo, octane render, 24mm, 4k, 24mm, DSLR, high quality, ultra realistic" #@param {type:"string"} negative_prompt = "blurry,bad,worse,worst,cheap,sketch,basic,juvenile,unprofessional,failure,oil,label,signature,watermark,amateur,grotesque,misshapen,deformed,distorted,malformed,unsightly,terrible,awful,repellent,disgusting,revolting,loathsome,mangled,awkward,twisted,contorted,lopsided,asymmetrical,irregular,unnatural,botched,mutilated,disfigured,ugly,offensive,repulsive,ghastly,hideous,unappealing,frightful,odious,obnoxious,detestable,hateful,repugnant,sickening,vile,abhorrent,contemptible,execrable,distasteful,abominable,tiling" #@param {type:"string"} num_samples = 10 #@param {type:"number"} guidance_scale = 7.5 #@param {type:"number"} num_inference_steps = 50 #@param {type:"number"} height = 512 #@param {type:"number"} width = 512 #@param {type:"number"} import os path = "/content/drive/MyDrive/pixar" #set folder name as you wish as e.g. pixar if(os.path.exists(path)==False): os.mkdir(path) while (True): finalprompt=prompt with autocast("cpu"), torch.inference_mode(): images = pipe( finalprompt, height=height, width=width, negative_prompt=negative_prompt, num_images_per_prompt=num_samples, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale, generator=g_cuda ).images for img in images: display(img) name = uuid.uuid4() img.save(path+'/'+str(name)+'.png')