johnrachwanpruna commited on
Commit
0f1ff4a
1 Parent(s): 301b56b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -6
README.md CHANGED
@@ -69,9 +69,8 @@ You can run the smashed model on cards with less than 12 GB of memory with these
69
 
70
  2. Load & run the model.
71
  ```python
72
-
73
  import torch
74
-
75
  from optimum.quanto import freeze, qfloat8, quantize
76
 
77
  from diffusers import FlowMatchEulerDiscreteScheduler, AutoencoderKL
@@ -104,17 +103,17 @@ You can run the smashed model on cards with less than 12 GB of memory with these
104
  )
105
  pipe.text_encoder_2 = text_encoder_2
106
  pipe.transformer = transformer
107
- pipe.enable_model_cpu_offload()
108
-
 
109
  generator = torch.Generator().manual_seed(12345)
110
- image = pipe(
111
  "a cute apple smiling",
112
  guidance_scale=0.0,
113
  num_inference_steps=4,
114
  max_sequence_length=256,
115
  generator=torch.Generator("cpu").manual_seed(0)
116
  ).images[0]
117
- image.save("flux-dev.png")
118
  ```
119
 
120
  ## Configurations
 
69
 
70
  2. Load & run the model.
71
  ```python
 
72
  import torch
73
+
74
  from optimum.quanto import freeze, qfloat8, quantize
75
 
76
  from diffusers import FlowMatchEulerDiscreteScheduler, AutoencoderKL
 
103
  )
104
  pipe.text_encoder_2 = text_encoder_2
105
  pipe.transformer = transformer
106
+ # pipe.enable_model_cpu_offload()
107
+ pipe.to('cuda')
108
+ print('done')
109
  generator = torch.Generator().manual_seed(12345)
110
+ pipe(
111
  "a cute apple smiling",
112
  guidance_scale=0.0,
113
  num_inference_steps=4,
114
  max_sequence_length=256,
115
  generator=torch.Generator("cpu").manual_seed(0)
116
  ).images[0]
 
117
  ```
118
 
119
  ## Configurations