Spaces:
				
			
			
	
			
			
		Running
		
			on 
			
			Zero
	
	
	
			
			
	
	
	
	
		
		
		Running
		
			on 
			
			Zero
	Update live_preview_helpers.py
Browse files- live_preview_helpers.py +2 -2
 
    	
        live_preview_helpers.py
    CHANGED
    
    | 
         @@ -148,13 +148,13 @@ def flux_pipe_call_that_returns_an_iterable_of_images( 
     | 
|
| 148 | 
         
             
                        joint_attention_kwargs=self.joint_attention_kwargs,
         
     | 
| 149 | 
         
             
                        return_dict=False,
         
     | 
| 150 | 
         
             
                    )[0]
         
     | 
| 151 | 
         
            -
                    latents = self.scheduler.step(noise_pred, t, latents, return_dict=False)[0]
         
     | 
| 152 | 
         
            -
             
     | 
| 153 | 
         
             
                    # Yield intermediate result
         
     | 
| 154 | 
         
             
                    latents_for_image = self._unpack_latents(latents, height, width, self.vae_scale_factor)
         
     | 
| 155 | 
         
             
                    latents_for_image = (latents_for_image / self.vae.config.scaling_factor) + self.vae.config.shift_factor
         
     | 
| 156 | 
         
             
                    image = self.vae.decode(latents_for_image, return_dict=False)[0]
         
     | 
| 157 | 
         
             
                    yield self.image_processor.postprocess(image, output_type=output_type)[0]
         
     | 
| 
         | 
|
| 
         | 
|
| 158 | 
         
             
                    torch.cuda.empty_cache()
         
     | 
| 159 | 
         | 
| 160 | 
         
             
                # Final image using good_vae
         
     | 
| 
         | 
|
| 148 | 
         
             
                        joint_attention_kwargs=self.joint_attention_kwargs,
         
     | 
| 149 | 
         
             
                        return_dict=False,
         
     | 
| 150 | 
         
             
                    )[0]
         
     | 
| 
         | 
|
| 
         | 
|
| 151 | 
         
             
                    # Yield intermediate result
         
     | 
| 152 | 
         
             
                    latents_for_image = self._unpack_latents(latents, height, width, self.vae_scale_factor)
         
     | 
| 153 | 
         
             
                    latents_for_image = (latents_for_image / self.vae.config.scaling_factor) + self.vae.config.shift_factor
         
     | 
| 154 | 
         
             
                    image = self.vae.decode(latents_for_image, return_dict=False)[0]
         
     | 
| 155 | 
         
             
                    yield self.image_processor.postprocess(image, output_type=output_type)[0]
         
     | 
| 156 | 
         
            +
                    
         
     | 
| 157 | 
         
            +
                    latents = self.scheduler.step(noise_pred, t, latents, return_dict=False)[0]
         
     | 
| 158 | 
         
             
                    torch.cuda.empty_cache()
         
     | 
| 159 | 
         | 
| 160 | 
         
             
                # Final image using good_vae
         
     |