mirror of
				https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
				synced 2025-11-03 19:44:27 +00:00 
			
		
		
		
	Minor cleanup
This commit is contained in:
		
							parent
							
								
									a97147bc8a
								
							
						
					
					
						commit
						2e7efe47b6
					
				@ -1,12 +1,10 @@
 | 
				
			|||||||
import os
 | 
					import os
 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
from modules import modelloader, devices
 | 
					from modules import modelloader, errors
 | 
				
			||||||
from modules.shared import cmd_opts, opts
 | 
					from modules.shared import cmd_opts, opts
 | 
				
			||||||
from modules.upscaler import Upscaler, UpscalerData
 | 
					from modules.upscaler import Upscaler, UpscalerData
 | 
				
			||||||
from modules.upscaler_utils import upscale_with_model
 | 
					from modules.upscaler_utils import upscale_with_model
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from icecream import ic
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
class UpscalerDAT(Upscaler):
 | 
					class UpscalerDAT(Upscaler):
 | 
				
			||||||
    def __init__(self, user_path):
 | 
					    def __init__(self, user_path):
 | 
				
			||||||
@ -24,10 +22,10 @@ class UpscalerDAT(Upscaler):
 | 
				
			|||||||
            if model.name in opts.dat_enabled_models:
 | 
					            if model.name in opts.dat_enabled_models:
 | 
				
			||||||
                self.scalers.append(model)
 | 
					                self.scalers.append(model)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def do_upscale(self, img, selected_model):
 | 
					    def do_upscale(self, img, path):
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            info = self.load_model(selected_model)
 | 
					            info = self.load_model(path)
 | 
				
			||||||
        except Exception as e:
 | 
					        except Exception:
 | 
				
			||||||
            errors.report(f"Unable to load DAT model {path}", exc_info=True)
 | 
					            errors.report(f"Unable to load DAT model {path}", exc_info=True)
 | 
				
			||||||
            return img
 | 
					            return img
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user