File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -761,11 +761,14 @@ class StableDiffusionGGML {
761761                denoiser = std::make_shared<DiscreteFlowDenoiser>(shift);
762762            } else  if  (sd_version_is_flux (version)) {
763763                LOG_INFO (" running in Flux FLOW mode" 
764-                 float  shift = 1 .0f ;  //  TODO: validate
765-                 for  (auto  pair : model_loader.tensor_storages_types ) {
766-                     if  (pair.first .find (" model.diffusion_model.guidance_in.in_layer.weight" 
767-                         shift = 1 .15f ;
768-                         break ;
764+                 float  shift = sd_ctx_params->flow_shift ;
765+                 if  (shift == INFINITY) {
766+                     shift = 1 .0f ;  //  TODO: validate
767+                     for  (auto  pair : model_loader.tensor_storages_types ) {
768+                         if  (pair.first .find (" model.diffusion_model.guidance_in.in_layer.weight" 
769+                             shift = 1 .15f ;
770+                             break ;
771+                         }
769772                    }
770773                }
771774                denoiser = std::make_shared<FluxFlowDenoiser>(shift);
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments