waqashayder commited on
Commit
3f78f2a
Β·
verified Β·
1 Parent(s): ae0e87d
Files changed (1) hide show
  1. README.md +129 -130
README.md CHANGED
@@ -1,130 +1,129 @@
1
- ---
2
- title: PBRealistic
3
- emoji: πŸ™…πŸ»
4
- colorFrom: indigo
5
- colorTo: green
6
- sdk: gradio
7
- sdk_version: 4.36.0
8
- app_file: app.py
9
- pinned: true
10
- license: creativeml-openrail-m
11
- header: mini
12
- short_description: Collage Template + Grid + Style
13
- ---
14
-
15
-
16
- ![alt text](assets/44.png)
17
-
18
-
19
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
20
-
21
- Spaces: https://huggingface.co/spaces/prithivMLmods/IMAGINEO-4K
22
-
23
- Take Clone :
24
-
25
- # Make sure you have git-lfs installed (https://git-lfs.com)
26
- git lfs install
27
-
28
- git clone https://huggingface.co/spaces/prithivMLmods/Midjourney
29
-
30
- # If you want to clone without large files - just their pointers
31
-
32
- GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/spaces/prithivMLmods/Midjourney
33
-
34
- ## Sample Images
35
-
36
-
37
- | ![Image 1](assets/1.png) | ![Image 2](assets/2.png) |
38
- |-------------------------|-------------------------|
39
- | ![Image 3](assets/3.png) | ![Image 4](assets/4.png) |
40
-
41
-
42
-
43
- ## Requirements.txt
44
-
45
-
46
- | torch | diffusers | transformers | safetensors |
47
- |-----------|-----------|--------------|-------------|
48
- | accelerate| spaces | peft | pillow |
49
-
50
-
51
- ## Requirements Zero
52
-
53
- ZeroGPU is a new kind of hardware for Spaces.
54
-
55
- It has two goals :
56
-
57
- Provide free GPU access for Spaces
58
- Allow Spaces to run on multiple GPUs
59
-
60
- This is achieved by making Spaces efficiently hold and release GPUs as needed (as opposed to a classical GPU Space that holds exactly one GPU at any point in time)
61
-
62
- ZeroGPU uses Nvidia A100 GPU devices under the hood (40GB of vRAM are available for each workloads)
63
-
64
-
65
-
66
- ![alt text](assets/x.gif)
67
-
68
-
69
- ## Compatibility
70
-
71
- ZeroGPU Spaces should mostly be compatible with any PyTorch-based GPU Space.
72
- Compatibility with high level HF libraries like transformers or diffusers is slightly more guaranteed
73
- That said, ZeroGPU Spaces are not as broadly compatible as classical GPU Spaces and you might still encounter unexpected bugs
74
-
75
- Also, for now, ZeroGPU Spaces only works with the Gradio SDK
76
-
77
- Supported versions:
78
-
79
- Gradio: 4+
80
- PyTorch: All versions from 2.0.0 to 2.2.0
81
- Python: 3.10.13
82
-
83
- ## Usage
84
-
85
- In order to make your Space work with ZeroGPU you need to decorate the Python functions that actually require a GPU with @spaces.GPU
86
- During the time when a decorated function is invoked, the Space will be attributed a GPU, and it will release it upon completion of the function.
87
- Here is a practical example :
88
-
89
- +import spaces
90
- from diffusers import DiffusionPipeline
91
-
92
- pipe = DiffusionPipeline.from_pretrained(...)
93
- pipe.to('cuda')
94
-
95
96
- def generate(prompt):
97
- return pipe(prompt).images
98
-
99
- gr.Interface(
100
- fn=generate,
101
- inputs=gr.Text(),
102
- outputs=gr.Gallery(),
103
- ).launch()
104
-
105
-
106
- We first import spaces (importing it first might prevent some issues but is not mandatory)
107
- Then we decorate the generate function by adding a @spaces.GPU line before its definition
108
-
109
- ## Duration
110
-
111
- If you expect your GPU function to take more than 60s then you need to specify a duration param in the decorator like:
112
-
113
- @spaces.GPU(duration=120)
114
- def generate(prompt):
115
- return pipe(prompt).images
116
-
117
- It will set the maximum duration of your function call to 120s.
118
-
119
- You can also specify a duration if you know that your function will take far less than the 60s default.
120
-
121
- The lower the duration, the higher priority your Space visitors will have in the queue
122
-
123
-
124
- .
125
-
126
- .
127
-
128
- .
129
- @prithivmlmods
130
-
 
1
+ ---
2
+ title: PBRealistic
3
+ emoji: πŸ™…πŸ»
4
+ colorFrom: indigo
5
+ colorTo: green
6
+ sdk: gradio
7
+ sdk_version: 4.37.2
8
+ app_file: app.py
9
+ pinned: true
10
+ license: creativeml-openrail-m
11
+ header: mini
12
+ short_description: Collage Template + Grid + Style
13
+ ---
14
+
15
+
16
+ ![alt text](assets/44.png)
17
+
18
+
19
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
20
+
21
+ Spaces: https://huggingface.co/spaces/prithivMLmods/IMAGINEO-4K
22
+
23
+ Take Clone :
24
+
25
+ # Make sure you have git-lfs installed (https://git-lfs.com)
26
+ git lfs install
27
+
28
+ git clone https://huggingface.co/spaces/prithivMLmods/Midjourney
29
+
30
+ # If you want to clone without large files - just their pointers
31
+
32
+ GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/spaces/prithivMLmods/Midjourney
33
+
34
+ ## Sample Images
35
+
36
+
37
+ | ![Image 1](assets/1.png) | ![Image 2](assets/2.png) |
38
+ |-------------------------|-------------------------|
39
+ | ![Image 3](assets/3.png) | ![Image 4](assets/4.png) |
40
+
41
+
42
+
43
+ ## Requirements.txt
44
+
45
+
46
+ | torch | diffusers | transformers | safetensors |
47
+ |-----------|-----------|--------------|-------------|
48
+ | accelerate| spaces | peft | pillow |
49
+
50
+
51
+ ## Requirements Zero
52
+
53
+ ZeroGPU is a new kind of hardware for Spaces.
54
+
55
+ It has two goals :
56
+
57
+ Provide free GPU access for Spaces
58
+ Allow Spaces to run on multiple GPUs
59
+
60
+ This is achieved by making Spaces efficiently hold and release GPUs as needed (as opposed to a classical GPU Space that holds exactly one GPU at any point in time)
61
+
62
+ ZeroGPU uses Nvidia A100 GPU devices under the hood (40GB of vRAM are available for each workloads)
63
+
64
+
65
+
66
+ ![alt text](assets/x.gif)
67
+
68
+
69
+ ## Compatibility
70
+
71
+ ZeroGPU Spaces should mostly be compatible with any PyTorch-based GPU Space.
72
+ Compatibility with high level HF libraries like transformers or diffusers is slightly more guaranteed
73
+ That said, ZeroGPU Spaces are not as broadly compatible as classical GPU Spaces and you might still encounter unexpected bugs
74
+
75
+ Also, for now, ZeroGPU Spaces only works with the Gradio SDK
76
+
77
+ Supported versions:
78
+
79
+ Gradio: 4+
80
+ PyTorch: All versions from 2.0.0 to 2.2.0
81
+ Python: 3.10.13
82
+
83
+ ## Usage
84
+
85
+ In order to make your Space work with ZeroGPU you need to decorate the Python functions that actually require a GPU with @spaces.GPU
86
+ During the time when a decorated function is invoked, the Space will be attributed a GPU, and it will release it upon completion of the function.
87
+ Here is a practical example :
88
+
89
+ +import spaces
90
+ from diffusers import DiffusionPipeline
91
+
92
+ pipe = DiffusionPipeline.from_pretrained(...)
93
+ pipe.to('cuda')
94
+
95
96
+ def generate(prompt):
97
+ return pipe(prompt).images
98
+
99
+ gr.Interface(
100
+ fn=generate,
101
+ inputs=gr.Text(),
102
+ outputs=gr.Gallery(),
103
+ ).launch()
104
+
105
+
106
+ We first import spaces (importing it first might prevent some issues but is not mandatory)
107
+ Then we decorate the generate function by adding a @spaces.GPU line before its definition
108
+
109
+ ## Duration
110
+
111
+ If you expect your GPU function to take more than 60s then you need to specify a duration param in the decorator like:
112
+
113
+ @spaces.GPU(duration=120)
114
+ def generate(prompt):
115
+ return pipe(prompt).images
116
+
117
+ It will set the maximum duration of your function call to 120s.
118
+
119
+ You can also specify a duration if you know that your function will take far less than the 60s default.
120
+
121
+ The lower the duration, the higher priority your Space visitors will have in the queue
122
+
123
+
124
+ .
125
+
126
+ .
127
+
128
+ .
129
+ @prithivmlmods