update readme
This commit is contained in:
parent
78c20ce731
commit
e409c120d0
5
README.md
vendored
5
README.md
vendored
|
@ -68,15 +68,14 @@ images = model.generate_images(
|
|||
)
|
||||
```
|
||||
|
||||
Note: you will have to move the images to the cpu and convert to numpy, e.g.
|
||||
To get an image into PIL format you will have to first move the images to the CPU and convert the tensor to a numpy array.
|
||||
```python
|
||||
images = images.to('cpu').detach().numpy()
|
||||
```
|
||||
Then image $i$ can be coverted to a PIL.Image
|
||||
Then image $i$ can be coverted to a PIL.Image and saved with its `save` method
|
||||
```python
|
||||
image = Image.fromarray(images[i])
|
||||
```
|
||||
and saved with its `save` method `image.save('image.png')`.
|
||||
|
||||
### Interactive
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user