File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed 
docs/source/en/api/pipelines/stable_diffusion Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,26 @@ image = pipe("a picture of a cat holding a sign that says hello world").images[0
313313image.save(' sd3-single-file-t5-fp8.png' 
314314``` 
315315
316+ ### Loading the single file checkpoint for the Stable Diffusion 3.5 Transformer Model  
317+ 
318+ ``` python 
319+ import  torch
320+ from  diffusers import  SD3Transformer2DModel, StableDiffusion3Pipeline
321+ 
322+ transformer =  SD3Transformer2DModel.from_single_file(
323+     " https://huggingface.co/stabilityai/stable-diffusion-3-5-large/blob/main/sd3.5_large.safetensors" 
324+     torch_dtype = torch.bfloat16,
325+ )
326+ pipe =  StableDiffusion3Pipeline.from_pretrained(
327+     " stabilityai/stable-diffusion-3-5-large" 
328+     transformer = transformer,
329+     torch_dtype = torch.bfloat16,
330+ )
331+ pipe.enable_model_cpu_offload()
332+ image =  pipe(" a cat holding a sign that says hello world" 0 ]
333+ image.save(" sd35.png" 
334+ ``` 
335+ 
316336## StableDiffusion3Pipeline  
317337
318338[[ autodoc]]  StableDiffusion3Pipeline
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments