AideepImage commited on
Commit
4fcb446
β€’
1 Parent(s): 1ad9ffd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -101
README.md CHANGED
@@ -1,102 +1,11 @@
1
- # SD-T2I-360PanoImage
2
- repository for [**Diffusion360: Seamless 360 Degree Panoramic Image Generation based on Diffusion Models** ](https://arxiv.org/pdf/2311.13141.pdf)
3
-
4
- ## News!!!
5
- - 2024.5.20. I recommend to install 0.20.0<= diffusers <= 0.26.0. The higher diffusers version will get an over-saturated SR result.
6
- - 2024.5.17. A ComfyUI plugin of this repo is released!
7
- See https://github.com/ArcherFMY/Diffusion360_ComfyUI for more information
8
-
9
- ## Text-to-360Panorama
10
- # ![a living room](data/a-living-room.png "a living room")
11
- # ![the mountains](data/the-mountains.png "the mountains")
12
- # ![the times square](data/the-times-square.png "the times square")
13
-
14
- ## Single-Image-to-360Panorama
15
- # ![samples-i2p](data/samples-i2p.png "i2p samples")
16
-
17
- ## Requirements
18
- - torch
19
- - torchvision
20
- - torchaudio
21
- - diffusers
22
- - accelerate
23
- - xformers
24
- - triton
25
- - transformers
26
- - realesrgan
27
- - py360convert
28
-
29
-
30
- ## Installation
31
- ```
32
- git clone https://github.com/ArcherFMY/SD-T2I-360PanoImage.git
33
- cd SD-T2I-360PanoImage
34
- pip install -r requirements.txt
35
- ```
36
-
37
- ## Getting Started
38
- ### Download Models
39
- Download models from [Baidu Disk](https://pan.baidu.com/s/1i_ypdWHknp2kqbjl0_zAuw?pwd=w2vr). Unzip `models.zip` into the root directory of the project.
40
- ```
41
- ${ROOT}
42
- |-- data
43
- | |-- a-living-room.png
44
- | |...
45
- |-- models
46
- | |-- sd-base
47
- | |-- sr-base
48
- | |-- sr-control
49
- | |-- RealESRGAN_x2plus.pth
50
- |-- txt2panoimg
51
- |-- img2panoimg
52
- |...
53
- ```
54
-
55
- For users who want the Single-Image-to-360Panorama models, please download the additional models from [Baidu Disk](https://pan.baidu.com/s/1kJxXeMXLASYjMThDPl50xQ?pwd=tput), and unzip it into the 'models' directory.
56
- Or download the models from [Hugging Face](https://huggingface.co/archerfmy0831/sd-t2i-360panoimage)
57
-
58
-
59
- ### Inference
60
- #### Text-to-360Panorama
61
- ```
62
- import torch
63
- from txt2panoimage import Text2360PanoramaImagePipeline
64
-
65
- prompt = 'The living room'
66
- input = {'prompt': prompt, 'upscale': False}
67
- model_id = './models'
68
- txt2panoimg = Text2360PanoramaImagePipeline(model_id, torch_dtype=torch.float16)
69
- output = txt2panoimg(input)
70
-
71
- output.save('result.png')
72
- ```
73
- see more in `demo_t2p.py`
74
-
75
- #### Single-Image-to-360Panorama
76
- ```
77
- import torch
78
- from diffusers.utils import load_image
79
- from img2panoimg import Image2360PanoramaImagePipeline
80
-
81
- image = load_image("./data/i2p-image.jpg").resize((512, 512))
82
- mask = load_image("./data/i2p-mask.jpg")
83
- prompt = 'The office room'
84
- input = {'prompt': prompt, 'image': image, 'mask': mask, 'upscale': False}
85
- model_id = 'models'
86
- img2panoimg = Image2360PanoramaImagePipeline(model_id, torch_dtype=torch.float16)
87
- output = img2panoimg(input)
88
-
89
- output.save('result.png')
90
- ```
91
- see more in `demo_i2p.py`
92
-
93
-
94
- ### Use Text-to-360Panorama in ModelScope
95
- see [here](https://www.modelscope.cn/models/damo/cv_diffusion_text-to-360panorama-image_generation/summary) for more information.
96
-
97
- ## License
98
-
99
- This code is released under the Apache License 2.0 (refer to the LICENSE file for details).
100
-
101
-
102
 
 
1
+ metadata
2
+ title: 360PanoImage
3
+ emoji: ⚑
4
+ colorFrom: blue
5
+ colorTo: red
6
+ sdk: gradio
7
+ sdk_version: 4.37.2
8
+ app_file: app.py
9
+ pinned: true
10
+ license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11