Update README.md
Browse files
README.md
CHANGED
@@ -31,12 +31,12 @@ You can use the raw model for either feature extractor or (un) conditional image
|
|
31 |
Here is how to use this model in PyTorch to perform unconditional image generation:
|
32 |
|
33 |
```python
|
34 |
-
from transformers import
|
35 |
import torch
|
36 |
import matplotlib.pyplot as plt
|
37 |
import numpy as np
|
38 |
|
39 |
-
feature_extractor =
|
40 |
model = ImageGPTForCausalImageModeling.from_pretrained('openai/imagegpt-small')
|
41 |
|
42 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
31 |
Here is how to use this model in PyTorch to perform unconditional image generation:
|
32 |
|
33 |
```python
|
34 |
+
from transformers import ImageGPTImageProcessor, ImageGPTForCausalImageModeling
|
35 |
import torch
|
36 |
import matplotlib.pyplot as plt
|
37 |
import numpy as np
|
38 |
|
39 |
+
feature_extractor = ImageGPTImageProcessor.from_pretrained('openai/imagegpt-small')
|
40 |
model = ImageGPTForCausalImageModeling.from_pretrained('openai/imagegpt-small')
|
41 |
|
42 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|